Jiyong Park | 200825e | 2017-01-14 19:40:33 +0900 | [diff] [blame] | 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 | */ |
| 16 | package android.hardware.configstore@1.0; |
| 17 | |
| 18 | interface ISurfaceFlingerConfigs { |
Fabien Sanglard | eebc925 | 2017-03-06 11:46:36 -0800 | [diff] [blame] | 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 | */ |
Jiyong Park | 200825e | 2017-01-14 19:40:33 +0900 | [diff] [blame] | 40 | vsyncEventPhaseOffsetNs() generates (OptionalInt64 value); |
Fabien Sanglard | eebc925 | 2017-03-06 11:46:36 -0800 | [diff] [blame] | 41 | vsyncSfEventPhaseOffsetNs() generates (OptionalInt64 value); |
| 42 | |
Jaesoo Lee | d643fc0 | 2017-01-23 19:09:02 +0900 | [diff] [blame] | 43 | useTripleFramebuffer() generates (OptionalBool value); |
Jiyong Park | 200825e | 2017-01-14 19:40:33 +0900 | [diff] [blame] | 44 | }; |