• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
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 {
19    /**
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     */
40    vsyncEventPhaseOffsetNs() generates (OptionalInt64 value);
41    vsyncSfEventPhaseOffsetNs() generates (OptionalInt64 value);
42
43    /**
44     * Instruct the Render Engine to use EGL_IMG_context_priority hint if
45     * availabe.
46     */
47    useContextPriority() generates(OptionalBool value);
48
49    /**
50     * hasWideColorDisplay indicates that the device has
51     * or can support a wide-color display, e.g. color space
52     * greater than sRGB. Typical display may have same
53     * color primaries as DCI-P3.
54     * Indicate support for this feature by setting
55     * TARGET_HAS_WIDE_COLOR_DISPLAY to true in BoardConfig.mk
56     * This also means that the device is color managed.
57     * A color managed device will use the appropriate
58     * display mode depending on the content on the screen.
59     * Default is sRGB.
60     */
61    hasWideColorDisplay() generates (OptionalBool value);
62
63    /**
64     * hwHDRDisplay indicates that the device has an High Dynamic Range display.
65     * A display is considered High Dynamic Range if it
66     *
67     *     1. is a wide color gamut display, typically DCI-P3 or lager
68     *     2. has high luminance capability, typically 540 nits or higher at 10% OPR
69     *
70     * Indicate support for this feature by setting
71     * TARGET_HAS_HDR_DISPLAY to true in BoardConfig.mk
72     * TARGET_HAS_WIDE_COLOR_DISPLAY must be set to true when
73     * TARGET_HAS_HDR_DISPLAY is true.
74     */
75    hasHDRDisplay() generates (OptionalBool value);
76
77    /**
78     * Specify the offset in nanoseconds to add to vsync time when timestamping
79     * present fences.
80     */
81    presentTimeOffsetFromVSyncNs() generates(OptionalInt64 value);
82
83    /**
84     * Some hardware can do RGB->YUV conversion more efficiently in hardware
85     * controlled by HWC than in hardware controlled by the video encoder.
86     * This instruct VirtualDisplaySurface to use HWC for such conversion on
87     * GL composition.
88     */
89    useHwcForRGBtoYUV() generates(OptionalBool value);
90
91    /**
92     *  Maximum dimension supported by HWC for virtual display.
93     *  Must be equals to min(max_width, max_height).
94     */
95    maxVirtualDisplaySize() generates (OptionalUInt64 value);
96
97    /**
98     * Indicates if Sync framework is available. Sync framework provides fence
99     * mechanism which significantly reduces buffer processing latency.
100     */
101    hasSyncFramework() generates(OptionalBool value);
102
103    /**
104     * Return true if surface flinger should use vr flinger for compatible vr
105     * apps, false otherwise. Devices that will never be running vr apps should
106     * return false to avoid extra resource usage. Daydream ready devices must
107     * return true for full vr support.
108     */
109    useVrFlinger() generates (OptionalBool value);
110
111    /**
112     * Controls the number of buffers SurfaceFlinger will allocate for use in
113     * FramebufferSurface.
114     */
115    maxFrameBufferAcquiredBuffers() generates(OptionalInt64 value);
116
117    /**
118     * Returns true if surface flinger should start
119     * hardware.graphics.allocator@2.0::IAllocator service.
120     */
121    startGraphicsAllocatorService() generates(OptionalBool value);
122};
123