Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2020 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 | |
Dominik Laskowski | f6b4ba6 | 2021-11-09 12:46:10 -0800 | [diff] [blame^] | 19 | #include <chrono> |
| 20 | #include <deque> |
| 21 | #include <optional> |
| 22 | #include <string> |
| 23 | #include <unordered_map> |
| 24 | |
Ady Abraham | bdda8f0 | 2021-04-01 16:06:11 -0700 | [diff] [blame] | 25 | #include <ui/Transform.h> |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 26 | #include <utils/Timers.h> |
| 27 | |
Dominik Laskowski | f6b4ba6 | 2021-11-09 12:46:10 -0800 | [diff] [blame^] | 28 | #include <scheduler/Seamlessness.h> |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 29 | |
| 30 | #include "LayerHistory.h" |
| 31 | #include "RefreshRateConfigs.h" |
| 32 | #include "SchedulerUtils.h" |
| 33 | |
| 34 | namespace android { |
| 35 | |
| 36 | class Layer; |
| 37 | |
| 38 | namespace scheduler { |
| 39 | |
| 40 | using namespace std::chrono_literals; |
| 41 | |
| 42 | // Maximum period between presents for a layer to be considered active. |
| 43 | constexpr std::chrono::nanoseconds MAX_ACTIVE_LAYER_PERIOD_NS = 1200ms; |
| 44 | |
| 45 | // Earliest present time for a layer to be considered active. |
| 46 | constexpr nsecs_t getActiveLayerThreshold(nsecs_t now) { |
| 47 | return now - MAX_ACTIVE_LAYER_PERIOD_NS.count(); |
| 48 | } |
| 49 | |
| 50 | // Stores history of present times and refresh rates for a layer. |
Marin Shalamanov | 1bc43ee | 2020-11-20 16:56:52 +0100 | [diff] [blame] | 51 | class LayerInfo { |
Ady Abraham | 5def733 | 2020-05-29 16:13:47 -0700 | [diff] [blame] | 52 | using LayerUpdateType = LayerHistory::LayerUpdateType; |
| 53 | |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 54 | // Layer is considered frequent if the earliest value in the window of most recent present times |
| 55 | // is within a threshold. If a layer is infrequent, its average refresh rate is disregarded in |
| 56 | // favor of a low refresh rate. |
Marin Shalamanov | 2045d5b | 2020-12-28 18:11:41 +0100 | [diff] [blame] | 57 | static constexpr size_t kFrequentLayerWindowSize = 3; |
Dominik Laskowski | 6eab42d | 2021-09-13 14:34:13 -0700 | [diff] [blame] | 58 | static constexpr Fps kMinFpsForFrequentLayer = 10_Hz; |
Marin Shalamanov | 2045d5b | 2020-12-28 18:11:41 +0100 | [diff] [blame] | 59 | static constexpr auto kMaxPeriodForFrequentLayerNs = |
| 60 | std::chrono::nanoseconds(kMinFpsForFrequentLayer.getPeriodNsecs()) + 1ms; |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 61 | |
Marin Shalamanov | 1bc43ee | 2020-11-20 16:56:52 +0100 | [diff] [blame] | 62 | friend class LayerHistoryTest; |
Marin Shalamanov | 2045d5b | 2020-12-28 18:11:41 +0100 | [diff] [blame] | 63 | friend class LayerInfoTest; |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 64 | |
| 65 | public: |
Marin Shalamanov | 4608442 | 2020-10-13 12:33:42 +0200 | [diff] [blame] | 66 | // Holds information about the layer vote |
| 67 | struct LayerVote { |
| 68 | LayerHistory::LayerVoteType type = LayerHistory::LayerVoteType::Heuristic; |
Dominik Laskowski | 6eab42d | 2021-09-13 14:34:13 -0700 | [diff] [blame] | 69 | Fps fps; |
Marin Shalamanov | 53fc11d | 2020-11-20 14:00:13 +0100 | [diff] [blame] | 70 | Seamlessness seamlessness = Seamlessness::Default; |
Marin Shalamanov | 4608442 | 2020-10-13 12:33:42 +0200 | [diff] [blame] | 71 | }; |
| 72 | |
Ady Abraham | bdda8f0 | 2021-04-01 16:06:11 -0700 | [diff] [blame] | 73 | // FrameRateCompatibility specifies how we should interpret the frame rate associated with |
| 74 | // the layer. |
| 75 | enum class FrameRateCompatibility { |
| 76 | Default, // Layer didn't specify any specific handling strategy |
| 77 | |
| 78 | Exact, // Layer needs the exact frame rate. |
| 79 | |
| 80 | ExactOrMultiple, // Layer needs the exact frame rate (or a multiple of it) to present the |
| 81 | // content properly. Any other value will result in a pull down. |
| 82 | |
| 83 | NoVote, // Layer doesn't have any requirements for the refresh rate and |
| 84 | // should not be considered when the display refresh rate is determined. |
| 85 | }; |
| 86 | |
| 87 | // Encapsulates the frame rate and compatibility of the layer. This information will be used |
| 88 | // when the display refresh rate is determined. |
| 89 | struct FrameRate { |
| 90 | using Seamlessness = scheduler::Seamlessness; |
| 91 | |
| 92 | Fps rate; |
Dominik Laskowski | 6eab42d | 2021-09-13 14:34:13 -0700 | [diff] [blame] | 93 | FrameRateCompatibility type = FrameRateCompatibility::Default; |
| 94 | Seamlessness seamlessness = Seamlessness::Default; |
Ady Abraham | bdda8f0 | 2021-04-01 16:06:11 -0700 | [diff] [blame] | 95 | |
Dominik Laskowski | 6eab42d | 2021-09-13 14:34:13 -0700 | [diff] [blame] | 96 | FrameRate() = default; |
| 97 | |
Ady Abraham | bdda8f0 | 2021-04-01 16:06:11 -0700 | [diff] [blame] | 98 | FrameRate(Fps rate, FrameRateCompatibility type, |
| 99 | Seamlessness seamlessness = Seamlessness::OnlySeamless) |
| 100 | : rate(rate), type(type), seamlessness(getSeamlessness(rate, seamlessness)) {} |
| 101 | |
| 102 | bool operator==(const FrameRate& other) const { |
Dominik Laskowski | 6eab42d | 2021-09-13 14:34:13 -0700 | [diff] [blame] | 103 | return isApproxEqual(rate, other.rate) && type == other.type && |
Ady Abraham | bdda8f0 | 2021-04-01 16:06:11 -0700 | [diff] [blame] | 104 | seamlessness == other.seamlessness; |
| 105 | } |
| 106 | |
| 107 | bool operator!=(const FrameRate& other) const { return !(*this == other); } |
| 108 | |
| 109 | // Convert an ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_* value to a |
| 110 | // Layer::FrameRateCompatibility. Logs fatal if the compatibility value is invalid. |
| 111 | static FrameRateCompatibility convertCompatibility(int8_t compatibility); |
| 112 | static scheduler::Seamlessness convertChangeFrameRateStrategy(int8_t strategy); |
| 113 | |
| 114 | private: |
| 115 | static Seamlessness getSeamlessness(Fps rate, Seamlessness seamlessness) { |
| 116 | if (!rate.isValid()) { |
| 117 | // Refresh rate of 0 is a special value which should reset the vote to |
| 118 | // its default value. |
| 119 | return Seamlessness::Default; |
| 120 | } |
| 121 | return seamlessness; |
| 122 | } |
| 123 | }; |
| 124 | |
Ady Abraham | 0ccd79b | 2020-06-10 10:11:17 -0700 | [diff] [blame] | 125 | static void setTraceEnabled(bool enabled) { sTraceEnabled = enabled; } |
| 126 | |
Ady Abraham | bdda8f0 | 2021-04-01 16:06:11 -0700 | [diff] [blame] | 127 | LayerInfo(const std::string& name, uid_t ownerUid, LayerHistory::LayerVoteType defaultVote); |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 128 | |
Marin Shalamanov | 1bc43ee | 2020-11-20 16:56:52 +0100 | [diff] [blame] | 129 | LayerInfo(const LayerInfo&) = delete; |
| 130 | LayerInfo& operator=(const LayerInfo&) = delete; |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 131 | |
Ady Abraham | bdda8f0 | 2021-04-01 16:06:11 -0700 | [diff] [blame] | 132 | struct LayerProps { |
| 133 | bool visible = false; |
| 134 | FloatRect bounds; |
| 135 | ui::Transform transform; |
| 136 | FrameRate setFrameRateVote; |
| 137 | int32_t frameRateSelectionPriority = -1; |
| 138 | }; |
| 139 | |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 140 | // Records the last requested present time. It also stores information about when |
| 141 | // the layer was last updated. If the present time is farther in the future than the |
| 142 | // updated time, the updated time is the present time. |
Ady Abraham | 5def733 | 2020-05-29 16:13:47 -0700 | [diff] [blame] | 143 | void setLastPresentTime(nsecs_t lastPresentTime, nsecs_t now, LayerUpdateType updateType, |
Ady Abraham | bdda8f0 | 2021-04-01 16:06:11 -0700 | [diff] [blame] | 144 | bool pendingModeChange, LayerProps props); |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 145 | |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 146 | // Sets an explicit layer vote. This usually comes directly from the application via |
| 147 | // ANativeWindow_setFrameRate API |
Marin Shalamanov | 4608442 | 2020-10-13 12:33:42 +0200 | [diff] [blame] | 148 | void setLayerVote(LayerVote vote) { mLayerVote = vote; } |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 149 | |
| 150 | // Sets the default layer vote. This will be the layer vote after calling to resetLayerVote(). |
| 151 | // This is used for layers that called to setLayerVote() and then removed the vote, so that the |
| 152 | // layer can go back to whatever vote it had before the app voted for it. |
| 153 | void setDefaultLayerVote(LayerHistory::LayerVoteType type) { mDefaultVote = type; } |
| 154 | |
| 155 | // Resets the layer vote to its default. |
Dominik Laskowski | 6eab42d | 2021-09-13 14:34:13 -0700 | [diff] [blame] | 156 | void resetLayerVote() { mLayerVote = {mDefaultVote, Fps(), Seamlessness::Default}; } |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 157 | |
Ady Abraham | bdda8f0 | 2021-04-01 16:06:11 -0700 | [diff] [blame] | 158 | std::string getName() const { return mName; } |
| 159 | |
| 160 | uid_t getOwnerUid() const { return mOwnerUid; } |
| 161 | |
Ady Abraham | 3efa394 | 2021-06-24 19:01:25 -0700 | [diff] [blame] | 162 | LayerVote getRefreshRateVote(const RefreshRateConfigs&, nsecs_t now); |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 163 | |
| 164 | // Return the last updated time. If the present time is farther in the future than the |
| 165 | // updated time, the updated time is the present time. |
| 166 | nsecs_t getLastUpdatedTime() const { return mLastUpdatedTime; } |
| 167 | |
Ady Abraham | bdda8f0 | 2021-04-01 16:06:11 -0700 | [diff] [blame] | 168 | FrameRate getSetFrameRateVote() const { return mLayerProps.setFrameRateVote; } |
| 169 | bool isVisible() const { return mLayerProps.visible; } |
| 170 | int32_t getFrameRateSelectionPriority() const { return mLayerProps.frameRateSelectionPriority; } |
| 171 | |
| 172 | FloatRect getBounds() const { return mLayerProps.bounds; } |
| 173 | |
| 174 | ui::Transform getTransform() const { return mLayerProps.transform; } |
| 175 | |
Ady Abraham | 0ccd79b | 2020-06-10 10:11:17 -0700 | [diff] [blame] | 176 | // Returns a C string for tracing a vote |
| 177 | const char* getTraceTag(LayerHistory::LayerVoteType type) const; |
| 178 | |
Ady Abraham | 983e568 | 2020-05-28 16:49:18 -0700 | [diff] [blame] | 179 | void onLayerInactive(nsecs_t now) { |
Ady Abraham | dfb63ba | 2020-05-27 20:05:05 +0000 | [diff] [blame] | 180 | // Mark mFrameTimeValidSince to now to ignore all previous frame times. |
| 181 | // We are not deleting the old frame to keep track of whether we should treat the first |
| 182 | // buffer as Max as we don't know anything about this layer or Min as this layer is |
| 183 | // posting infrequent updates. |
Ady Abraham | 983e568 | 2020-05-28 16:49:18 -0700 | [diff] [blame] | 184 | const auto timePoint = std::chrono::nanoseconds(now); |
| 185 | mFrameTimeValidSince = std::chrono::time_point<std::chrono::steady_clock>(timePoint); |
Ady Abraham | b1b9d41 | 2020-06-01 19:53:52 -0700 | [diff] [blame] | 186 | mLastRefreshRate = {}; |
Ady Abraham | 0ccd79b | 2020-06-10 10:11:17 -0700 | [diff] [blame] | 187 | mRefreshRateHistory.clear(); |
Ady Abraham | a61edcb | 2020-01-30 18:32:03 -0800 | [diff] [blame] | 188 | } |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 189 | |
Ady Abraham | 983e568 | 2020-05-28 16:49:18 -0700 | [diff] [blame] | 190 | void clearHistory(nsecs_t now) { |
| 191 | onLayerInactive(now); |
| 192 | mFrameTimes.clear(); |
| 193 | } |
| 194 | |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 195 | private: |
Ady Abraham | a61edcb | 2020-01-30 18:32:03 -0800 | [diff] [blame] | 196 | // Used to store the layer timestamps |
| 197 | struct FrameTimeData { |
Marin Shalamanov | 2045d5b | 2020-12-28 18:11:41 +0100 | [diff] [blame] | 198 | nsecs_t presentTime; // desiredPresentTime, if provided |
Ady Abraham | a61edcb | 2020-01-30 18:32:03 -0800 | [diff] [blame] | 199 | nsecs_t queueTime; // buffer queue time |
Marin Shalamanov | a7fe304 | 2021-01-29 21:02:08 +0100 | [diff] [blame] | 200 | bool pendingModeChange; |
Ady Abraham | a61edcb | 2020-01-30 18:32:03 -0800 | [diff] [blame] | 201 | }; |
| 202 | |
Ady Abraham | 0ccd79b | 2020-06-10 10:11:17 -0700 | [diff] [blame] | 203 | // Holds information about the calculated and reported refresh rate |
| 204 | struct RefreshRateHeuristicData { |
| 205 | // Rate calculated on the layer |
Dominik Laskowski | 6eab42d | 2021-09-13 14:34:13 -0700 | [diff] [blame] | 206 | Fps calculated; |
Marin Shalamanov | 1bc43ee | 2020-11-20 16:56:52 +0100 | [diff] [blame] | 207 | // Last reported rate for LayerInfo::getRefreshRate() |
Dominik Laskowski | 6eab42d | 2021-09-13 14:34:13 -0700 | [diff] [blame] | 208 | Fps reported; |
Marin Shalamanov | 1bc43ee | 2020-11-20 16:56:52 +0100 | [diff] [blame] | 209 | // Whether the last reported rate for LayerInfo::getRefreshRate() |
Ady Abraham | 0ccd79b | 2020-06-10 10:11:17 -0700 | [diff] [blame] | 210 | // was due to animation or infrequent updates |
| 211 | bool animatingOrInfrequent = false; |
| 212 | }; |
| 213 | |
Ady Abraham | 0ccd79b | 2020-06-10 10:11:17 -0700 | [diff] [blame] | 214 | // Class to store past calculated refresh rate and determine whether |
| 215 | // the refresh rate calculated is consistent with past values |
| 216 | class RefreshRateHistory { |
| 217 | public: |
| 218 | static constexpr auto HISTORY_SIZE = 90; |
| 219 | static constexpr std::chrono::nanoseconds HISTORY_DURATION = 2s; |
| 220 | |
| 221 | RefreshRateHistory(const std::string& name) : mName(name) {} |
| 222 | |
| 223 | // Clears History |
| 224 | void clear(); |
| 225 | |
| 226 | // Adds a new refresh rate and returns true if it is consistent |
Marin Shalamanov | e8a663d | 2020-11-24 17:48:00 +0100 | [diff] [blame] | 227 | bool add(Fps refreshRate, nsecs_t now); |
Ady Abraham | 0ccd79b | 2020-06-10 10:11:17 -0700 | [diff] [blame] | 228 | |
| 229 | private: |
Marin Shalamanov | 1bc43ee | 2020-11-20 16:56:52 +0100 | [diff] [blame] | 230 | friend class LayerHistoryTest; |
Ady Abraham | 0ccd79b | 2020-06-10 10:11:17 -0700 | [diff] [blame] | 231 | |
| 232 | // Holds the refresh rate when it was calculated |
| 233 | struct RefreshRateData { |
Dominik Laskowski | 6eab42d | 2021-09-13 14:34:13 -0700 | [diff] [blame] | 234 | Fps refreshRate; |
Ady Abraham | 0ccd79b | 2020-06-10 10:11:17 -0700 | [diff] [blame] | 235 | nsecs_t timestamp = 0; |
Ady Abraham | 0ccd79b | 2020-06-10 10:11:17 -0700 | [diff] [blame] | 236 | }; |
| 237 | |
| 238 | // Holds tracing strings |
| 239 | struct HeuristicTraceTagData { |
| 240 | std::string min; |
| 241 | std::string max; |
| 242 | std::string consistent; |
| 243 | std::string average; |
| 244 | }; |
| 245 | |
| 246 | bool isConsistent() const; |
| 247 | HeuristicTraceTagData makeHeuristicTraceTagData() const; |
| 248 | |
| 249 | const std::string mName; |
| 250 | mutable std::optional<HeuristicTraceTagData> mHeuristicTraceTagData; |
| 251 | std::deque<RefreshRateData> mRefreshRates; |
Marin Shalamanov | e8a663d | 2020-11-24 17:48:00 +0100 | [diff] [blame] | 252 | static constexpr float MARGIN_CONSISTENT_FPS = 1.0; |
Ady Abraham | 0ccd79b | 2020-06-10 10:11:17 -0700 | [diff] [blame] | 253 | }; |
| 254 | |
Ady Abraham | af6d8a4 | 2020-05-27 19:56:15 +0000 | [diff] [blame] | 255 | bool isFrequent(nsecs_t now) const; |
Ady Abraham | 5def733 | 2020-05-29 16:13:47 -0700 | [diff] [blame] | 256 | bool isAnimating(nsecs_t now) const; |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 257 | bool hasEnoughDataForHeuristic() const; |
Ady Abraham | 3efa394 | 2021-06-24 19:01:25 -0700 | [diff] [blame] | 258 | std::optional<Fps> calculateRefreshRateIfPossible(const RefreshRateConfigs&, nsecs_t now); |
Ady Abraham | 0ccd79b | 2020-06-10 10:11:17 -0700 | [diff] [blame] | 259 | std::optional<nsecs_t> calculateAverageFrameTime() const; |
Ady Abraham | dfb63ba | 2020-05-27 20:05:05 +0000 | [diff] [blame] | 260 | bool isFrameTimeValid(const FrameTimeData&) const; |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 261 | |
Ady Abraham | a6b676e | 2020-05-27 14:29:09 -0700 | [diff] [blame] | 262 | const std::string mName; |
Ady Abraham | bdda8f0 | 2021-04-01 16:06:11 -0700 | [diff] [blame] | 263 | const uid_t mOwnerUid; |
Ady Abraham | a6b676e | 2020-05-27 14:29:09 -0700 | [diff] [blame] | 264 | |
Marin Shalamanov | 4ad8b30 | 2020-12-11 15:50:08 +0100 | [diff] [blame] | 265 | // Used for sanitizing the heuristic data. If two frames are less than |
| 266 | // this period apart from each other they'll be considered as duplicates. |
Dominik Laskowski | 6eab42d | 2021-09-13 14:34:13 -0700 | [diff] [blame] | 267 | static constexpr nsecs_t kMinPeriodBetweenFrames = (240_Hz).getPeriodNsecs(); |
Marin Shalamanov | 2045d5b | 2020-12-28 18:11:41 +0100 | [diff] [blame] | 268 | // Used for sanitizing the heuristic data. If two frames are more than |
| 269 | // this period apart from each other, the interval between them won't be |
| 270 | // taken into account when calculating average frame rate. |
| 271 | static constexpr nsecs_t kMaxPeriodBetweenFrames = kMinFpsForFrequentLayer.getPeriodNsecs(); |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 272 | LayerHistory::LayerVoteType mDefaultVote; |
| 273 | |
Ady Abraham | 0ccd79b | 2020-06-10 10:11:17 -0700 | [diff] [blame] | 274 | LayerVote mLayerVote; |
| 275 | |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 276 | nsecs_t mLastUpdatedTime = 0; |
| 277 | |
Ady Abraham | 5def733 | 2020-05-29 16:13:47 -0700 | [diff] [blame] | 278 | nsecs_t mLastAnimationTime = 0; |
| 279 | |
Ady Abraham | b1b9d41 | 2020-06-01 19:53:52 -0700 | [diff] [blame] | 280 | RefreshRateHeuristicData mLastRefreshRate; |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 281 | |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 282 | std::deque<FrameTimeData> mFrameTimes; |
Ady Abraham | dfb63ba | 2020-05-27 20:05:05 +0000 | [diff] [blame] | 283 | std::chrono::time_point<std::chrono::steady_clock> mFrameTimeValidSince = |
| 284 | std::chrono::steady_clock::now(); |
Ady Abraham | 0ccd79b | 2020-06-10 10:11:17 -0700 | [diff] [blame] | 285 | static constexpr size_t HISTORY_SIZE = RefreshRateHistory::HISTORY_SIZE; |
| 286 | static constexpr std::chrono::nanoseconds HISTORY_DURATION = 1s; |
| 287 | |
Ady Abraham | bdda8f0 | 2021-04-01 16:06:11 -0700 | [diff] [blame] | 288 | LayerProps mLayerProps; |
| 289 | |
Ady Abraham | 0ccd79b | 2020-06-10 10:11:17 -0700 | [diff] [blame] | 290 | RefreshRateHistory mRefreshRateHistory; |
| 291 | |
| 292 | mutable std::unordered_map<LayerHistory::LayerVoteType, std::string> mTraceTags; |
Ady Abraham | b1b9d41 | 2020-06-01 19:53:52 -0700 | [diff] [blame] | 293 | |
| 294 | // Shared for all LayerInfo instances |
Ady Abraham | 0ccd79b | 2020-06-10 10:11:17 -0700 | [diff] [blame] | 295 | static bool sTraceEnabled; |
Ady Abraham | 8a82ba6 | 2020-01-17 12:43:17 -0800 | [diff] [blame] | 296 | }; |
| 297 | |
| 298 | } // namespace scheduler |
| 299 | } // namespace android |