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 // Make sure to sync with libui FrameStats.h
20 
21 /** @hide */
22 parcelable FrameStats {
23     /*
24      * Approximate refresh time, in nanoseconds.
25      */
26     long refreshPeriodNano;
27 
28     /*
29      * The times in nanoseconds for when the frame contents were posted by the producer (e.g.
30      * the application). They are either explicitly set or defaulted to the time when
31      * Surface::queueBuffer() was called.
32      */
33     long[] desiredPresentTimesNano;
34 
35     /*
36      * The times in milliseconds for when the frame contents were presented on the screen.
37      */
38     long[] actualPresentTimesNano;
39 
40     /*
41      * The times in nanoseconds for when the frame contents were ready to be presented. Note that
42      * a frame can be posted and still it contents being rendered asynchronously in GL. In such a
43      * case these are the times when the frame contents were completely rendered (i.e. their fences
44      * signaled).
45      */
46     long[] frameReadyTimesNano;
47 }
48