Ady Abraham | 7882ae6 | 2019-10-10 17:04:47 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2019 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 | |
| 17 | package android.hardware.graphics.composer@2.4; |
| 18 | |
| 19 | import @2.1::Display; |
| 20 | import @2.1::IComposerCallback; |
| 21 | |
| 22 | interface IComposerCallback extends @2.1::IComposerCallback { |
| 23 | /** |
| 24 | * Notifies the client that a vsync event has occurred. This callback must |
| 25 | * only be triggered when vsync is enabled for this display (through |
| 26 | * setVsyncEnabled). |
| 27 | * |
| 28 | * @param display is the display which has received a vsync event |
| 29 | * @param timestamp is the CLOCK_MONOTONIC time at which the vsync event |
| 30 | * occurred, in nanoseconds. |
| 31 | * @param vsyncPeriodNanos is the display vsync period in nanoseconds i.e. the next onVsync_2_4 |
| 32 | * is expected to be called vsyncPeriodNanos nanoseconds after this call. |
| 33 | */ |
| 34 | oneway onVsync_2_4(Display display, int64_t timestamp, VsyncPeriodNanos vsyncPeriodNanos); |
Ady Abraham | a1df7c3 | 2019-10-22 16:56:08 -0700 | [diff] [blame] | 35 | |
| 36 | /** |
| 37 | * Notifies the client that the previously reported timing for vsync period change has been |
| 38 | * updated. This may occur if the composer missed the deadline for changing the vsync period |
| 39 | * or the client submitted a refresh frame too late. |
| 40 | * |
| 41 | * @param display is the display which vsync period change is in progress |
| 42 | * @param updatedTimeline is the new timeline for the vsync period change. |
| 43 | */ |
| 44 | oneway onVsyncPeriodTimingChanged(Display display, VsyncPeriodChangeTimeline updatedTimeline); |
Ady Abraham | 30d818e | 2019-12-30 12:59:08 -0800 | [diff] [blame] | 45 | |
| 46 | /** |
| 47 | * Notifies the client that the conditions which previously led to returning |
| 48 | * SEAMLESS_NOT_POSSIBLE from setActiveConfigWithConstraints have changed and now seamless may |
| 49 | * be possible. Client should retry calling setActiveConfigWithConstraints. |
| 50 | * |
| 51 | * @param display is a display setActiveConfigWithConstraints previously failed with |
| 52 | * SEAMLESS_NOT_POSSIBLE. |
| 53 | */ |
| 54 | oneway onSeamlessPossible(Display display); |
Ady Abraham | 7882ae6 | 2019-10-10 17:04:47 -0700 | [diff] [blame] | 55 | }; |