blob: ce967ee28d22bdfc6cf329ea0fab9fc24bf1c940 [file] [log] [blame]
Jiyong Park200825e2017-01-14 19:40:33 +09001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package android.hardware.configstore@1.0;
17
18interface ISurfaceFlingerConfigs {
Fabien Sanglardeebc9252017-03-06 11:46:36 -080019 /*
20 * The following two methods define (respectively):
21 *
22 * - The phase offset between hardware vsync and when apps are woken up by the
23 * Choreographer callback
24 * - The phase offset between hardware vsync and when SurfaceFlinger wakes up
25 * to consume input
26 *
27 * Their values may be tuned to trade off between display pipeline latency (both
28 * overall latency and the lengths of the app --> SF and SF --> display phases)
29 * and frame delivery jitter (which typically manifests as "jank" or "jerkiness"
30 * while interacting with the device). The default values must produce a
31 * relatively low amount of jitter at the expense of roughly two frames of
32 * app --> display latency, and unless significant testing is performed to avoid
33 * increased display jitter (both manual investigation using systrace [1] and
34 * automated testing using dumpsys gfxinfo [2] are recommended), they should not
35 * be modified.
36 *
37 * [1] https://developer.android.com/studio/profile/systrace.html
38 * [2] https://developer.android.com/training/testing/performance.html
39 */
Jiyong Park200825e2017-01-14 19:40:33 +090040 vsyncEventPhaseOffsetNs() generates (OptionalInt64 value);
Fabien Sanglardeebc9252017-03-06 11:46:36 -080041 vsyncSfEventPhaseOffsetNs() generates (OptionalInt64 value);
42
Jaesoo Leed643fc02017-01-23 19:09:02 +090043 useTripleFramebuffer() generates (OptionalBool value);
Fabien Sanglardcbece282017-03-13 13:03:04 -070044
45 /*
46 * Instruct the Render Engine to use EGL_IMG_context_priority hint if
47 * availabe.
48 */
49 useContextPriority() generates(OptionalBool value);
Courtney Goeltzenleuchter3670b442017-03-09 09:04:29 -070050
51 /*
52 * hasWideColorDisplay indicates that the device has
53 * or can support a wide-color display, e.g. color space
54 * greater than sRGB. Typical display may have same
55 * color primaries as DCI-P3.
56 * Indicate support for this feature by setting
57 * TARGET_HAS_WIDE_COLOR_DISPLAY to true in BoardConfig.mk
58 * This also means that the device is color managed.
59 * A color managed device will use the appropriate
60 * display mode depending on the content on the screen.
61 * Default is sRGB.
62 */
63 hasWideColorDisplay() generates (OptionalBool value);
64
65 /*
66 * hwHdrDisplay indicates that the device has
67 * or can support an HDR (High Dynamic Range) display.
68 * Typically an HDR display is also wide-color.
69 * Indicate support for this feature by setting
70 * TARGET_HAS_HDR_DISPLAY to true in BoardConfig.mk
71 */
72 hasHDRDisplay() generates (OptionalBool value);
Fabien Sanglard8d7e31e2017-03-14 13:16:30 -070073
74 /*
75 * Specify the offset in nanoseconds to add to vsync time when timestamping
76 * present fences.
77 */
78 presentTimeOffsetFromVSyncNs() generates(OptionalInt64 value);
Fabien Sanglard38295e72017-03-14 11:43:18 -070079
80 /*
81 * Some hardware can do RGB->YUV conversion more efficiently in hardware
82 * controlled by HWC than in hardware controlled by the video encoder.
83 * This instruct VirtualDisplaySurface to use HWC for such conversion on
84 * GL composition.
85 */
86 useHwcForRGBtoYUV() generates(OptionalBool value);
Jiyong Park200825e2017-01-14 19:40:33 +090087};