blob: 9e5b4bd1f0502812ff7c64027313643cce8c55d2 [file] [log] [blame]
Ady Abraham8a82ba62020-01-17 12:43:17 -08001/*
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
Marin Shalamanovbed7fd32020-12-21 20:02:20 +010017// TODO(b/129481165): remove the #pragma below and fix conversion issues
18#pragma clang diagnostic push
19#pragma clang diagnostic ignored "-Wextra"
20
Ady Abraham8a82ba62020-01-17 12:43:17 -080021// #define LOG_NDEBUG 0
Ady Abraham0ccd79b2020-06-10 10:11:17 -070022#define ATRACE_TAG ATRACE_TAG_GRAPHICS
Ady Abraham8a82ba62020-01-17 12:43:17 -080023
Marin Shalamanov1bc43ee2020-11-20 16:56:52 +010024#include "LayerInfo.h"
Ady Abraham8a82ba62020-01-17 12:43:17 -080025
26#include <algorithm>
27#include <utility>
28
Ady Abraham0ccd79b2020-06-10 10:11:17 -070029#include <cutils/compiler.h>
30#include <cutils/trace.h>
Dominik Laskowskif5d0ea52021-09-26 17:27:01 -070031#include <ftl/enum.h>
Ady Abraham0ccd79b2020-06-10 10:11:17 -070032
Ady Abraham8a82ba62020-01-17 12:43:17 -080033#undef LOG_TAG
Marin Shalamanov1bc43ee2020-11-20 16:56:52 +010034#define LOG_TAG "LayerInfo"
Ady Abraham8a82ba62020-01-17 12:43:17 -080035
36namespace android::scheduler {
37
Marin Shalamanov1bc43ee2020-11-20 16:56:52 +010038bool LayerInfo::sTraceEnabled = false;
Ady Abrahamb1b9d412020-06-01 19:53:52 -070039
Ady Abrahambdda8f02021-04-01 16:06:11 -070040LayerInfo::LayerInfo(const std::string& name, uid_t ownerUid,
41 LayerHistory::LayerVoteType defaultVote)
Ady Abrahama6b676e2020-05-27 14:29:09 -070042 : mName(name),
Ady Abrahambdda8f02021-04-01 16:06:11 -070043 mOwnerUid(ownerUid),
Ady Abraham8a82ba62020-01-17 12:43:17 -080044 mDefaultVote(defaultVote),
Dominik Laskowski6eab42d2021-09-13 14:34:13 -070045 mLayerVote({defaultVote, Fps()}),
Ady Abraham0ccd79b2020-06-10 10:11:17 -070046 mRefreshRateHistory(name) {}
Ady Abraham8a82ba62020-01-17 12:43:17 -080047
Marin Shalamanov1bc43ee2020-11-20 16:56:52 +010048void LayerInfo::setLastPresentTime(nsecs_t lastPresentTime, nsecs_t now, LayerUpdateType updateType,
Ady Abrahambdda8f02021-04-01 16:06:11 -070049 bool pendingModeChange, LayerProps props) {
Ady Abraham8a82ba62020-01-17 12:43:17 -080050 lastPresentTime = std::max(lastPresentTime, static_cast<nsecs_t>(0));
51
52 mLastUpdatedTime = std::max(lastPresentTime, now);
Ady Abrahambdda8f02021-04-01 16:06:11 -070053 mLayerProps = props;
Ady Abraham5def7332020-05-29 16:13:47 -070054 switch (updateType) {
55 case LayerUpdateType::AnimationTX:
56 mLastAnimationTime = std::max(lastPresentTime, now);
57 break;
58 case LayerUpdateType::SetFrameRate:
59 case LayerUpdateType::Buffer:
Marin Shalamanov2045d5b2020-12-28 18:11:41 +010060 FrameTimeData frameTime = {.presentTime = lastPresentTime,
Ady Abraham5def7332020-05-29 16:13:47 -070061 .queueTime = mLastUpdatedTime,
Marin Shalamanova7fe3042021-01-29 21:02:08 +010062 .pendingModeChange = pendingModeChange};
Ady Abraham5def7332020-05-29 16:13:47 -070063 mFrameTimes.push_back(frameTime);
64 if (mFrameTimes.size() > HISTORY_SIZE) {
65 mFrameTimes.pop_front();
66 }
67 break;
Ady Abraham8a82ba62020-01-17 12:43:17 -080068 }
69}
70
Marin Shalamanov1bc43ee2020-11-20 16:56:52 +010071bool LayerInfo::isFrameTimeValid(const FrameTimeData& frameTime) const {
Ady Abrahamdfb63ba2020-05-27 20:05:05 +000072 return frameTime.queueTime >= std::chrono::duration_cast<std::chrono::nanoseconds>(
73 mFrameTimeValidSince.time_since_epoch())
74 .count();
75}
Ady Abraham1adbb722020-05-15 11:51:48 -070076
Marin Shalamanov1bc43ee2020-11-20 16:56:52 +010077bool LayerInfo::isFrequent(nsecs_t now) const {
Nathaniel Nifong1303d912021-10-06 09:41:24 -040078 using fps_approx_ops::operator>=;
Ady Abraham86ac5c52023-01-11 15:24:03 -080079 // If we know nothing about this layer (e.g. after touch event),
80 // we consider it as frequent as it might be the start of an animation.
Marin Shalamanov2045d5b2020-12-28 18:11:41 +010081 if (mFrameTimes.size() < kFrequentLayerWindowSize) {
Ady Abrahamdfb63ba2020-05-27 20:05:05 +000082 return true;
83 }
Ady Abraham86ac5c52023-01-11 15:24:03 -080084
85 // Non-active layers are also infrequent
86 if (mLastUpdatedTime < getActiveLayerThreshold(now)) {
87 return false;
88 }
89
90 // We check whether we can classify this layer as frequent or infrequent:
91 // - frequent: a layer posted kFrequentLayerWindowSize within
92 // kMaxPeriodForFrequentLayerNs of each other.
93 // - infrequent: a layer posted kFrequentLayerWindowSize with longer
94 // gaps than kFrequentLayerWindowSize.
95 // If we can't determine the layer classification yet, we return the last
96 // classification.
97 bool isFrequent = true;
98 bool isInfrequent = true;
99 const auto n = mFrameTimes.size() - 1;
100 for (size_t i = 0; i < kFrequentLayerWindowSize - 1; i++) {
101 if (mFrameTimes[n - i].queueTime - mFrameTimes[n - i - 1].queueTime <
102 kMaxPeriodForFrequentLayerNs.count()) {
103 isInfrequent = false;
104 } else {
105 isFrequent = false;
106 }
107 }
108
109 if (isFrequent || isInfrequent) {
110 return isFrequent;
111 }
112
113 // If we can't determine whether the layer is frequent or not, we return
114 // the last known classification.
115 return !mLastRefreshRate.infrequent;
Nathaniel Nifong1303d912021-10-06 09:41:24 -0400116}
Ady Abrahamdfb63ba2020-05-27 20:05:05 +0000117
Nathaniel Nifong1303d912021-10-06 09:41:24 -0400118Fps LayerInfo::getFps(nsecs_t now) const {
Ady Abrahamdfb63ba2020-05-27 20:05:05 +0000119 // Find the first active frame
Ady Abraham983e5682020-05-28 16:49:18 -0700120 auto it = mFrameTimes.begin();
Ady Abrahamdfb63ba2020-05-27 20:05:05 +0000121 for (; it != mFrameTimes.end(); ++it) {
122 if (it->queueTime >= getActiveLayerThreshold(now)) {
123 break;
124 }
125 }
126
127 const auto numFrames = std::distance(it, mFrameTimes.end());
Marin Shalamanov2045d5b2020-12-28 18:11:41 +0100128 if (numFrames < kFrequentLayerWindowSize) {
Nathaniel Nifong1303d912021-10-06 09:41:24 -0400129 return Fps();
Ady Abrahamdfb63ba2020-05-27 20:05:05 +0000130 }
131
132 // Layer is considered frequent if the average frame rate is higher than the threshold
133 const auto totalTime = mFrameTimes.back().queueTime - it->queueTime;
Nathaniel Nifong1303d912021-10-06 09:41:24 -0400134 return Fps::fromPeriodNsecs(totalTime / (numFrames - 1));
Ady Abraham8a82ba62020-01-17 12:43:17 -0800135}
136
Marin Shalamanov1bc43ee2020-11-20 16:56:52 +0100137bool LayerInfo::isAnimating(nsecs_t now) const {
Ady Abraham5def7332020-05-29 16:13:47 -0700138 return mLastAnimationTime >= getActiveLayerThreshold(now);
139}
140
Marin Shalamanov1bc43ee2020-11-20 16:56:52 +0100141bool LayerInfo::hasEnoughDataForHeuristic() const {
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700142 // The layer had to publish at least HISTORY_SIZE or HISTORY_DURATION of updates
Ady Abrahama61edcb2020-01-30 18:32:03 -0800143 if (mFrameTimes.size() < 2) {
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700144 ALOGV("fewer than 2 frames recorded: %zu", mFrameTimes.size());
Ady Abrahama61edcb2020-01-30 18:32:03 -0800145 return false;
146 }
147
Ady Abrahamdfb63ba2020-05-27 20:05:05 +0000148 if (!isFrameTimeValid(mFrameTimes.front())) {
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700149 ALOGV("stale frames still captured");
Ady Abrahamdfb63ba2020-05-27 20:05:05 +0000150 return false;
151 }
152
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700153 const auto totalDuration = mFrameTimes.back().queueTime - mFrameTimes.front().queueTime;
154 if (mFrameTimes.size() < HISTORY_SIZE && totalDuration < HISTORY_DURATION.count()) {
155 ALOGV("not enough frames captured: %zu | %.2f seconds", mFrameTimes.size(),
156 totalDuration / 1e9f);
Ady Abraham8a82ba62020-01-17 12:43:17 -0800157 return false;
158 }
159
160 return true;
161}
162
Marin Shalamanov1bc43ee2020-11-20 16:56:52 +0100163std::optional<nsecs_t> LayerInfo::calculateAverageFrameTime() const {
Marin Shalamanova7fe3042021-01-29 21:02:08 +0100164 // Ignore frames captured during a mode change
165 const bool isDuringModeChange =
Marin Shalamanov2045d5b2020-12-28 18:11:41 +0100166 std::any_of(mFrameTimes.begin(), mFrameTimes.end(),
Marin Shalamanova7fe3042021-01-29 21:02:08 +0100167 [](const auto& frame) { return frame.pendingModeChange; });
168 if (isDuringModeChange) {
Marin Shalamanov2045d5b2020-12-28 18:11:41 +0100169 return std::nullopt;
170 }
Ady Abraham32efd542020-05-19 17:49:26 -0700171
Marin Shalamanov2045d5b2020-12-28 18:11:41 +0100172 const bool isMissingPresentTime =
173 std::any_of(mFrameTimes.begin(), mFrameTimes.end(),
174 [](auto frame) { return frame.presentTime == 0; });
175 if (isMissingPresentTime && !mLastRefreshRate.reported.isValid()) {
176 // If there are no presentation timestamps and we haven't calculated
177 // one in the past then we can't calculate the refresh rate
178 return std::nullopt;
Ady Abraham8a82ba62020-01-17 12:43:17 -0800179 }
Ady Abrahamc9664832020-05-12 14:16:56 -0700180
Ady Abrahamc9664832020-05-12 14:16:56 -0700181 // Calculate the average frame time based on presentation timestamps. If those
182 // doesn't exist, we look at the time the buffer was queued only. We can do that only if
183 // we calculated a refresh rate based on presentation timestamps in the past. The reason
184 // we look at the queue time is to handle cases where hwui attaches presentation timestamps
185 // when implementing render ahead for specific refresh rates. When hwui no longer provides
186 // presentation timestamps we look at the queue time to see if the current refresh rate still
187 // matches the content.
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700188
Marin Shalamanov2045d5b2020-12-28 18:11:41 +0100189 auto getFrameTime = isMissingPresentTime ? [](FrameTimeData data) { return data.queueTime; }
190 : [](FrameTimeData data) { return data.presentTime; };
191
192 nsecs_t totalDeltas = 0;
193 int numDeltas = 0;
194 auto prevFrame = mFrameTimes.begin();
195 for (auto it = mFrameTimes.begin() + 1; it != mFrameTimes.end(); ++it) {
196 const auto currDelta = getFrameTime(*it) - getFrameTime(*prevFrame);
197 if (currDelta < kMinPeriodBetweenFrames) {
198 // Skip this frame, but count the delta into the next frame
199 continue;
200 }
201
202 prevFrame = it;
203
204 if (currDelta > kMaxPeriodBetweenFrames) {
205 // Skip this frame and the current delta.
206 continue;
207 }
208
209 totalDeltas += currDelta;
210 numDeltas++;
211 }
212
213 if (numDeltas == 0) {
214 return std::nullopt;
215 }
216
217 const auto averageFrameTime = static_cast<double>(totalDeltas) / static_cast<double>(numDeltas);
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700218 return static_cast<nsecs_t>(averageFrameTime);
Ady Abraham32efd542020-05-19 17:49:26 -0700219}
Ady Abraham8a82ba62020-01-17 12:43:17 -0800220
Dominik Laskowskid82e0f02022-10-26 15:23:04 -0400221std::optional<Fps> LayerInfo::calculateRefreshRateIfPossible(const RefreshRateSelector& selector,
222 nsecs_t now) {
Ady Abraham32efd542020-05-19 17:49:26 -0700223 static constexpr float MARGIN = 1.0f; // 1Hz
Ady Abraham32efd542020-05-19 17:49:26 -0700224 if (!hasEnoughDataForHeuristic()) {
225 ALOGV("Not enough data");
226 return std::nullopt;
227 }
228
Dominik Laskowski6eab42d2021-09-13 14:34:13 -0700229 if (const auto averageFrameTime = calculateAverageFrameTime()) {
Marin Shalamanove8a663d2020-11-24 17:48:00 +0100230 const auto refreshRate = Fps::fromPeriodNsecs(*averageFrameTime);
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700231 const bool refreshRateConsistent = mRefreshRateHistory.add(refreshRate, now);
232 if (refreshRateConsistent) {
Dominik Laskowskid82e0f02022-10-26 15:23:04 -0400233 const auto knownRefreshRate = selector.findClosestKnownFrameRate(refreshRate);
Dominik Laskowski6eab42d2021-09-13 14:34:13 -0700234 using fps_approx_ops::operator!=;
235
236 // To avoid oscillation, use the last calculated refresh rate if it is close enough.
Marin Shalamanove8a663d2020-11-24 17:48:00 +0100237 if (std::abs(mLastRefreshRate.calculated.getValue() - refreshRate.getValue()) >
238 MARGIN &&
Dominik Laskowski6eab42d2021-09-13 14:34:13 -0700239 mLastRefreshRate.reported != knownRefreshRate) {
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700240 mLastRefreshRate.calculated = refreshRate;
241 mLastRefreshRate.reported = knownRefreshRate;
242 }
243
Marin Shalamanove8a663d2020-11-24 17:48:00 +0100244 ALOGV("%s %s rounded to nearest known frame rate %s", mName.c_str(),
245 to_string(refreshRate).c_str(), to_string(mLastRefreshRate.reported).c_str());
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700246 } else {
Marin Shalamanove8a663d2020-11-24 17:48:00 +0100247 ALOGV("%s Not stable (%s) returning last known frame rate %s", mName.c_str(),
248 to_string(refreshRate).c_str(), to_string(mLastRefreshRate.reported).c_str());
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700249 }
Ady Abraham32efd542020-05-19 17:49:26 -0700250 }
251
Marin Shalamanove8a663d2020-11-24 17:48:00 +0100252 return mLastRefreshRate.reported.isValid() ? std::make_optional(mLastRefreshRate.reported)
253 : std::nullopt;
Ady Abraham8a82ba62020-01-17 12:43:17 -0800254}
255
Dominik Laskowskid82e0f02022-10-26 15:23:04 -0400256LayerInfo::LayerVote LayerInfo::getRefreshRateVote(const RefreshRateSelector& selector,
Ady Abraham3efa3942021-06-24 19:01:25 -0700257 nsecs_t now) {
Ady Abraham8a82ba62020-01-17 12:43:17 -0800258 if (mLayerVote.type != LayerHistory::LayerVoteType::Heuristic) {
Ady Abrahama6b676e2020-05-27 14:29:09 -0700259 ALOGV("%s voted %d ", mName.c_str(), static_cast<int>(mLayerVote.type));
Marin Shalamanov46084422020-10-13 12:33:42 +0200260 return mLayerVote;
Ady Abraham8a82ba62020-01-17 12:43:17 -0800261 }
262
Ady Abraham5def7332020-05-29 16:13:47 -0700263 if (isAnimating(now)) {
264 ALOGV("%s is animating", mName.c_str());
Ady Abraham86ac5c52023-01-11 15:24:03 -0800265 mLastRefreshRate.animating = true;
Dominik Laskowski6eab42d2021-09-13 14:34:13 -0700266 return {LayerHistory::LayerVoteType::Max, Fps()};
Ady Abraham5def7332020-05-29 16:13:47 -0700267 }
268
Ady Abraham8a82ba62020-01-17 12:43:17 -0800269 if (!isFrequent(now)) {
Ady Abrahama6b676e2020-05-27 14:29:09 -0700270 ALOGV("%s is infrequent", mName.c_str());
Ady Abraham86ac5c52023-01-11 15:24:03 -0800271 mLastRefreshRate.infrequent = true;
Nathaniel Nifong1303d912021-10-06 09:41:24 -0400272 // Infrequent layers vote for mininal refresh rate for
Marin Shalamanov29e25402021-04-07 21:09:58 +0200273 // battery saving purposes and also to prevent b/135718869.
Dominik Laskowski6eab42d2021-09-13 14:34:13 -0700274 return {LayerHistory::LayerVoteType::Min, Fps()};
Ady Abraham8a82ba62020-01-17 12:43:17 -0800275 }
276
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700277 // If the layer was previously tagged as animating or infrequent, we clear
278 // the history as it is likely the layer just changed its behavior
279 // and we should not look at stale data
Ady Abraham86ac5c52023-01-11 15:24:03 -0800280 if (mLastRefreshRate.animating || mLastRefreshRate.infrequent) {
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700281 clearHistory(now);
282 }
283
Dominik Laskowskid82e0f02022-10-26 15:23:04 -0400284 auto refreshRate = calculateRefreshRateIfPossible(selector, now);
Ady Abraham8a82ba62020-01-17 12:43:17 -0800285 if (refreshRate.has_value()) {
Marin Shalamanove8a663d2020-11-24 17:48:00 +0100286 ALOGV("%s calculated refresh rate: %s", mName.c_str(), to_string(*refreshRate).c_str());
Ady Abraham8a82ba62020-01-17 12:43:17 -0800287 return {LayerHistory::LayerVoteType::Heuristic, refreshRate.value()};
288 }
289
Ady Abrahama6b676e2020-05-27 14:29:09 -0700290 ALOGV("%s Max (can't resolve refresh rate)", mName.c_str());
Dominik Laskowski6eab42d2021-09-13 14:34:13 -0700291 return {LayerHistory::LayerVoteType::Max, Fps()};
Ady Abraham8a82ba62020-01-17 12:43:17 -0800292}
293
Dominik Laskowskif5d0ea52021-09-26 17:27:01 -0700294const char* LayerInfo::getTraceTag(LayerHistory::LayerVoteType type) const {
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700295 if (mTraceTags.count(type) == 0) {
Dominik Laskowskif5d0ea52021-09-26 17:27:01 -0700296 auto tag = "LFPS " + mName + " " + ftl::enum_string(type);
297 mTraceTags.emplace(type, std::move(tag));
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700298 }
299
300 return mTraceTags.at(type).c_str();
301}
302
Marin Shalamanov1bc43ee2020-11-20 16:56:52 +0100303LayerInfo::RefreshRateHistory::HeuristicTraceTagData
304LayerInfo::RefreshRateHistory::makeHeuristicTraceTagData() const {
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700305 const std::string prefix = "LFPS ";
306 const std::string suffix = "Heuristic ";
307 return {.min = prefix + mName + suffix + "min",
308 .max = prefix + mName + suffix + "max",
309 .consistent = prefix + mName + suffix + "consistent",
310 .average = prefix + mName + suffix + "average"};
311}
312
Marin Shalamanov1bc43ee2020-11-20 16:56:52 +0100313void LayerInfo::RefreshRateHistory::clear() {
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700314 mRefreshRates.clear();
315}
316
Marin Shalamanove8a663d2020-11-24 17:48:00 +0100317bool LayerInfo::RefreshRateHistory::add(Fps refreshRate, nsecs_t now) {
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700318 mRefreshRates.push_back({refreshRate, now});
319 while (mRefreshRates.size() >= HISTORY_SIZE ||
320 now - mRefreshRates.front().timestamp > HISTORY_DURATION.count()) {
321 mRefreshRates.pop_front();
322 }
323
324 if (CC_UNLIKELY(sTraceEnabled)) {
325 if (!mHeuristicTraceTagData.has_value()) {
326 mHeuristicTraceTagData = makeHeuristicTraceTagData();
327 }
328
Marin Shalamanove8a663d2020-11-24 17:48:00 +0100329 ATRACE_INT(mHeuristicTraceTagData->average.c_str(), refreshRate.getIntValue());
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700330 }
331
332 return isConsistent();
333}
334
Marin Shalamanov1bc43ee2020-11-20 16:56:52 +0100335bool LayerInfo::RefreshRateHistory::isConsistent() const {
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700336 if (mRefreshRates.empty()) return true;
337
Dominik Laskowski6eab42d2021-09-13 14:34:13 -0700338 const auto [min, max] =
339 std::minmax_element(mRefreshRates.begin(), mRefreshRates.end(),
340 [](const auto& lhs, const auto& rhs) {
341 return isStrictlyLess(lhs.refreshRate, rhs.refreshRate);
342 });
343
344 const bool consistent =
Marin Shalamanove8a663d2020-11-24 17:48:00 +0100345 max->refreshRate.getValue() - min->refreshRate.getValue() < MARGIN_CONSISTENT_FPS;
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700346
347 if (CC_UNLIKELY(sTraceEnabled)) {
348 if (!mHeuristicTraceTagData.has_value()) {
349 mHeuristicTraceTagData = makeHeuristicTraceTagData();
350 }
351
Marin Shalamanove8a663d2020-11-24 17:48:00 +0100352 ATRACE_INT(mHeuristicTraceTagData->max.c_str(), max->refreshRate.getIntValue());
353 ATRACE_INT(mHeuristicTraceTagData->min.c_str(), min->refreshRate.getIntValue());
Ady Abraham0ccd79b2020-06-10 10:11:17 -0700354 ATRACE_INT(mHeuristicTraceTagData->consistent.c_str(), consistent);
355 }
356
357 return consistent;
358}
359
Ady Abraham8a82ba62020-01-17 12:43:17 -0800360} // namespace android::scheduler
Marin Shalamanovbed7fd32020-12-21 20:02:20 +0100361
362// TODO(b/129481165): remove the #pragma below and fix conversion issues
Dominik Laskowski6eab42d2021-09-13 14:34:13 -0700363#pragma clang diagnostic pop // ignored "-Wextra"