blob: bdeaeb8468f00722caf736689c5570c5d4e42959 [file] [log] [blame]
Yiwei Zhang0102ad22018-05-02 17:37:17 -07001/*
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
Alec Mouri9a29e672020-09-14 12:39:14 -070019#include <cstdint>
Peiyong Lin65248e02020-04-18 21:15:07 -070020
Alec Mouri7d436ec2021-01-27 20:40:50 -080021#include <../Fps.h>
Adithya Srinivasanf427f762021-06-15 19:46:26 +000022#include <android/hardware/graphics/composer/2.4/IComposerClient.h>
Alec Mouri7d436ec2021-01-27 20:40:50 -080023#include <gui/JankInfo.h>
Yiwei Zhang0102ad22018-05-02 17:37:17 -070024#include <timestatsproto/TimeStatsHelper.h>
25#include <timestatsproto/TimeStatsProtoHeader.h>
Yiwei Zhang0102ad22018-05-02 17:37:17 -070026#include <ui/FenceTime.h>
Yiwei Zhang0102ad22018-05-02 17:37:17 -070027#include <utils/String16.h>
Yiwei Zhang0102ad22018-05-02 17:37:17 -070028#include <utils/Vector.h>
29
Yiwei Zhangc5f2c452018-05-08 16:31:56 -070030#include <deque>
Yiwei Zhang0102ad22018-05-02 17:37:17 -070031#include <mutex>
Yiwei Zhang8a4015c2018-05-08 16:03:47 -070032#include <optional>
Yiwei Zhang0102ad22018-05-02 17:37:17 -070033#include <unordered_map>
Alec Mourie4034bb2019-11-19 12:45:54 -080034#include <variant>
Yiwei Zhang0102ad22018-05-02 17:37:17 -070035
36using namespace android::surfaceflinger;
37
38namespace android {
Yiwei Zhang0102ad22018-05-02 17:37:17 -070039
40class TimeStats {
Alec Mourifb571ea2019-01-24 18:42:10 -080041public:
Ady Abraham8b9e6122021-01-26 19:11:45 -080042 using SetFrameRateVote = TimeStatsHelper::SetFrameRateVote;
43
Alec Mourifb571ea2019-01-24 18:42:10 -080044 virtual ~TimeStats() = default;
45
Tej Singhe2751772021-04-06 22:05:29 -070046 // Process a pull request from statsd.
47 virtual bool onPullAtom(const int atomId, std::string* pulledData);
Alec Mouri8e2f31b2020-01-16 22:04:35 +000048
Alec Mourifb571ea2019-01-24 18:42:10 -080049 virtual void parseArgs(bool asProto, const Vector<String16>& args, std::string& result) = 0;
50 virtual bool isEnabled() = 0;
Oliver Nguyenf3b7c9c2019-05-07 13:28:07 -070051 virtual std::string miniDump() = 0;
Alec Mourifb571ea2019-01-24 18:42:10 -080052
53 virtual void incrementTotalFrames() = 0;
54 virtual void incrementMissedFrames() = 0;
55 virtual void incrementClientCompositionFrames() = 0;
Vishnu Nair9b079a22020-01-21 14:36:08 -080056 virtual void incrementClientCompositionReusedFrames() = 0;
Alec Mouri8de697e2020-03-19 10:52:01 -070057 // Increments the number of times the display refresh rate changed.
58 virtual void incrementRefreshRateSwitches() = 0;
Alec Mouri8f7a0102020-04-15 12:11:10 -070059 // Increments the number of changes in composition strategy
60 // The intention is to reflect the number of changes between hwc and gpu
61 // composition, where "gpu composition" may also include mixed composition.
62 virtual void incrementCompositionStrategyChanges() = 0;
Alec Mouri717bcb62020-02-10 17:07:19 -080063 // Records the most up-to-date count of display event connections.
64 // The stored count will be the maximum ever recoded.
65 virtual void recordDisplayEventConnectionCount(int32_t count) = 0;
Alec Mourifb571ea2019-01-24 18:42:10 -080066
Alec Mouri9519bf12019-11-15 16:54:44 -080067 // Records the start and end times for a frame.
68 // The start time is the same as the beginning of a SurfaceFlinger
69 // invalidate message.
70 // The end time corresponds to when SurfaceFlinger finishes submitting the
71 // request to HWC to present a frame.
72 virtual void recordFrameDuration(nsecs_t startTime, nsecs_t endTime) = 0;
Alec Mourie4034bb2019-11-19 12:45:54 -080073 // Records the start time and end times for when RenderEngine begins work.
74 // The start time corresponds to the beginning of RenderEngine::drawLayers.
75 // The end time corresponds to when RenderEngine finishes rendering.
76 virtual void recordRenderEngineDuration(nsecs_t startTime, nsecs_t endTime) = 0;
77 // Same as above, but passes in a fence representing the end time.
78 virtual void recordRenderEngineDuration(nsecs_t startTime,
79 const std::shared_ptr<FenceTime>& readyFence) = 0;
Alec Mouri9519bf12019-11-15 16:54:44 -080080
Yiwei Zhang1a88c402019-11-18 10:43:58 -080081 virtual void setPostTime(int32_t layerId, uint64_t frameNumber, const std::string& layerName,
Adithya Srinivasan58069dc2021-06-04 20:37:02 +000082 uid_t uid, nsecs_t postTime, int32_t gameMode) = 0;
Yiwei Zhang1a88c402019-11-18 10:43:58 -080083 virtual void setLatchTime(int32_t layerId, uint64_t frameNumber, nsecs_t latchTime) = 0;
Alec Mouri91f6df32020-01-30 08:48:58 -080084 // Reasons why latching a particular buffer may be skipped
85 enum class LatchSkipReason {
86 // If the acquire fence did not fire on some devices we skip latching
87 // the buffer until the fence fires.
88 LateAcquire,
89 };
90 // Increments the counter of skipped latch buffers.
91 virtual void incrementLatchSkipped(int32_t layerId, LatchSkipReason reason) = 0;
92 // Increments the counter of bad desired present times for this layer.
93 // Bad desired present times are "implausible" and cause SurfaceFlinger to
94 // latch a buffer immediately to avoid stalling.
95 virtual void incrementBadDesiredPresent(int32_t layerId) = 0;
Yiwei Zhang1a88c402019-11-18 10:43:58 -080096 virtual void setDesiredTime(int32_t layerId, uint64_t frameNumber, nsecs_t desiredTime) = 0;
97 virtual void setAcquireTime(int32_t layerId, uint64_t frameNumber, nsecs_t acquireTime) = 0;
98 virtual void setAcquireFence(int32_t layerId, uint64_t frameNumber,
Alec Mourifb571ea2019-01-24 18:42:10 -080099 const std::shared_ptr<FenceTime>& acquireFence) = 0;
Alec Mourie4034bb2019-11-19 12:45:54 -0800100 // SetPresent{Time, Fence} are not expected to be called in the critical
101 // rendering path, as they flush prior fences if those fences have fired.
Alec Mouri7d436ec2021-01-27 20:40:50 -0800102 virtual void setPresentTime(int32_t layerId, uint64_t frameNumber, nsecs_t presentTime,
Ady Abraham8b9e6122021-01-26 19:11:45 -0800103 Fps displayRefreshRate, std::optional<Fps> renderRate,
Adithya Srinivasan58069dc2021-06-04 20:37:02 +0000104 SetFrameRateVote frameRateVote, int32_t gameMode) = 0;
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800105 virtual void setPresentFence(int32_t layerId, uint64_t frameNumber,
Alec Mouri7d436ec2021-01-27 20:40:50 -0800106 const std::shared_ptr<FenceTime>& presentFence,
Ady Abraham8b9e6122021-01-26 19:11:45 -0800107 Fps displayRefreshRate, std::optional<Fps> renderRate,
Adithya Srinivasan58069dc2021-06-04 20:37:02 +0000108 SetFrameRateVote frameRateVote, int32_t gameMode) = 0;
Alec Mouri9a29e672020-09-14 12:39:14 -0700109
Alec Mouri7d436ec2021-01-27 20:40:50 -0800110 // Increments janky frames, blamed to the provided {refreshRate, renderRate, uid, layerName}
111 // key, with JankMetadata as supplementary reasons for the jank. Because FrameTimeline is the
112 // infrastructure responsible for computing jank in the system, this is expected to be called
113 // from FrameTimeline, rather than directly from SurfaceFlinger or individual layers. If there
114 // are no jank reasons, then total frames are incremented but jank is not, for accurate
Alec Mouri9a29e672020-09-14 12:39:14 -0700115 // accounting of janky frames.
Alec Mouri363faf02021-01-29 16:34:55 -0800116 // displayDeadlineDelta, displayPresentJitter, and appDeadlineDelta are also provided in order
117 // to provide contextual information about a janky frame. These values may only be uploaded if
118 // there was an associated valid jank reason, and they must be positive. When these frame counts
119 // are incremented, these are also aggregated into a global reporting packet to help with data
120 // validation and assessing of overall device health.
121 struct JankyFramesInfo {
122 Fps refreshRate;
123 std::optional<Fps> renderRate;
124 uid_t uid = 0;
125 std::string layerName;
Adithya Srinivasan58069dc2021-06-04 20:37:02 +0000126 int32_t gameMode = 0;
Alec Mouri363faf02021-01-29 16:34:55 -0800127 int32_t reasons = 0;
128 nsecs_t displayDeadlineDelta = 0;
129 nsecs_t displayPresentJitter = 0;
130 nsecs_t appDeadlineDelta = 0;
131
Dominik Laskowski6eab42d2021-09-13 14:34:13 -0700132 static bool isOptApproxEqual(std::optional<Fps> lhs, std::optional<Fps> rhs) {
133 return (!lhs && !rhs) || (lhs && rhs && isApproxEqual(*lhs, *rhs));
134 }
135
Alec Mouri363faf02021-01-29 16:34:55 -0800136 bool operator==(const JankyFramesInfo& o) const {
Dominik Laskowski6eab42d2021-09-13 14:34:13 -0700137 return isApproxEqual(refreshRate, o.refreshRate) &&
138 isOptApproxEqual(renderRate, o.renderRate) && uid == o.uid &&
139 layerName == o.layerName && gameMode == o.gameMode && reasons == o.reasons &&
140 displayDeadlineDelta == o.displayDeadlineDelta &&
Alec Mouri363faf02021-01-29 16:34:55 -0800141 displayPresentJitter == o.displayPresentJitter &&
142 appDeadlineDelta == o.appDeadlineDelta;
143 }
144
145 friend std::ostream& operator<<(std::ostream& os, const JankyFramesInfo& info) {
146 os << "JankyFramesInfo {";
147 os << "\n .refreshRate = " << info.refreshRate;
148 os << "\n .renderRate = "
149 << (info.renderRate ? to_string(*info.renderRate) : "nullopt");
150 os << "\n .uid = " << info.uid;
151 os << "\n .layerName = " << info.layerName;
152 os << "\n .reasons = " << info.reasons;
153 os << "\n .displayDeadlineDelta = " << info.displayDeadlineDelta;
154 os << "\n .displayPresentJitter = " << info.displayPresentJitter;
155 os << "\n .appDeadlineDelta = " << info.appDeadlineDelta;
156 return os << "\n}";
157 }
158 };
159
160 virtual void incrementJankyFrames(const JankyFramesInfo& info) = 0;
Alec Mourifb571ea2019-01-24 18:42:10 -0800161 // Clean up the layer record
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800162 virtual void onDestroy(int32_t layerId) = 0;
Alec Mourifb571ea2019-01-24 18:42:10 -0800163 // If SF skips or rejects a buffer, remove the corresponding TimeRecord.
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800164 virtual void removeTimeRecord(int32_t layerId, uint64_t frameNumber) = 0;
Alec Mourifb571ea2019-01-24 18:42:10 -0800165
Peiyong Lin65248e02020-04-18 21:15:07 -0700166 virtual void setPowerMode(
167 hardware::graphics::composer::V2_4::IComposerClient::PowerMode powerMode) = 0;
Alec Mourifb571ea2019-01-24 18:42:10 -0800168 // Source of truth is RefrehRateStats.
169 virtual void recordRefreshRate(uint32_t fps, nsecs_t duration) = 0;
170 virtual void setPresentFenceGlobal(const std::shared_ptr<FenceTime>& presentFence) = 0;
171};
172
173namespace impl {
174
175class TimeStats : public android::TimeStats {
Peiyong Lin65248e02020-04-18 21:15:07 -0700176 using PowerMode = android::hardware::graphics::composer::V2_4::IComposerClient::PowerMode;
177
Yiwei Zhangcf50ab92018-06-14 10:50:12 -0700178 struct FrameTime {
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700179 uint64_t frameNumber = 0;
180 nsecs_t postTime = 0;
181 nsecs_t latchTime = 0;
182 nsecs_t acquireTime = 0;
183 nsecs_t desiredTime = 0;
184 nsecs_t presentTime = 0;
Yiwei Zhangcf50ab92018-06-14 10:50:12 -0700185 };
186
187 struct TimeRecord {
188 bool ready = false;
189 FrameTime frameTime;
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700190 std::shared_ptr<FenceTime> acquireFence;
191 std::shared_ptr<FenceTime> presentFence;
192 };
193
194 struct LayerRecord {
Alec Mouri9a29e672020-09-14 12:39:14 -0700195 uid_t uid;
Yiwei Zhang9689e2f2018-05-11 12:33:23 -0700196 std::string layerName;
Adithya Srinivasan58069dc2021-06-04 20:37:02 +0000197 int32_t gameMode = 0;
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700198 // This is the index in timeRecords, at which the timestamps for that
199 // specific frame are still not fully received. This is not waiting for
200 // fences to signal, but rather waiting to receive those fences/timestamps.
201 int32_t waitData = -1;
Yiwei Zhangeaeea062018-06-28 14:46:51 -0700202 uint32_t droppedFrames = 0;
Alec Mouri91f6df32020-01-30 08:48:58 -0800203 uint32_t lateAcquireFrames = 0;
204 uint32_t badDesiredPresentFrames = 0;
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700205 TimeRecord prevTimeRecord;
Yiwei Zhangc5f2c452018-05-08 16:31:56 -0700206 std::deque<TimeRecord> timeRecords;
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700207 };
208
Yiwei Zhang3a226d22018-10-16 09:23:03 -0700209 struct PowerTime {
Peiyong Lin65248e02020-04-18 21:15:07 -0700210 PowerMode powerMode = PowerMode::OFF;
Yiwei Zhang3a226d22018-10-16 09:23:03 -0700211 nsecs_t prevTime = 0;
212 };
213
Alec Mourie4034bb2019-11-19 12:45:54 -0800214 struct RenderEngineDuration {
215 nsecs_t startTime;
216 std::variant<nsecs_t, std::shared_ptr<FenceTime>> endTime;
217 };
218
Yiwei Zhangce6ebc02018-10-20 12:42:38 -0700219 struct GlobalRecord {
220 nsecs_t prevPresentTime = 0;
221 std::deque<std::shared_ptr<FenceTime>> presentFences;
Alec Mourie4034bb2019-11-19 12:45:54 -0800222 std::deque<RenderEngineDuration> renderEngineDurations;
Yiwei Zhangce6ebc02018-10-20 12:42:38 -0700223 };
224
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700225public:
Alec Mourib3885ad2019-09-06 17:08:55 -0700226 TimeStats();
Alec Mouri8e2f31b2020-01-16 22:04:35 +0000227 // For testing only for injecting custom dependencies.
Tej Singhe2751772021-04-06 22:05:29 -0700228 TimeStats(std::optional<size_t> maxPulledLayers,
Alec Mouri37384342020-01-02 17:23:37 -0800229 std::optional<size_t> maxPulledHistogramBuckets);
Alec Mouri8e2f31b2020-01-16 22:04:35 +0000230
Tej Singhe2751772021-04-06 22:05:29 -0700231 bool onPullAtom(const int atomId, std::string* pulledData) override;
Alec Mourifb571ea2019-01-24 18:42:10 -0800232 void parseArgs(bool asProto, const Vector<String16>& args, std::string& result) override;
233 bool isEnabled() override;
Yiwei Zhang7eb58b72019-04-22 19:00:02 -0700234 std::string miniDump() override;
Yiwei Zhang7e666a52018-11-15 13:33:42 -0800235
Alec Mourifb571ea2019-01-24 18:42:10 -0800236 void incrementTotalFrames() override;
237 void incrementMissedFrames() override;
238 void incrementClientCompositionFrames() override;
Vishnu Nair9b079a22020-01-21 14:36:08 -0800239 void incrementClientCompositionReusedFrames() override;
Alec Mouri8de697e2020-03-19 10:52:01 -0700240 void incrementRefreshRateSwitches() override;
Alec Mouri8f7a0102020-04-15 12:11:10 -0700241 void incrementCompositionStrategyChanges() override;
Alec Mouri717bcb62020-02-10 17:07:19 -0800242 void recordDisplayEventConnectionCount(int32_t count) override;
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700243
Alec Mouri9519bf12019-11-15 16:54:44 -0800244 void recordFrameDuration(nsecs_t startTime, nsecs_t endTime) override;
Alec Mourie4034bb2019-11-19 12:45:54 -0800245 void recordRenderEngineDuration(nsecs_t startTime, nsecs_t endTime) override;
246 void recordRenderEngineDuration(nsecs_t startTime,
247 const std::shared_ptr<FenceTime>& readyFence) override;
Alec Mouri9519bf12019-11-15 16:54:44 -0800248
Alec Mouri9a29e672020-09-14 12:39:14 -0700249 void setPostTime(int32_t layerId, uint64_t frameNumber, const std::string& layerName, uid_t uid,
Adithya Srinivasan58069dc2021-06-04 20:37:02 +0000250 nsecs_t postTime, int32_t gameMode) override;
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800251 void setLatchTime(int32_t layerId, uint64_t frameNumber, nsecs_t latchTime) override;
Alec Mouri91f6df32020-01-30 08:48:58 -0800252 void incrementLatchSkipped(int32_t layerId, LatchSkipReason reason) override;
253 void incrementBadDesiredPresent(int32_t layerId) override;
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800254 void setDesiredTime(int32_t layerId, uint64_t frameNumber, nsecs_t desiredTime) override;
255 void setAcquireTime(int32_t layerId, uint64_t frameNumber, nsecs_t acquireTime) override;
256 void setAcquireFence(int32_t layerId, uint64_t frameNumber,
Alec Mourifb571ea2019-01-24 18:42:10 -0800257 const std::shared_ptr<FenceTime>& acquireFence) override;
Alec Mouri7d436ec2021-01-27 20:40:50 -0800258 void setPresentTime(int32_t layerId, uint64_t frameNumber, nsecs_t presentTime,
Ady Abraham8b9e6122021-01-26 19:11:45 -0800259 Fps displayRefreshRate, std::optional<Fps> renderRate,
Adithya Srinivasan58069dc2021-06-04 20:37:02 +0000260 SetFrameRateVote frameRateVote, int32_t gameMode) override;
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800261 void setPresentFence(int32_t layerId, uint64_t frameNumber,
Alec Mouri7d436ec2021-01-27 20:40:50 -0800262 const std::shared_ptr<FenceTime>& presentFence, Fps displayRefreshRate,
Adithya Srinivasan58069dc2021-06-04 20:37:02 +0000263 std::optional<Fps> renderRate, SetFrameRateVote frameRateVote,
264 int32_t gameMode) override;
Alec Mouri363faf02021-01-29 16:34:55 -0800265
266 void incrementJankyFrames(const JankyFramesInfo& info) override;
Yiwei Zhangaf8ee942018-11-22 00:15:23 -0800267 // Clean up the layer record
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800268 void onDestroy(int32_t layerId) override;
Yiwei Zhangeaeea062018-06-28 14:46:51 -0700269 // If SF skips or rejects a buffer, remove the corresponding TimeRecord.
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800270 void removeTimeRecord(int32_t layerId, uint64_t frameNumber) override;
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700271
Peiyong Lin65248e02020-04-18 21:15:07 -0700272 void setPowerMode(
273 hardware::graphics::composer::V2_4::IComposerClient::PowerMode powerMode) override;
Alec Mourifb571ea2019-01-24 18:42:10 -0800274 // Source of truth is RefrehRateStats.
275 void recordRefreshRate(uint32_t fps, nsecs_t duration) override;
276 void setPresentFenceGlobal(const std::shared_ptr<FenceTime>& presentFence) override;
Yiwei Zhang3a226d22018-10-16 09:23:03 -0700277
Yiwei Zhangaf8ee942018-11-22 00:15:23 -0800278 static const size_t MAX_NUM_TIME_RECORDS = 64;
279
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700280private:
Tej Singhe2751772021-04-06 22:05:29 -0700281 bool populateGlobalAtom(std::string* pulledData);
282 bool populateLayerAtom(std::string* pulledData);
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800283 bool recordReadyLocked(int32_t layerId, TimeRecord* timeRecord);
Alec Mouri7d436ec2021-01-27 20:40:50 -0800284 void flushAvailableRecordsToStatsLocked(int32_t layerId, Fps displayRefreshRate,
Ady Abraham8b9e6122021-01-26 19:11:45 -0800285 std::optional<Fps> renderRate,
Adithya Srinivasan58069dc2021-06-04 20:37:02 +0000286 SetFrameRateVote frameRateVote, int32_t gameMode);
Yiwei Zhang3a226d22018-10-16 09:23:03 -0700287 void flushPowerTimeLocked();
Yiwei Zhangce6ebc02018-10-20 12:42:38 -0700288 void flushAvailableGlobalRecordsToStatsLocked();
Adithya Srinivasan58069dc2021-06-04 20:37:02 +0000289 bool canAddNewAggregatedStats(uid_t uid, const std::string& layerName, int32_t gameMode);
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700290
291 void enable();
292 void disable();
Alec Mouri8e2f31b2020-01-16 22:04:35 +0000293 void clearAll();
294 void clearGlobalLocked();
295 void clearLayersLocked();
Yiwei Zhang5434a782018-12-05 18:06:32 -0800296 void dump(bool asProto, std::optional<uint32_t> maxLayers, std::string& result);
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700297
298 std::atomic<bool> mEnabled = false;
299 std::mutex mMutex;
Yiwei Zhangdc224042018-10-18 15:34:00 -0700300 TimeStatsHelper::TimeStatsGlobal mTimeStats;
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800301 // Hashmap for LayerRecord with layerId as the hash key
Yiwei Zhang9689e2f2018-05-11 12:33:23 -0700302 std::unordered_map<int32_t, LayerRecord> mTimeStatsTracker;
Yiwei Zhang3a226d22018-10-16 09:23:03 -0700303 PowerTime mPowerTime;
Yiwei Zhangce6ebc02018-10-20 12:42:38 -0700304 GlobalRecord mGlobalRecord;
Yiwei Zhang7eb58b72019-04-22 19:00:02 -0700305
306 static const size_t MAX_NUM_LAYER_RECORDS = 200;
Alec Mouri7d436ec2021-01-27 20:40:50 -0800307
308 static const size_t REFRESH_RATE_BUCKET_WIDTH = 30;
309 static const size_t RENDER_RATE_BUCKET_WIDTH = REFRESH_RATE_BUCKET_WIDTH;
Yiwei Zhange926ab52019-08-14 15:16:00 -0700310 static const size_t MAX_NUM_LAYER_STATS = 200;
Alec Mouri52bf7802021-01-20 08:20:50 -0800311 static const size_t MAX_NUM_PULLED_LAYERS = MAX_NUM_LAYER_STATS;
Alec Mouri52bf7802021-01-20 08:20:50 -0800312 size_t mMaxPulledLayers = MAX_NUM_PULLED_LAYERS;
Alec Mouri37384342020-01-02 17:23:37 -0800313 size_t mMaxPulledHistogramBuckets = 6;
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700314};
315
Alec Mourifb571ea2019-01-24 18:42:10 -0800316} // namespace impl
317
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700318} // namespace android