• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2022 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.gui;
18 
19 /** @hide */
20 parcelable FrameTimelineInfo {
21     // Needs to be in sync with android.graphics.FrameInfo.INVALID_VSYNC_ID in java
22     const long INVALID_VSYNC_ID = -1;
23 
24     // The vsync id that was used to start the transaction
25     long vsyncId = INVALID_VSYNC_ID;
26 
27     // The id of the input event that caused this buffer
28     // Default is android::os::IInputConstants::INVALID_INPUT_EVENT_ID = 0
29     // We copy the value of the input event ID instead of including the header, because libgui
30     // header libraries containing FrameTimelineInfo must be available to vendors, but libinput is
31     // not directly vendor available.
32     int inputEventId = 0;
33 
34     // The current time in nanoseconds the application started to render the frame.
35     long startTimeNanos = 0;
36 
37     // Whether this vsyncId should be used to heuristically select the display refresh rate
38     // TODO(b/281695725): Clean this up once TextureView use setFrameRate API
39     boolean useForRefreshRateSelection = false;
40 
41     // The VsyncId of a frame that was not drawn and squashed into this frame.
42     long skippedFrameVsyncId = INVALID_VSYNC_ID;
43 
44     // The start time of a frame that was not drawn and squashed into this frame.
45     long skippedFrameStartTimeNanos = 0;
46 }
47