• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2018 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 #pragma once
18 
19 #include <vector>
20 
21 namespace android {
22 
23 struct DisplayedFrameStats {
24     /* The number of frames represented by this sample. */
25     uint64_t numFrames = 0;
26     /* A histogram counting how many times a pixel of a given value was displayed onscreen for
27      * FORMAT_COMPONENT_0. The buckets of the histogram are evenly weighted, the number of buckets
28      * is device specific. eg, for RGBA_8888, if sampleComponent0 is {10, 6, 4, 1} this means that
29      * 10 red pixels were displayed onscreen in range 0x00->0x3F, 6 red pixels
30      * were displayed onscreen in range 0x40->0x7F, etc.
31      */
32     std::vector<uint64_t> component_0_sample = {};
33     /* The same sample definition as sampleComponent0, but for FORMAT_COMPONENT_1. */
34     std::vector<uint64_t> component_1_sample = {};
35     /* The same sample definition as sampleComponent0, but for FORMAT_COMPONENT_2. */
36     std::vector<uint64_t> component_2_sample = {};
37     /* The same sample definition as sampleComponent0, but for FORMAT_COMPONENT_3. */
38     std::vector<uint64_t> component_3_sample = {};
39 };
40 
41 } // namespace android
42