blob: 5f975bd7dc06dfb127f81c8c71e91a0b2e02cebc [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 {
Andreas Huber40d3a9b2017-03-28 16:19:16 -070019 /**
Fabien Sanglardeebc9252017-03-06 11:46:36 -080020 * 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
Andreas Huber40d3a9b2017-03-28 16:19:16 -070043 /**
Fabien Sanglardcbece282017-03-13 13:03:04 -070044 * Instruct the Render Engine to use EGL_IMG_context_priority hint if
45 * availabe.
46 */
47 useContextPriority() generates(OptionalBool value);
Courtney Goeltzenleuchter3670b442017-03-09 09:04:29 -070048
Andreas Huber40d3a9b2017-03-28 16:19:16 -070049 /**
Courtney Goeltzenleuchter3670b442017-03-09 09:04:29 -070050 * 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
Andreas Huber40d3a9b2017-03-28 16:19:16 -070063 /**
Courtney Goeltzenleuchter3670b442017-03-09 09:04:29 -070064 * hwHdrDisplay indicates that the device has
65 * or can support an HDR (High Dynamic Range) display.
66 * Typically an HDR display is also wide-color.
67 * Indicate support for this feature by setting
68 * TARGET_HAS_HDR_DISPLAY to true in BoardConfig.mk
69 */
70 hasHDRDisplay() generates (OptionalBool value);
Fabien Sanglard8d7e31e2017-03-14 13:16:30 -070071
Andreas Huber40d3a9b2017-03-28 16:19:16 -070072 /**
Fabien Sanglard8d7e31e2017-03-14 13:16:30 -070073 * Specify the offset in nanoseconds to add to vsync time when timestamping
74 * present fences.
75 */
76 presentTimeOffsetFromVSyncNs() generates(OptionalInt64 value);
Fabien Sanglard38295e72017-03-14 11:43:18 -070077
Andreas Huber40d3a9b2017-03-28 16:19:16 -070078 /**
Fabien Sanglard38295e72017-03-14 11:43:18 -070079 * Some hardware can do RGB->YUV conversion more efficiently in hardware
80 * controlled by HWC than in hardware controlled by the video encoder.
81 * This instruct VirtualDisplaySurface to use HWC for such conversion on
82 * GL composition.
83 */
84 useHwcForRGBtoYUV() generates(OptionalBool value);
Fabien Sanglarda33c7e42017-03-10 10:31:14 -080085
Andreas Huber40d3a9b2017-03-28 16:19:16 -070086 /**
Fabien Sanglarda33c7e42017-03-10 10:31:14 -080087 * Maximum dimension supported by HWC for virtual display.
88 * Must be equals to min(max_width, max_height).
89 */
90 maxVirtualDisplaySize() generates (OptionalUInt64 value);
Fabien Sanglardbf4da3d2017-03-10 17:15:43 -080091
Andreas Huber40d3a9b2017-03-28 16:19:16 -070092 /**
Fabien Sanglardbf4da3d2017-03-10 17:15:43 -080093 * Indicates if Sync framework is available. Sync framework provides fence
94 * mechanism which significantly reduces buffer processing latency.
95 */
96 hasSyncFramework() generates(OptionalBool value);
Steven Thomascb4172a2017-03-13 17:42:18 -070097
Andreas Huber40d3a9b2017-03-28 16:19:16 -070098 /**
Steven Thomascb4172a2017-03-13 17:42:18 -070099 * Return true if surface flinger should use vr flinger for compatible vr
100 * apps, false otherwise. Devices that will never be running vr apps should
101 * return false to avoid extra resource usage. Daydream ready devices must
102 * return true for full vr support.
103 */
104 useVrFlinger() generates (OptionalBool value);
Fabien Sanglard3d9f5ad2017-03-10 15:37:07 -0800105
Andreas Huber40d3a9b2017-03-28 16:19:16 -0700106 /**
Fabien Sanglard3d9f5ad2017-03-10 15:37:07 -0800107 * Controls the number of buffers SurfaceFlinger will allocate for use in
108 * FramebufferSurface.
109 */
110 maxFrameBufferAcquiredBuffers() generates(OptionalInt64 value);
Chia-I Wu12246402017-04-11 15:17:24 -0700111
112 /**
113 * Returns true if surface flinger should start
114 * hardware.graphics.allocator@2.0::IAllocator service.
115 */
116 startGraphicsAllocatorService() generates(OptionalBool value);
Jiyong Park200825e2017-01-14 19:40:33 +0900117};