1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: frameworks/native/services/surfaceflinger/TimeStats/timestatsatomsproto/timestats_atoms.proto
3
4 #include "frameworks/native/services/surfaceflinger/TimeStats/timestatsatomsproto/timestats_atoms.pb.h"
5
6 #include <algorithm>
7 #include <cstdint>
8
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15
16 PROTOBUF_PRAGMA_INIT_SEG
17
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20
21 namespace android {
22 namespace surfaceflinger {
SurfaceflingerStatsGlobalInfoWrapper(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR SurfaceflingerStatsGlobalInfoWrapper::SurfaceflingerStatsGlobalInfoWrapper(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_.atom_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}} {}
27 struct SurfaceflingerStatsGlobalInfoWrapperDefaultTypeInternal {
SurfaceflingerStatsGlobalInfoWrapperDefaultTypeInternalandroid::surfaceflinger::SurfaceflingerStatsGlobalInfoWrapperDefaultTypeInternal28 PROTOBUF_CONSTEXPR SurfaceflingerStatsGlobalInfoWrapperDefaultTypeInternal()
29 : _instance(::_pbi::ConstantInitialized{}) {}
~SurfaceflingerStatsGlobalInfoWrapperDefaultTypeInternalandroid::surfaceflinger::SurfaceflingerStatsGlobalInfoWrapperDefaultTypeInternal30 ~SurfaceflingerStatsGlobalInfoWrapperDefaultTypeInternal() {}
31 union { // NOLINT(misc-non-private-member-variables-in-classes)
32 SurfaceflingerStatsGlobalInfoWrapper _instance;
33 };
34 };
35 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SurfaceflingerStatsGlobalInfoWrapperDefaultTypeInternal _SurfaceflingerStatsGlobalInfoWrapper_default_instance_;
SurfaceflingerStatsLayerInfoWrapper(::_pbi::ConstantInitialized)36 PROTOBUF_CONSTEXPR SurfaceflingerStatsLayerInfoWrapper::SurfaceflingerStatsLayerInfoWrapper(
37 ::_pbi::ConstantInitialized): _impl_{
38 /*decltype(_impl_.atom_)*/{}
39 , /*decltype(_impl_._cached_size_)*/{}} {}
40 struct SurfaceflingerStatsLayerInfoWrapperDefaultTypeInternal {
SurfaceflingerStatsLayerInfoWrapperDefaultTypeInternalandroid::surfaceflinger::SurfaceflingerStatsLayerInfoWrapperDefaultTypeInternal41 PROTOBUF_CONSTEXPR SurfaceflingerStatsLayerInfoWrapperDefaultTypeInternal()
42 : _instance(::_pbi::ConstantInitialized{}) {}
~SurfaceflingerStatsLayerInfoWrapperDefaultTypeInternalandroid::surfaceflinger::SurfaceflingerStatsLayerInfoWrapperDefaultTypeInternal43 ~SurfaceflingerStatsLayerInfoWrapperDefaultTypeInternal() {}
44 union { // NOLINT(misc-non-private-member-variables-in-classes)
45 SurfaceflingerStatsLayerInfoWrapper _instance;
46 };
47 };
48 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SurfaceflingerStatsLayerInfoWrapperDefaultTypeInternal _SurfaceflingerStatsLayerInfoWrapper_default_instance_;
SurfaceflingerStatsGlobalInfo(::_pbi::ConstantInitialized)49 PROTOBUF_CONSTEXPR SurfaceflingerStatsGlobalInfo::SurfaceflingerStatsGlobalInfo(
50 ::_pbi::ConstantInitialized): _impl_{
51 /*decltype(_impl_._has_bits_)*/{}
52 , /*decltype(_impl_._cached_size_)*/{}
53 , /*decltype(_impl_.frame_duration_)*/nullptr
54 , /*decltype(_impl_.render_engine_timing_)*/nullptr
55 , /*decltype(_impl_.sf_deadline_misses_)*/nullptr
56 , /*decltype(_impl_.sf_prediction_errors_)*/nullptr
57 , /*decltype(_impl_.total_frames_)*/::int64_t{0}
58 , /*decltype(_impl_.missed_frames_)*/::int64_t{0}
59 , /*decltype(_impl_.client_composition_frames_)*/::int64_t{0}
60 , /*decltype(_impl_.display_on_millis_)*/::int64_t{0}
61 , /*decltype(_impl_.animation_millis_)*/::int64_t{0}
62 , /*decltype(_impl_.event_connection_count_)*/0
63 , /*decltype(_impl_.total_timeline_frames_)*/0
64 , /*decltype(_impl_.total_janky_frames_)*/0
65 , /*decltype(_impl_.total_janky_frames_with_long_cpu_)*/0
66 , /*decltype(_impl_.total_janky_frames_with_long_gpu_)*/0
67 , /*decltype(_impl_.total_janky_frames_sf_unattributed_)*/0
68 , /*decltype(_impl_.total_janky_frames_app_unattributed_)*/0
69 , /*decltype(_impl_.total_janky_frames_sf_scheduling_)*/0
70 , /*decltype(_impl_.total_jank_frames_sf_prediction_error_)*/0
71 , /*decltype(_impl_.total_jank_frames_app_buffer_stuffing_)*/0
72 , /*decltype(_impl_.display_refresh_rate_bucket_)*/0
73 , /*decltype(_impl_.render_rate_bucket_)*/0} {}
74 struct SurfaceflingerStatsGlobalInfoDefaultTypeInternal {
SurfaceflingerStatsGlobalInfoDefaultTypeInternalandroid::surfaceflinger::SurfaceflingerStatsGlobalInfoDefaultTypeInternal75 PROTOBUF_CONSTEXPR SurfaceflingerStatsGlobalInfoDefaultTypeInternal()
76 : _instance(::_pbi::ConstantInitialized{}) {}
~SurfaceflingerStatsGlobalInfoDefaultTypeInternalandroid::surfaceflinger::SurfaceflingerStatsGlobalInfoDefaultTypeInternal77 ~SurfaceflingerStatsGlobalInfoDefaultTypeInternal() {}
78 union { // NOLINT(misc-non-private-member-variables-in-classes)
79 SurfaceflingerStatsGlobalInfo _instance;
80 };
81 };
82 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SurfaceflingerStatsGlobalInfoDefaultTypeInternal _SurfaceflingerStatsGlobalInfo_default_instance_;
SurfaceflingerStatsLayerInfo_SetFrameRateVote(::_pbi::ConstantInitialized)83 PROTOBUF_CONSTEXPR SurfaceflingerStatsLayerInfo_SetFrameRateVote::SurfaceflingerStatsLayerInfo_SetFrameRateVote(
84 ::_pbi::ConstantInitialized): _impl_{
85 /*decltype(_impl_._has_bits_)*/{}
86 , /*decltype(_impl_._cached_size_)*/{}
87 , /*decltype(_impl_.frame_rate_)*/0
88 , /*decltype(_impl_.frame_rate_compatibility_)*/0
89 , /*decltype(_impl_.seamlessness_)*/0} {}
90 struct SurfaceflingerStatsLayerInfo_SetFrameRateVoteDefaultTypeInternal {
SurfaceflingerStatsLayerInfo_SetFrameRateVoteDefaultTypeInternalandroid::surfaceflinger::SurfaceflingerStatsLayerInfo_SetFrameRateVoteDefaultTypeInternal91 PROTOBUF_CONSTEXPR SurfaceflingerStatsLayerInfo_SetFrameRateVoteDefaultTypeInternal()
92 : _instance(::_pbi::ConstantInitialized{}) {}
~SurfaceflingerStatsLayerInfo_SetFrameRateVoteDefaultTypeInternalandroid::surfaceflinger::SurfaceflingerStatsLayerInfo_SetFrameRateVoteDefaultTypeInternal93 ~SurfaceflingerStatsLayerInfo_SetFrameRateVoteDefaultTypeInternal() {}
94 union { // NOLINT(misc-non-private-member-variables-in-classes)
95 SurfaceflingerStatsLayerInfo_SetFrameRateVote _instance;
96 };
97 };
98 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SurfaceflingerStatsLayerInfo_SetFrameRateVoteDefaultTypeInternal _SurfaceflingerStatsLayerInfo_SetFrameRateVote_default_instance_;
SurfaceflingerStatsLayerInfo(::_pbi::ConstantInitialized)99 PROTOBUF_CONSTEXPR SurfaceflingerStatsLayerInfo::SurfaceflingerStatsLayerInfo(
100 ::_pbi::ConstantInitialized): _impl_{
101 /*decltype(_impl_._has_bits_)*/{}
102 , /*decltype(_impl_._cached_size_)*/{}
103 , /*decltype(_impl_.layer_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
104 , /*decltype(_impl_.present_to_present_)*/nullptr
105 , /*decltype(_impl_.post_to_present_)*/nullptr
106 , /*decltype(_impl_.acquire_to_present_)*/nullptr
107 , /*decltype(_impl_.latch_to_present_)*/nullptr
108 , /*decltype(_impl_.desired_to_present_)*/nullptr
109 , /*decltype(_impl_.post_to_acquire_)*/nullptr
110 , /*decltype(_impl_.set_frame_rate_vote_)*/nullptr
111 , /*decltype(_impl_.app_deadline_misses_)*/nullptr
112 , /*decltype(_impl_.present_to_present_delta_)*/nullptr
113 , /*decltype(_impl_.total_frames_)*/::int64_t{0}
114 , /*decltype(_impl_.dropped_frames_)*/::int64_t{0}
115 , /*decltype(_impl_.late_acquire_frames_)*/::int64_t{0}
116 , /*decltype(_impl_.bad_desired_present_frames_)*/::int64_t{0}
117 , /*decltype(_impl_.uid_)*/0
118 , /*decltype(_impl_.total_timeline_frames_)*/0
119 , /*decltype(_impl_.total_janky_frames_)*/0
120 , /*decltype(_impl_.total_janky_frames_with_long_cpu_)*/0
121 , /*decltype(_impl_.total_janky_frames_with_long_gpu_)*/0
122 , /*decltype(_impl_.total_janky_frames_sf_unattributed_)*/0
123 , /*decltype(_impl_.total_janky_frames_app_unattributed_)*/0
124 , /*decltype(_impl_.total_janky_frames_sf_scheduling_)*/0
125 , /*decltype(_impl_.total_jank_frames_sf_prediction_error_)*/0
126 , /*decltype(_impl_.total_jank_frames_app_buffer_stuffing_)*/0
127 , /*decltype(_impl_.display_refresh_rate_bucket_)*/0
128 , /*decltype(_impl_.render_rate_bucket_)*/0
129 , /*decltype(_impl_.game_mode_)*/0} {}
130 struct SurfaceflingerStatsLayerInfoDefaultTypeInternal {
SurfaceflingerStatsLayerInfoDefaultTypeInternalandroid::surfaceflinger::SurfaceflingerStatsLayerInfoDefaultTypeInternal131 PROTOBUF_CONSTEXPR SurfaceflingerStatsLayerInfoDefaultTypeInternal()
132 : _instance(::_pbi::ConstantInitialized{}) {}
~SurfaceflingerStatsLayerInfoDefaultTypeInternalandroid::surfaceflinger::SurfaceflingerStatsLayerInfoDefaultTypeInternal133 ~SurfaceflingerStatsLayerInfoDefaultTypeInternal() {}
134 union { // NOLINT(misc-non-private-member-variables-in-classes)
135 SurfaceflingerStatsLayerInfo _instance;
136 };
137 };
138 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SurfaceflingerStatsLayerInfoDefaultTypeInternal _SurfaceflingerStatsLayerInfo_default_instance_;
FrameTimingHistogram(::_pbi::ConstantInitialized)139 PROTOBUF_CONSTEXPR FrameTimingHistogram::FrameTimingHistogram(
140 ::_pbi::ConstantInitialized): _impl_{
141 /*decltype(_impl_.time_millis_buckets_)*/{}
142 , /*decltype(_impl_.frame_counts_)*/{}
143 , /*decltype(_impl_._cached_size_)*/{}} {}
144 struct FrameTimingHistogramDefaultTypeInternal {
FrameTimingHistogramDefaultTypeInternalandroid::surfaceflinger::FrameTimingHistogramDefaultTypeInternal145 PROTOBUF_CONSTEXPR FrameTimingHistogramDefaultTypeInternal()
146 : _instance(::_pbi::ConstantInitialized{}) {}
~FrameTimingHistogramDefaultTypeInternalandroid::surfaceflinger::FrameTimingHistogramDefaultTypeInternal147 ~FrameTimingHistogramDefaultTypeInternal() {}
148 union { // NOLINT(misc-non-private-member-variables-in-classes)
149 FrameTimingHistogram _instance;
150 };
151 };
152 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FrameTimingHistogramDefaultTypeInternal _FrameTimingHistogram_default_instance_;
153 } // namespace surfaceflinger
154 } // namespace android
155 namespace android {
156 namespace surfaceflinger {
SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_IsValid(int value)157 bool SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_IsValid(int value) {
158 switch (value) {
159 case 0:
160 case 1:
161 case 2:
162 return true;
163 default:
164 return false;
165 }
166 }
167
168 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_strings[3] = {};
169
170 static const char SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_names[] =
171 "FRAME_RATE_DEFAULT"
172 "FRAME_RATE_EXACT_OR_MULTIPLE"
173 "FRAME_RATE_UNDEFINED";
174
175 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_entries[] = {
176 { {SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_names + 0, 18}, 1 },
177 { {SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_names + 18, 28}, 2 },
178 { {SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_names + 46, 20}, 0 },
179 };
180
181 static const int SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_entries_by_number[] = {
182 2, // 0 -> FRAME_RATE_UNDEFINED
183 0, // 1 -> FRAME_RATE_DEFAULT
184 1, // 2 -> FRAME_RATE_EXACT_OR_MULTIPLE
185 };
186
SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_Name(SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility value)187 const std::string& SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_Name(
188 SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility value) {
189 static const bool dummy =
190 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
191 SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_entries,
192 SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_entries_by_number,
193 3, SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_strings);
194 (void) dummy;
195 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
196 SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_entries,
197 SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_entries_by_number,
198 3, value);
199 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
200 SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_strings[idx].get();
201 }
SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility * value)202 bool SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_Parse(
203 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility* value) {
204 int int_value;
205 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
206 SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_entries, 3, name, &int_value);
207 if (success) {
208 *value = static_cast<SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility>(int_value);
209 }
210 return success;
211 }
212 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
213 constexpr SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility SurfaceflingerStatsLayerInfo_SetFrameRateVote::FRAME_RATE_UNDEFINED;
214 constexpr SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility SurfaceflingerStatsLayerInfo_SetFrameRateVote::FRAME_RATE_DEFAULT;
215 constexpr SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility SurfaceflingerStatsLayerInfo_SetFrameRateVote::FRAME_RATE_EXACT_OR_MULTIPLE;
216 constexpr SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility SurfaceflingerStatsLayerInfo_SetFrameRateVote::FrameRateCompatibility_MIN;
217 constexpr SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility SurfaceflingerStatsLayerInfo_SetFrameRateVote::FrameRateCompatibility_MAX;
218 constexpr int SurfaceflingerStatsLayerInfo_SetFrameRateVote::FrameRateCompatibility_ARRAYSIZE;
219 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_IsValid(int value)220 bool SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_IsValid(int value) {
221 switch (value) {
222 case 0:
223 case 1:
224 case 2:
225 return true;
226 default:
227 return false;
228 }
229 }
230
231 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_strings[3] = {};
232
233 static const char SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_names[] =
234 "SEAMLESS_NOT_REQUIRED"
235 "SEAMLESS_SHOULD_BE_SEAMLESS"
236 "SEAMLESS_UNDEFINED";
237
238 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_entries[] = {
239 { {SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_names + 0, 21}, 2 },
240 { {SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_names + 21, 27}, 1 },
241 { {SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_names + 48, 18}, 0 },
242 };
243
244 static const int SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_entries_by_number[] = {
245 2, // 0 -> SEAMLESS_UNDEFINED
246 1, // 1 -> SEAMLESS_SHOULD_BE_SEAMLESS
247 0, // 2 -> SEAMLESS_NOT_REQUIRED
248 };
249
SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_Name(SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness value)250 const std::string& SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_Name(
251 SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness value) {
252 static const bool dummy =
253 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
254 SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_entries,
255 SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_entries_by_number,
256 3, SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_strings);
257 (void) dummy;
258 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
259 SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_entries,
260 SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_entries_by_number,
261 3, value);
262 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
263 SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_strings[idx].get();
264 }
SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness * value)265 bool SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_Parse(
266 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness* value) {
267 int int_value;
268 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
269 SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_entries, 3, name, &int_value);
270 if (success) {
271 *value = static_cast<SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness>(int_value);
272 }
273 return success;
274 }
275 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
276 constexpr SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness SurfaceflingerStatsLayerInfo_SetFrameRateVote::SEAMLESS_UNDEFINED;
277 constexpr SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness SurfaceflingerStatsLayerInfo_SetFrameRateVote::SEAMLESS_SHOULD_BE_SEAMLESS;
278 constexpr SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness SurfaceflingerStatsLayerInfo_SetFrameRateVote::SEAMLESS_NOT_REQUIRED;
279 constexpr SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness SurfaceflingerStatsLayerInfo_SetFrameRateVote::Seamlessness_MIN;
280 constexpr SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness SurfaceflingerStatsLayerInfo_SetFrameRateVote::Seamlessness_MAX;
281 constexpr int SurfaceflingerStatsLayerInfo_SetFrameRateVote::Seamlessness_ARRAYSIZE;
282 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
SurfaceflingerStatsLayerInfo_GameMode_IsValid(int value)283 bool SurfaceflingerStatsLayerInfo_GameMode_IsValid(int value) {
284 switch (value) {
285 case 0:
286 case 1:
287 case 2:
288 case 3:
289 case 4:
290 case 5:
291 return true;
292 default:
293 return false;
294 }
295 }
296
297 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> SurfaceflingerStatsLayerInfo_GameMode_strings[6] = {};
298
299 static const char SurfaceflingerStatsLayerInfo_GameMode_names[] =
300 "GAME_MODE_BATTERY"
301 "GAME_MODE_CUSTOM"
302 "GAME_MODE_PERFORMANCE"
303 "GAME_MODE_STANDARD"
304 "GAME_MODE_UNSPECIFIED"
305 "GAME_MODE_UNSUPPORTED";
306
307 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry SurfaceflingerStatsLayerInfo_GameMode_entries[] = {
308 { {SurfaceflingerStatsLayerInfo_GameMode_names + 0, 17}, 4 },
309 { {SurfaceflingerStatsLayerInfo_GameMode_names + 17, 16}, 5 },
310 { {SurfaceflingerStatsLayerInfo_GameMode_names + 33, 21}, 3 },
311 { {SurfaceflingerStatsLayerInfo_GameMode_names + 54, 18}, 2 },
312 { {SurfaceflingerStatsLayerInfo_GameMode_names + 72, 21}, 0 },
313 { {SurfaceflingerStatsLayerInfo_GameMode_names + 93, 21}, 1 },
314 };
315
316 static const int SurfaceflingerStatsLayerInfo_GameMode_entries_by_number[] = {
317 4, // 0 -> GAME_MODE_UNSPECIFIED
318 5, // 1 -> GAME_MODE_UNSUPPORTED
319 3, // 2 -> GAME_MODE_STANDARD
320 2, // 3 -> GAME_MODE_PERFORMANCE
321 0, // 4 -> GAME_MODE_BATTERY
322 1, // 5 -> GAME_MODE_CUSTOM
323 };
324
SurfaceflingerStatsLayerInfo_GameMode_Name(SurfaceflingerStatsLayerInfo_GameMode value)325 const std::string& SurfaceflingerStatsLayerInfo_GameMode_Name(
326 SurfaceflingerStatsLayerInfo_GameMode value) {
327 static const bool dummy =
328 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
329 SurfaceflingerStatsLayerInfo_GameMode_entries,
330 SurfaceflingerStatsLayerInfo_GameMode_entries_by_number,
331 6, SurfaceflingerStatsLayerInfo_GameMode_strings);
332 (void) dummy;
333 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
334 SurfaceflingerStatsLayerInfo_GameMode_entries,
335 SurfaceflingerStatsLayerInfo_GameMode_entries_by_number,
336 6, value);
337 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
338 SurfaceflingerStatsLayerInfo_GameMode_strings[idx].get();
339 }
SurfaceflingerStatsLayerInfo_GameMode_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,SurfaceflingerStatsLayerInfo_GameMode * value)340 bool SurfaceflingerStatsLayerInfo_GameMode_Parse(
341 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SurfaceflingerStatsLayerInfo_GameMode* value) {
342 int int_value;
343 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
344 SurfaceflingerStatsLayerInfo_GameMode_entries, 6, name, &int_value);
345 if (success) {
346 *value = static_cast<SurfaceflingerStatsLayerInfo_GameMode>(int_value);
347 }
348 return success;
349 }
350 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
351 constexpr SurfaceflingerStatsLayerInfo_GameMode SurfaceflingerStatsLayerInfo::GAME_MODE_UNSPECIFIED;
352 constexpr SurfaceflingerStatsLayerInfo_GameMode SurfaceflingerStatsLayerInfo::GAME_MODE_UNSUPPORTED;
353 constexpr SurfaceflingerStatsLayerInfo_GameMode SurfaceflingerStatsLayerInfo::GAME_MODE_STANDARD;
354 constexpr SurfaceflingerStatsLayerInfo_GameMode SurfaceflingerStatsLayerInfo::GAME_MODE_PERFORMANCE;
355 constexpr SurfaceflingerStatsLayerInfo_GameMode SurfaceflingerStatsLayerInfo::GAME_MODE_BATTERY;
356 constexpr SurfaceflingerStatsLayerInfo_GameMode SurfaceflingerStatsLayerInfo::GAME_MODE_CUSTOM;
357 constexpr SurfaceflingerStatsLayerInfo_GameMode SurfaceflingerStatsLayerInfo::GameMode_MIN;
358 constexpr SurfaceflingerStatsLayerInfo_GameMode SurfaceflingerStatsLayerInfo::GameMode_MAX;
359 constexpr int SurfaceflingerStatsLayerInfo::GameMode_ARRAYSIZE;
360 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
361
362 // ===================================================================
363
364 class SurfaceflingerStatsGlobalInfoWrapper::_Internal {
365 public:
366 };
367
SurfaceflingerStatsGlobalInfoWrapper(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)368 SurfaceflingerStatsGlobalInfoWrapper::SurfaceflingerStatsGlobalInfoWrapper(::PROTOBUF_NAMESPACE_ID::Arena* arena,
369 bool is_message_owned)
370 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
371 SharedCtor(arena, is_message_owned);
372 // @@protoc_insertion_point(arena_constructor:android.surfaceflinger.SurfaceflingerStatsGlobalInfoWrapper)
373 }
SurfaceflingerStatsGlobalInfoWrapper(const SurfaceflingerStatsGlobalInfoWrapper & from)374 SurfaceflingerStatsGlobalInfoWrapper::SurfaceflingerStatsGlobalInfoWrapper(const SurfaceflingerStatsGlobalInfoWrapper& from)
375 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
376 SurfaceflingerStatsGlobalInfoWrapper* const _this = this; (void)_this;
377 new (&_impl_) Impl_{
378 decltype(_impl_.atom_){from._impl_.atom_}
379 , /*decltype(_impl_._cached_size_)*/{}};
380
381 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
382 // @@protoc_insertion_point(copy_constructor:android.surfaceflinger.SurfaceflingerStatsGlobalInfoWrapper)
383 }
384
SharedCtor(::_pb::Arena * arena,bool is_message_owned)385 inline void SurfaceflingerStatsGlobalInfoWrapper::SharedCtor(
386 ::_pb::Arena* arena, bool is_message_owned) {
387 (void)arena;
388 (void)is_message_owned;
389 new (&_impl_) Impl_{
390 decltype(_impl_.atom_){arena}
391 , /*decltype(_impl_._cached_size_)*/{}
392 };
393 }
394
~SurfaceflingerStatsGlobalInfoWrapper()395 SurfaceflingerStatsGlobalInfoWrapper::~SurfaceflingerStatsGlobalInfoWrapper() {
396 // @@protoc_insertion_point(destructor:android.surfaceflinger.SurfaceflingerStatsGlobalInfoWrapper)
397 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
398 (void)arena;
399 return;
400 }
401 SharedDtor();
402 }
403
SharedDtor()404 inline void SurfaceflingerStatsGlobalInfoWrapper::SharedDtor() {
405 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
406 _impl_.atom_.~RepeatedPtrField();
407 }
408
SetCachedSize(int size) const409 void SurfaceflingerStatsGlobalInfoWrapper::SetCachedSize(int size) const {
410 _impl_._cached_size_.Set(size);
411 }
412
Clear()413 void SurfaceflingerStatsGlobalInfoWrapper::Clear() {
414 // @@protoc_insertion_point(message_clear_start:android.surfaceflinger.SurfaceflingerStatsGlobalInfoWrapper)
415 ::uint32_t cached_has_bits = 0;
416 // Prevent compiler warnings about cached_has_bits being unused
417 (void) cached_has_bits;
418
419 _impl_.atom_.Clear();
420 _internal_metadata_.Clear<std::string>();
421 }
422
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)423 const char* SurfaceflingerStatsGlobalInfoWrapper::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
424 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
425 while (!ctx->Done(&ptr)) {
426 ::uint32_t tag;
427 ptr = ::_pbi::ReadTag(ptr, &tag);
428 switch (tag >> 3) {
429 // repeated .android.surfaceflinger.SurfaceflingerStatsGlobalInfo atom = 1;
430 case 1:
431 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
432 ptr -= 1;
433 do {
434 ptr += 1;
435 ptr = ctx->ParseMessage(_internal_add_atom(), ptr);
436 CHK_(ptr);
437 if (!ctx->DataAvailable(ptr)) break;
438 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
439 } else {
440 goto handle_unusual;
441 }
442 continue;
443 default:
444 goto handle_unusual;
445 } // switch
446 handle_unusual:
447 if ((tag == 0) || ((tag & 7) == 4)) {
448 CHK_(ptr);
449 ctx->SetLastTag(tag);
450 goto message_done;
451 }
452 ptr = UnknownFieldParse(
453 tag,
454 _internal_metadata_.mutable_unknown_fields<std::string>(),
455 ptr, ctx);
456 CHK_(ptr != nullptr);
457 } // while
458 message_done:
459 return ptr;
460 failure:
461 ptr = nullptr;
462 goto message_done;
463 #undef CHK_
464 }
465
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const466 ::uint8_t* SurfaceflingerStatsGlobalInfoWrapper::_InternalSerialize(
467 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
468 // @@protoc_insertion_point(serialize_to_array_start:android.surfaceflinger.SurfaceflingerStatsGlobalInfoWrapper)
469 ::uint32_t cached_has_bits = 0;
470 (void) cached_has_bits;
471
472 // repeated .android.surfaceflinger.SurfaceflingerStatsGlobalInfo atom = 1;
473 for (unsigned i = 0,
474 n = static_cast<unsigned>(this->_internal_atom_size()); i < n; i++) {
475 const auto& repfield = this->_internal_atom(i);
476 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
477 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
478 }
479
480 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
481 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
482 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
483 }
484 // @@protoc_insertion_point(serialize_to_array_end:android.surfaceflinger.SurfaceflingerStatsGlobalInfoWrapper)
485 return target;
486 }
487
ByteSizeLong() const488 size_t SurfaceflingerStatsGlobalInfoWrapper::ByteSizeLong() const {
489 // @@protoc_insertion_point(message_byte_size_start:android.surfaceflinger.SurfaceflingerStatsGlobalInfoWrapper)
490 size_t total_size = 0;
491
492 ::uint32_t cached_has_bits = 0;
493 // Prevent compiler warnings about cached_has_bits being unused
494 (void) cached_has_bits;
495
496 // repeated .android.surfaceflinger.SurfaceflingerStatsGlobalInfo atom = 1;
497 total_size += 1UL * this->_internal_atom_size();
498 for (const auto& msg : this->_impl_.atom_) {
499 total_size +=
500 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
501 }
502
503 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
504 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
505 }
506 int cached_size = ::_pbi::ToCachedSize(total_size);
507 SetCachedSize(cached_size);
508 return total_size;
509 }
510
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)511 void SurfaceflingerStatsGlobalInfoWrapper::CheckTypeAndMergeFrom(
512 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
513 MergeFrom(*::_pbi::DownCast<const SurfaceflingerStatsGlobalInfoWrapper*>(
514 &from));
515 }
516
MergeFrom(const SurfaceflingerStatsGlobalInfoWrapper & from)517 void SurfaceflingerStatsGlobalInfoWrapper::MergeFrom(const SurfaceflingerStatsGlobalInfoWrapper& from) {
518 SurfaceflingerStatsGlobalInfoWrapper* const _this = this;
519 // @@protoc_insertion_point(class_specific_merge_from_start:android.surfaceflinger.SurfaceflingerStatsGlobalInfoWrapper)
520 GOOGLE_DCHECK_NE(&from, _this);
521 ::uint32_t cached_has_bits = 0;
522 (void) cached_has_bits;
523
524 _this->_impl_.atom_.MergeFrom(from._impl_.atom_);
525 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
526 }
527
CopyFrom(const SurfaceflingerStatsGlobalInfoWrapper & from)528 void SurfaceflingerStatsGlobalInfoWrapper::CopyFrom(const SurfaceflingerStatsGlobalInfoWrapper& from) {
529 // @@protoc_insertion_point(class_specific_copy_from_start:android.surfaceflinger.SurfaceflingerStatsGlobalInfoWrapper)
530 if (&from == this) return;
531 Clear();
532 MergeFrom(from);
533 }
534
IsInitialized() const535 bool SurfaceflingerStatsGlobalInfoWrapper::IsInitialized() const {
536 return true;
537 }
538
InternalSwap(SurfaceflingerStatsGlobalInfoWrapper * other)539 void SurfaceflingerStatsGlobalInfoWrapper::InternalSwap(SurfaceflingerStatsGlobalInfoWrapper* other) {
540 using std::swap;
541 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
542 _impl_.atom_.InternalSwap(&other->_impl_.atom_);
543 }
544
GetTypeName() const545 std::string SurfaceflingerStatsGlobalInfoWrapper::GetTypeName() const {
546 return "android.surfaceflinger.SurfaceflingerStatsGlobalInfoWrapper";
547 }
548
549
550 // ===================================================================
551
552 class SurfaceflingerStatsLayerInfoWrapper::_Internal {
553 public:
554 };
555
SurfaceflingerStatsLayerInfoWrapper(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)556 SurfaceflingerStatsLayerInfoWrapper::SurfaceflingerStatsLayerInfoWrapper(::PROTOBUF_NAMESPACE_ID::Arena* arena,
557 bool is_message_owned)
558 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
559 SharedCtor(arena, is_message_owned);
560 // @@protoc_insertion_point(arena_constructor:android.surfaceflinger.SurfaceflingerStatsLayerInfoWrapper)
561 }
SurfaceflingerStatsLayerInfoWrapper(const SurfaceflingerStatsLayerInfoWrapper & from)562 SurfaceflingerStatsLayerInfoWrapper::SurfaceflingerStatsLayerInfoWrapper(const SurfaceflingerStatsLayerInfoWrapper& from)
563 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
564 SurfaceflingerStatsLayerInfoWrapper* const _this = this; (void)_this;
565 new (&_impl_) Impl_{
566 decltype(_impl_.atom_){from._impl_.atom_}
567 , /*decltype(_impl_._cached_size_)*/{}};
568
569 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
570 // @@protoc_insertion_point(copy_constructor:android.surfaceflinger.SurfaceflingerStatsLayerInfoWrapper)
571 }
572
SharedCtor(::_pb::Arena * arena,bool is_message_owned)573 inline void SurfaceflingerStatsLayerInfoWrapper::SharedCtor(
574 ::_pb::Arena* arena, bool is_message_owned) {
575 (void)arena;
576 (void)is_message_owned;
577 new (&_impl_) Impl_{
578 decltype(_impl_.atom_){arena}
579 , /*decltype(_impl_._cached_size_)*/{}
580 };
581 }
582
~SurfaceflingerStatsLayerInfoWrapper()583 SurfaceflingerStatsLayerInfoWrapper::~SurfaceflingerStatsLayerInfoWrapper() {
584 // @@protoc_insertion_point(destructor:android.surfaceflinger.SurfaceflingerStatsLayerInfoWrapper)
585 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
586 (void)arena;
587 return;
588 }
589 SharedDtor();
590 }
591
SharedDtor()592 inline void SurfaceflingerStatsLayerInfoWrapper::SharedDtor() {
593 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
594 _impl_.atom_.~RepeatedPtrField();
595 }
596
SetCachedSize(int size) const597 void SurfaceflingerStatsLayerInfoWrapper::SetCachedSize(int size) const {
598 _impl_._cached_size_.Set(size);
599 }
600
Clear()601 void SurfaceflingerStatsLayerInfoWrapper::Clear() {
602 // @@protoc_insertion_point(message_clear_start:android.surfaceflinger.SurfaceflingerStatsLayerInfoWrapper)
603 ::uint32_t cached_has_bits = 0;
604 // Prevent compiler warnings about cached_has_bits being unused
605 (void) cached_has_bits;
606
607 _impl_.atom_.Clear();
608 _internal_metadata_.Clear<std::string>();
609 }
610
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)611 const char* SurfaceflingerStatsLayerInfoWrapper::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
612 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
613 while (!ctx->Done(&ptr)) {
614 ::uint32_t tag;
615 ptr = ::_pbi::ReadTag(ptr, &tag);
616 switch (tag >> 3) {
617 // repeated .android.surfaceflinger.SurfaceflingerStatsLayerInfo atom = 1;
618 case 1:
619 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
620 ptr -= 1;
621 do {
622 ptr += 1;
623 ptr = ctx->ParseMessage(_internal_add_atom(), ptr);
624 CHK_(ptr);
625 if (!ctx->DataAvailable(ptr)) break;
626 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
627 } else {
628 goto handle_unusual;
629 }
630 continue;
631 default:
632 goto handle_unusual;
633 } // switch
634 handle_unusual:
635 if ((tag == 0) || ((tag & 7) == 4)) {
636 CHK_(ptr);
637 ctx->SetLastTag(tag);
638 goto message_done;
639 }
640 ptr = UnknownFieldParse(
641 tag,
642 _internal_metadata_.mutable_unknown_fields<std::string>(),
643 ptr, ctx);
644 CHK_(ptr != nullptr);
645 } // while
646 message_done:
647 return ptr;
648 failure:
649 ptr = nullptr;
650 goto message_done;
651 #undef CHK_
652 }
653
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const654 ::uint8_t* SurfaceflingerStatsLayerInfoWrapper::_InternalSerialize(
655 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
656 // @@protoc_insertion_point(serialize_to_array_start:android.surfaceflinger.SurfaceflingerStatsLayerInfoWrapper)
657 ::uint32_t cached_has_bits = 0;
658 (void) cached_has_bits;
659
660 // repeated .android.surfaceflinger.SurfaceflingerStatsLayerInfo atom = 1;
661 for (unsigned i = 0,
662 n = static_cast<unsigned>(this->_internal_atom_size()); i < n; i++) {
663 const auto& repfield = this->_internal_atom(i);
664 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
665 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
666 }
667
668 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
669 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
670 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
671 }
672 // @@protoc_insertion_point(serialize_to_array_end:android.surfaceflinger.SurfaceflingerStatsLayerInfoWrapper)
673 return target;
674 }
675
ByteSizeLong() const676 size_t SurfaceflingerStatsLayerInfoWrapper::ByteSizeLong() const {
677 // @@protoc_insertion_point(message_byte_size_start:android.surfaceflinger.SurfaceflingerStatsLayerInfoWrapper)
678 size_t total_size = 0;
679
680 ::uint32_t cached_has_bits = 0;
681 // Prevent compiler warnings about cached_has_bits being unused
682 (void) cached_has_bits;
683
684 // repeated .android.surfaceflinger.SurfaceflingerStatsLayerInfo atom = 1;
685 total_size += 1UL * this->_internal_atom_size();
686 for (const auto& msg : this->_impl_.atom_) {
687 total_size +=
688 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
689 }
690
691 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
692 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
693 }
694 int cached_size = ::_pbi::ToCachedSize(total_size);
695 SetCachedSize(cached_size);
696 return total_size;
697 }
698
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)699 void SurfaceflingerStatsLayerInfoWrapper::CheckTypeAndMergeFrom(
700 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
701 MergeFrom(*::_pbi::DownCast<const SurfaceflingerStatsLayerInfoWrapper*>(
702 &from));
703 }
704
MergeFrom(const SurfaceflingerStatsLayerInfoWrapper & from)705 void SurfaceflingerStatsLayerInfoWrapper::MergeFrom(const SurfaceflingerStatsLayerInfoWrapper& from) {
706 SurfaceflingerStatsLayerInfoWrapper* const _this = this;
707 // @@protoc_insertion_point(class_specific_merge_from_start:android.surfaceflinger.SurfaceflingerStatsLayerInfoWrapper)
708 GOOGLE_DCHECK_NE(&from, _this);
709 ::uint32_t cached_has_bits = 0;
710 (void) cached_has_bits;
711
712 _this->_impl_.atom_.MergeFrom(from._impl_.atom_);
713 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
714 }
715
CopyFrom(const SurfaceflingerStatsLayerInfoWrapper & from)716 void SurfaceflingerStatsLayerInfoWrapper::CopyFrom(const SurfaceflingerStatsLayerInfoWrapper& from) {
717 // @@protoc_insertion_point(class_specific_copy_from_start:android.surfaceflinger.SurfaceflingerStatsLayerInfoWrapper)
718 if (&from == this) return;
719 Clear();
720 MergeFrom(from);
721 }
722
IsInitialized() const723 bool SurfaceflingerStatsLayerInfoWrapper::IsInitialized() const {
724 return true;
725 }
726
InternalSwap(SurfaceflingerStatsLayerInfoWrapper * other)727 void SurfaceflingerStatsLayerInfoWrapper::InternalSwap(SurfaceflingerStatsLayerInfoWrapper* other) {
728 using std::swap;
729 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
730 _impl_.atom_.InternalSwap(&other->_impl_.atom_);
731 }
732
GetTypeName() const733 std::string SurfaceflingerStatsLayerInfoWrapper::GetTypeName() const {
734 return "android.surfaceflinger.SurfaceflingerStatsLayerInfoWrapper";
735 }
736
737
738 // ===================================================================
739
740 class SurfaceflingerStatsGlobalInfo::_Internal {
741 public:
742 using HasBits = decltype(std::declval<SurfaceflingerStatsGlobalInfo>()._impl_._has_bits_);
set_has_display_refresh_rate_bucket(HasBits * has_bits)743 static void set_has_display_refresh_rate_bucket(HasBits* has_bits) {
744 (*has_bits)[0] |= 524288u;
745 }
set_has_render_rate_bucket(HasBits * has_bits)746 static void set_has_render_rate_bucket(HasBits* has_bits) {
747 (*has_bits)[0] |= 1048576u;
748 }
set_has_total_frames(HasBits * has_bits)749 static void set_has_total_frames(HasBits* has_bits) {
750 (*has_bits)[0] |= 16u;
751 }
set_has_missed_frames(HasBits * has_bits)752 static void set_has_missed_frames(HasBits* has_bits) {
753 (*has_bits)[0] |= 32u;
754 }
set_has_client_composition_frames(HasBits * has_bits)755 static void set_has_client_composition_frames(HasBits* has_bits) {
756 (*has_bits)[0] |= 64u;
757 }
set_has_display_on_millis(HasBits * has_bits)758 static void set_has_display_on_millis(HasBits* has_bits) {
759 (*has_bits)[0] |= 128u;
760 }
set_has_animation_millis(HasBits * has_bits)761 static void set_has_animation_millis(HasBits* has_bits) {
762 (*has_bits)[0] |= 256u;
763 }
set_has_event_connection_count(HasBits * has_bits)764 static void set_has_event_connection_count(HasBits* has_bits) {
765 (*has_bits)[0] |= 512u;
766 }
767 static const ::android::surfaceflinger::FrameTimingHistogram& frame_duration(const SurfaceflingerStatsGlobalInfo* msg);
set_has_frame_duration(HasBits * has_bits)768 static void set_has_frame_duration(HasBits* has_bits) {
769 (*has_bits)[0] |= 1u;
770 }
771 static const ::android::surfaceflinger::FrameTimingHistogram& render_engine_timing(const SurfaceflingerStatsGlobalInfo* msg);
set_has_render_engine_timing(HasBits * has_bits)772 static void set_has_render_engine_timing(HasBits* has_bits) {
773 (*has_bits)[0] |= 2u;
774 }
set_has_total_timeline_frames(HasBits * has_bits)775 static void set_has_total_timeline_frames(HasBits* has_bits) {
776 (*has_bits)[0] |= 1024u;
777 }
set_has_total_janky_frames(HasBits * has_bits)778 static void set_has_total_janky_frames(HasBits* has_bits) {
779 (*has_bits)[0] |= 2048u;
780 }
set_has_total_janky_frames_with_long_cpu(HasBits * has_bits)781 static void set_has_total_janky_frames_with_long_cpu(HasBits* has_bits) {
782 (*has_bits)[0] |= 4096u;
783 }
set_has_total_janky_frames_with_long_gpu(HasBits * has_bits)784 static void set_has_total_janky_frames_with_long_gpu(HasBits* has_bits) {
785 (*has_bits)[0] |= 8192u;
786 }
set_has_total_janky_frames_sf_unattributed(HasBits * has_bits)787 static void set_has_total_janky_frames_sf_unattributed(HasBits* has_bits) {
788 (*has_bits)[0] |= 16384u;
789 }
set_has_total_janky_frames_app_unattributed(HasBits * has_bits)790 static void set_has_total_janky_frames_app_unattributed(HasBits* has_bits) {
791 (*has_bits)[0] |= 32768u;
792 }
set_has_total_janky_frames_sf_scheduling(HasBits * has_bits)793 static void set_has_total_janky_frames_sf_scheduling(HasBits* has_bits) {
794 (*has_bits)[0] |= 65536u;
795 }
set_has_total_jank_frames_sf_prediction_error(HasBits * has_bits)796 static void set_has_total_jank_frames_sf_prediction_error(HasBits* has_bits) {
797 (*has_bits)[0] |= 131072u;
798 }
set_has_total_jank_frames_app_buffer_stuffing(HasBits * has_bits)799 static void set_has_total_jank_frames_app_buffer_stuffing(HasBits* has_bits) {
800 (*has_bits)[0] |= 262144u;
801 }
802 static const ::android::surfaceflinger::FrameTimingHistogram& sf_deadline_misses(const SurfaceflingerStatsGlobalInfo* msg);
set_has_sf_deadline_misses(HasBits * has_bits)803 static void set_has_sf_deadline_misses(HasBits* has_bits) {
804 (*has_bits)[0] |= 4u;
805 }
806 static const ::android::surfaceflinger::FrameTimingHistogram& sf_prediction_errors(const SurfaceflingerStatsGlobalInfo* msg);
set_has_sf_prediction_errors(HasBits * has_bits)807 static void set_has_sf_prediction_errors(HasBits* has_bits) {
808 (*has_bits)[0] |= 8u;
809 }
810 };
811
812 const ::android::surfaceflinger::FrameTimingHistogram&
frame_duration(const SurfaceflingerStatsGlobalInfo * msg)813 SurfaceflingerStatsGlobalInfo::_Internal::frame_duration(const SurfaceflingerStatsGlobalInfo* msg) {
814 return *msg->_impl_.frame_duration_;
815 }
816 const ::android::surfaceflinger::FrameTimingHistogram&
render_engine_timing(const SurfaceflingerStatsGlobalInfo * msg)817 SurfaceflingerStatsGlobalInfo::_Internal::render_engine_timing(const SurfaceflingerStatsGlobalInfo* msg) {
818 return *msg->_impl_.render_engine_timing_;
819 }
820 const ::android::surfaceflinger::FrameTimingHistogram&
sf_deadline_misses(const SurfaceflingerStatsGlobalInfo * msg)821 SurfaceflingerStatsGlobalInfo::_Internal::sf_deadline_misses(const SurfaceflingerStatsGlobalInfo* msg) {
822 return *msg->_impl_.sf_deadline_misses_;
823 }
824 const ::android::surfaceflinger::FrameTimingHistogram&
sf_prediction_errors(const SurfaceflingerStatsGlobalInfo * msg)825 SurfaceflingerStatsGlobalInfo::_Internal::sf_prediction_errors(const SurfaceflingerStatsGlobalInfo* msg) {
826 return *msg->_impl_.sf_prediction_errors_;
827 }
SurfaceflingerStatsGlobalInfo(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)828 SurfaceflingerStatsGlobalInfo::SurfaceflingerStatsGlobalInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
829 bool is_message_owned)
830 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
831 SharedCtor(arena, is_message_owned);
832 // @@protoc_insertion_point(arena_constructor:android.surfaceflinger.SurfaceflingerStatsGlobalInfo)
833 }
SurfaceflingerStatsGlobalInfo(const SurfaceflingerStatsGlobalInfo & from)834 SurfaceflingerStatsGlobalInfo::SurfaceflingerStatsGlobalInfo(const SurfaceflingerStatsGlobalInfo& from)
835 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
836 SurfaceflingerStatsGlobalInfo* const _this = this; (void)_this;
837 new (&_impl_) Impl_{
838 decltype(_impl_._has_bits_){from._impl_._has_bits_}
839 , /*decltype(_impl_._cached_size_)*/{}
840 , decltype(_impl_.frame_duration_){nullptr}
841 , decltype(_impl_.render_engine_timing_){nullptr}
842 , decltype(_impl_.sf_deadline_misses_){nullptr}
843 , decltype(_impl_.sf_prediction_errors_){nullptr}
844 , decltype(_impl_.total_frames_){}
845 , decltype(_impl_.missed_frames_){}
846 , decltype(_impl_.client_composition_frames_){}
847 , decltype(_impl_.display_on_millis_){}
848 , decltype(_impl_.animation_millis_){}
849 , decltype(_impl_.event_connection_count_){}
850 , decltype(_impl_.total_timeline_frames_){}
851 , decltype(_impl_.total_janky_frames_){}
852 , decltype(_impl_.total_janky_frames_with_long_cpu_){}
853 , decltype(_impl_.total_janky_frames_with_long_gpu_){}
854 , decltype(_impl_.total_janky_frames_sf_unattributed_){}
855 , decltype(_impl_.total_janky_frames_app_unattributed_){}
856 , decltype(_impl_.total_janky_frames_sf_scheduling_){}
857 , decltype(_impl_.total_jank_frames_sf_prediction_error_){}
858 , decltype(_impl_.total_jank_frames_app_buffer_stuffing_){}
859 , decltype(_impl_.display_refresh_rate_bucket_){}
860 , decltype(_impl_.render_rate_bucket_){}};
861
862 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
863 if (from._internal_has_frame_duration()) {
864 _this->_impl_.frame_duration_ = new ::android::surfaceflinger::FrameTimingHistogram(*from._impl_.frame_duration_);
865 }
866 if (from._internal_has_render_engine_timing()) {
867 _this->_impl_.render_engine_timing_ = new ::android::surfaceflinger::FrameTimingHistogram(*from._impl_.render_engine_timing_);
868 }
869 if (from._internal_has_sf_deadline_misses()) {
870 _this->_impl_.sf_deadline_misses_ = new ::android::surfaceflinger::FrameTimingHistogram(*from._impl_.sf_deadline_misses_);
871 }
872 if (from._internal_has_sf_prediction_errors()) {
873 _this->_impl_.sf_prediction_errors_ = new ::android::surfaceflinger::FrameTimingHistogram(*from._impl_.sf_prediction_errors_);
874 }
875 ::memcpy(&_impl_.total_frames_, &from._impl_.total_frames_,
876 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.render_rate_bucket_) -
877 reinterpret_cast<char*>(&_impl_.total_frames_)) + sizeof(_impl_.render_rate_bucket_));
878 // @@protoc_insertion_point(copy_constructor:android.surfaceflinger.SurfaceflingerStatsGlobalInfo)
879 }
880
SharedCtor(::_pb::Arena * arena,bool is_message_owned)881 inline void SurfaceflingerStatsGlobalInfo::SharedCtor(
882 ::_pb::Arena* arena, bool is_message_owned) {
883 (void)arena;
884 (void)is_message_owned;
885 new (&_impl_) Impl_{
886 decltype(_impl_._has_bits_){}
887 , /*decltype(_impl_._cached_size_)*/{}
888 , decltype(_impl_.frame_duration_){nullptr}
889 , decltype(_impl_.render_engine_timing_){nullptr}
890 , decltype(_impl_.sf_deadline_misses_){nullptr}
891 , decltype(_impl_.sf_prediction_errors_){nullptr}
892 , decltype(_impl_.total_frames_){::int64_t{0}}
893 , decltype(_impl_.missed_frames_){::int64_t{0}}
894 , decltype(_impl_.client_composition_frames_){::int64_t{0}}
895 , decltype(_impl_.display_on_millis_){::int64_t{0}}
896 , decltype(_impl_.animation_millis_){::int64_t{0}}
897 , decltype(_impl_.event_connection_count_){0}
898 , decltype(_impl_.total_timeline_frames_){0}
899 , decltype(_impl_.total_janky_frames_){0}
900 , decltype(_impl_.total_janky_frames_with_long_cpu_){0}
901 , decltype(_impl_.total_janky_frames_with_long_gpu_){0}
902 , decltype(_impl_.total_janky_frames_sf_unattributed_){0}
903 , decltype(_impl_.total_janky_frames_app_unattributed_){0}
904 , decltype(_impl_.total_janky_frames_sf_scheduling_){0}
905 , decltype(_impl_.total_jank_frames_sf_prediction_error_){0}
906 , decltype(_impl_.total_jank_frames_app_buffer_stuffing_){0}
907 , decltype(_impl_.display_refresh_rate_bucket_){0}
908 , decltype(_impl_.render_rate_bucket_){0}
909 };
910 }
911
~SurfaceflingerStatsGlobalInfo()912 SurfaceflingerStatsGlobalInfo::~SurfaceflingerStatsGlobalInfo() {
913 // @@protoc_insertion_point(destructor:android.surfaceflinger.SurfaceflingerStatsGlobalInfo)
914 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
915 (void)arena;
916 return;
917 }
918 SharedDtor();
919 }
920
SharedDtor()921 inline void SurfaceflingerStatsGlobalInfo::SharedDtor() {
922 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
923 if (this != internal_default_instance()) delete _impl_.frame_duration_;
924 if (this != internal_default_instance()) delete _impl_.render_engine_timing_;
925 if (this != internal_default_instance()) delete _impl_.sf_deadline_misses_;
926 if (this != internal_default_instance()) delete _impl_.sf_prediction_errors_;
927 }
928
SetCachedSize(int size) const929 void SurfaceflingerStatsGlobalInfo::SetCachedSize(int size) const {
930 _impl_._cached_size_.Set(size);
931 }
932
Clear()933 void SurfaceflingerStatsGlobalInfo::Clear() {
934 // @@protoc_insertion_point(message_clear_start:android.surfaceflinger.SurfaceflingerStatsGlobalInfo)
935 ::uint32_t cached_has_bits = 0;
936 // Prevent compiler warnings about cached_has_bits being unused
937 (void) cached_has_bits;
938
939 cached_has_bits = _impl_._has_bits_[0];
940 if (cached_has_bits & 0x0000000fu) {
941 if (cached_has_bits & 0x00000001u) {
942 GOOGLE_DCHECK(_impl_.frame_duration_ != nullptr);
943 _impl_.frame_duration_->Clear();
944 }
945 if (cached_has_bits & 0x00000002u) {
946 GOOGLE_DCHECK(_impl_.render_engine_timing_ != nullptr);
947 _impl_.render_engine_timing_->Clear();
948 }
949 if (cached_has_bits & 0x00000004u) {
950 GOOGLE_DCHECK(_impl_.sf_deadline_misses_ != nullptr);
951 _impl_.sf_deadline_misses_->Clear();
952 }
953 if (cached_has_bits & 0x00000008u) {
954 GOOGLE_DCHECK(_impl_.sf_prediction_errors_ != nullptr);
955 _impl_.sf_prediction_errors_->Clear();
956 }
957 }
958 if (cached_has_bits & 0x000000f0u) {
959 ::memset(&_impl_.total_frames_, 0, static_cast<size_t>(
960 reinterpret_cast<char*>(&_impl_.display_on_millis_) -
961 reinterpret_cast<char*>(&_impl_.total_frames_)) + sizeof(_impl_.display_on_millis_));
962 }
963 if (cached_has_bits & 0x0000ff00u) {
964 ::memset(&_impl_.animation_millis_, 0, static_cast<size_t>(
965 reinterpret_cast<char*>(&_impl_.total_janky_frames_app_unattributed_) -
966 reinterpret_cast<char*>(&_impl_.animation_millis_)) + sizeof(_impl_.total_janky_frames_app_unattributed_));
967 }
968 if (cached_has_bits & 0x001f0000u) {
969 ::memset(&_impl_.total_janky_frames_sf_scheduling_, 0, static_cast<size_t>(
970 reinterpret_cast<char*>(&_impl_.render_rate_bucket_) -
971 reinterpret_cast<char*>(&_impl_.total_janky_frames_sf_scheduling_)) + sizeof(_impl_.render_rate_bucket_));
972 }
973 _impl_._has_bits_.Clear();
974 _internal_metadata_.Clear<std::string>();
975 }
976
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)977 const char* SurfaceflingerStatsGlobalInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
978 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
979 _Internal::HasBits has_bits{};
980 while (!ctx->Done(&ptr)) {
981 ::uint32_t tag;
982 ptr = ::_pbi::ReadTag(ptr, &tag);
983 switch (tag >> 3) {
984 // optional int64 total_frames = 1;
985 case 1:
986 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
987 _Internal::set_has_total_frames(&has_bits);
988 _impl_.total_frames_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
989 CHK_(ptr);
990 } else {
991 goto handle_unusual;
992 }
993 continue;
994 // optional int64 missed_frames = 2;
995 case 2:
996 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
997 _Internal::set_has_missed_frames(&has_bits);
998 _impl_.missed_frames_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
999 CHK_(ptr);
1000 } else {
1001 goto handle_unusual;
1002 }
1003 continue;
1004 // optional int64 client_composition_frames = 3;
1005 case 3:
1006 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1007 _Internal::set_has_client_composition_frames(&has_bits);
1008 _impl_.client_composition_frames_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1009 CHK_(ptr);
1010 } else {
1011 goto handle_unusual;
1012 }
1013 continue;
1014 // optional int64 display_on_millis = 4;
1015 case 4:
1016 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
1017 _Internal::set_has_display_on_millis(&has_bits);
1018 _impl_.display_on_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1019 CHK_(ptr);
1020 } else {
1021 goto handle_unusual;
1022 }
1023 continue;
1024 // optional int64 animation_millis = 5;
1025 case 5:
1026 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
1027 _Internal::set_has_animation_millis(&has_bits);
1028 _impl_.animation_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1029 CHK_(ptr);
1030 } else {
1031 goto handle_unusual;
1032 }
1033 continue;
1034 // optional int32 event_connection_count = 6;
1035 case 6:
1036 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
1037 _Internal::set_has_event_connection_count(&has_bits);
1038 _impl_.event_connection_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1039 CHK_(ptr);
1040 } else {
1041 goto handle_unusual;
1042 }
1043 continue;
1044 // optional .android.surfaceflinger.FrameTimingHistogram frame_duration = 7;
1045 case 7:
1046 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
1047 ptr = ctx->ParseMessage(_internal_mutable_frame_duration(), ptr);
1048 CHK_(ptr);
1049 } else {
1050 goto handle_unusual;
1051 }
1052 continue;
1053 // optional .android.surfaceflinger.FrameTimingHistogram render_engine_timing = 8;
1054 case 8:
1055 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
1056 ptr = ctx->ParseMessage(_internal_mutable_render_engine_timing(), ptr);
1057 CHK_(ptr);
1058 } else {
1059 goto handle_unusual;
1060 }
1061 continue;
1062 // optional int32 total_timeline_frames = 9;
1063 case 9:
1064 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
1065 _Internal::set_has_total_timeline_frames(&has_bits);
1066 _impl_.total_timeline_frames_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1067 CHK_(ptr);
1068 } else {
1069 goto handle_unusual;
1070 }
1071 continue;
1072 // optional int32 total_janky_frames = 10;
1073 case 10:
1074 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
1075 _Internal::set_has_total_janky_frames(&has_bits);
1076 _impl_.total_janky_frames_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1077 CHK_(ptr);
1078 } else {
1079 goto handle_unusual;
1080 }
1081 continue;
1082 // optional int32 total_janky_frames_with_long_cpu = 11;
1083 case 11:
1084 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 88)) {
1085 _Internal::set_has_total_janky_frames_with_long_cpu(&has_bits);
1086 _impl_.total_janky_frames_with_long_cpu_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1087 CHK_(ptr);
1088 } else {
1089 goto handle_unusual;
1090 }
1091 continue;
1092 // optional int32 total_janky_frames_with_long_gpu = 12;
1093 case 12:
1094 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 96)) {
1095 _Internal::set_has_total_janky_frames_with_long_gpu(&has_bits);
1096 _impl_.total_janky_frames_with_long_gpu_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1097 CHK_(ptr);
1098 } else {
1099 goto handle_unusual;
1100 }
1101 continue;
1102 // optional int32 total_janky_frames_sf_unattributed = 13;
1103 case 13:
1104 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 104)) {
1105 _Internal::set_has_total_janky_frames_sf_unattributed(&has_bits);
1106 _impl_.total_janky_frames_sf_unattributed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1107 CHK_(ptr);
1108 } else {
1109 goto handle_unusual;
1110 }
1111 continue;
1112 // optional int32 total_janky_frames_app_unattributed = 14;
1113 case 14:
1114 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 112)) {
1115 _Internal::set_has_total_janky_frames_app_unattributed(&has_bits);
1116 _impl_.total_janky_frames_app_unattributed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1117 CHK_(ptr);
1118 } else {
1119 goto handle_unusual;
1120 }
1121 continue;
1122 // optional int32 total_janky_frames_sf_scheduling = 15;
1123 case 15:
1124 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 120)) {
1125 _Internal::set_has_total_janky_frames_sf_scheduling(&has_bits);
1126 _impl_.total_janky_frames_sf_scheduling_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1127 CHK_(ptr);
1128 } else {
1129 goto handle_unusual;
1130 }
1131 continue;
1132 // optional int32 total_jank_frames_sf_prediction_error = 16;
1133 case 16:
1134 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 128)) {
1135 _Internal::set_has_total_jank_frames_sf_prediction_error(&has_bits);
1136 _impl_.total_jank_frames_sf_prediction_error_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1137 CHK_(ptr);
1138 } else {
1139 goto handle_unusual;
1140 }
1141 continue;
1142 // optional int32 total_jank_frames_app_buffer_stuffing = 17;
1143 case 17:
1144 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 136)) {
1145 _Internal::set_has_total_jank_frames_app_buffer_stuffing(&has_bits);
1146 _impl_.total_jank_frames_app_buffer_stuffing_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1147 CHK_(ptr);
1148 } else {
1149 goto handle_unusual;
1150 }
1151 continue;
1152 // optional int32 display_refresh_rate_bucket = 18;
1153 case 18:
1154 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 144)) {
1155 _Internal::set_has_display_refresh_rate_bucket(&has_bits);
1156 _impl_.display_refresh_rate_bucket_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1157 CHK_(ptr);
1158 } else {
1159 goto handle_unusual;
1160 }
1161 continue;
1162 // optional .android.surfaceflinger.FrameTimingHistogram sf_deadline_misses = 19;
1163 case 19:
1164 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 154)) {
1165 ptr = ctx->ParseMessage(_internal_mutable_sf_deadline_misses(), ptr);
1166 CHK_(ptr);
1167 } else {
1168 goto handle_unusual;
1169 }
1170 continue;
1171 // optional .android.surfaceflinger.FrameTimingHistogram sf_prediction_errors = 20;
1172 case 20:
1173 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 162)) {
1174 ptr = ctx->ParseMessage(_internal_mutable_sf_prediction_errors(), ptr);
1175 CHK_(ptr);
1176 } else {
1177 goto handle_unusual;
1178 }
1179 continue;
1180 // optional int32 render_rate_bucket = 21;
1181 case 21:
1182 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 168)) {
1183 _Internal::set_has_render_rate_bucket(&has_bits);
1184 _impl_.render_rate_bucket_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1185 CHK_(ptr);
1186 } else {
1187 goto handle_unusual;
1188 }
1189 continue;
1190 default:
1191 goto handle_unusual;
1192 } // switch
1193 handle_unusual:
1194 if ((tag == 0) || ((tag & 7) == 4)) {
1195 CHK_(ptr);
1196 ctx->SetLastTag(tag);
1197 goto message_done;
1198 }
1199 ptr = UnknownFieldParse(
1200 tag,
1201 _internal_metadata_.mutable_unknown_fields<std::string>(),
1202 ptr, ctx);
1203 CHK_(ptr != nullptr);
1204 } // while
1205 message_done:
1206 _impl_._has_bits_.Or(has_bits);
1207 return ptr;
1208 failure:
1209 ptr = nullptr;
1210 goto message_done;
1211 #undef CHK_
1212 }
1213
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1214 ::uint8_t* SurfaceflingerStatsGlobalInfo::_InternalSerialize(
1215 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1216 // @@protoc_insertion_point(serialize_to_array_start:android.surfaceflinger.SurfaceflingerStatsGlobalInfo)
1217 ::uint32_t cached_has_bits = 0;
1218 (void) cached_has_bits;
1219
1220 cached_has_bits = _impl_._has_bits_[0];
1221 // optional int64 total_frames = 1;
1222 if (cached_has_bits & 0x00000010u) {
1223 target = stream->EnsureSpace(target);
1224 target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_total_frames(), target);
1225 }
1226
1227 // optional int64 missed_frames = 2;
1228 if (cached_has_bits & 0x00000020u) {
1229 target = stream->EnsureSpace(target);
1230 target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_missed_frames(), target);
1231 }
1232
1233 // optional int64 client_composition_frames = 3;
1234 if (cached_has_bits & 0x00000040u) {
1235 target = stream->EnsureSpace(target);
1236 target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_client_composition_frames(), target);
1237 }
1238
1239 // optional int64 display_on_millis = 4;
1240 if (cached_has_bits & 0x00000080u) {
1241 target = stream->EnsureSpace(target);
1242 target = ::_pbi::WireFormatLite::WriteInt64ToArray(4, this->_internal_display_on_millis(), target);
1243 }
1244
1245 // optional int64 animation_millis = 5;
1246 if (cached_has_bits & 0x00000100u) {
1247 target = stream->EnsureSpace(target);
1248 target = ::_pbi::WireFormatLite::WriteInt64ToArray(5, this->_internal_animation_millis(), target);
1249 }
1250
1251 // optional int32 event_connection_count = 6;
1252 if (cached_has_bits & 0x00000200u) {
1253 target = stream->EnsureSpace(target);
1254 target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_event_connection_count(), target);
1255 }
1256
1257 // optional .android.surfaceflinger.FrameTimingHistogram frame_duration = 7;
1258 if (cached_has_bits & 0x00000001u) {
1259 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1260 InternalWriteMessage(7, _Internal::frame_duration(this),
1261 _Internal::frame_duration(this).GetCachedSize(), target, stream);
1262 }
1263
1264 // optional .android.surfaceflinger.FrameTimingHistogram render_engine_timing = 8;
1265 if (cached_has_bits & 0x00000002u) {
1266 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1267 InternalWriteMessage(8, _Internal::render_engine_timing(this),
1268 _Internal::render_engine_timing(this).GetCachedSize(), target, stream);
1269 }
1270
1271 // optional int32 total_timeline_frames = 9;
1272 if (cached_has_bits & 0x00000400u) {
1273 target = stream->EnsureSpace(target);
1274 target = ::_pbi::WireFormatLite::WriteInt32ToArray(9, this->_internal_total_timeline_frames(), target);
1275 }
1276
1277 // optional int32 total_janky_frames = 10;
1278 if (cached_has_bits & 0x00000800u) {
1279 target = stream->EnsureSpace(target);
1280 target = ::_pbi::WireFormatLite::WriteInt32ToArray(10, this->_internal_total_janky_frames(), target);
1281 }
1282
1283 // optional int32 total_janky_frames_with_long_cpu = 11;
1284 if (cached_has_bits & 0x00001000u) {
1285 target = stream->EnsureSpace(target);
1286 target = ::_pbi::WireFormatLite::WriteInt32ToArray(11, this->_internal_total_janky_frames_with_long_cpu(), target);
1287 }
1288
1289 // optional int32 total_janky_frames_with_long_gpu = 12;
1290 if (cached_has_bits & 0x00002000u) {
1291 target = stream->EnsureSpace(target);
1292 target = ::_pbi::WireFormatLite::WriteInt32ToArray(12, this->_internal_total_janky_frames_with_long_gpu(), target);
1293 }
1294
1295 // optional int32 total_janky_frames_sf_unattributed = 13;
1296 if (cached_has_bits & 0x00004000u) {
1297 target = stream->EnsureSpace(target);
1298 target = ::_pbi::WireFormatLite::WriteInt32ToArray(13, this->_internal_total_janky_frames_sf_unattributed(), target);
1299 }
1300
1301 // optional int32 total_janky_frames_app_unattributed = 14;
1302 if (cached_has_bits & 0x00008000u) {
1303 target = stream->EnsureSpace(target);
1304 target = ::_pbi::WireFormatLite::WriteInt32ToArray(14, this->_internal_total_janky_frames_app_unattributed(), target);
1305 }
1306
1307 // optional int32 total_janky_frames_sf_scheduling = 15;
1308 if (cached_has_bits & 0x00010000u) {
1309 target = stream->EnsureSpace(target);
1310 target = ::_pbi::WireFormatLite::WriteInt32ToArray(15, this->_internal_total_janky_frames_sf_scheduling(), target);
1311 }
1312
1313 // optional int32 total_jank_frames_sf_prediction_error = 16;
1314 if (cached_has_bits & 0x00020000u) {
1315 target = stream->EnsureSpace(target);
1316 target = ::_pbi::WireFormatLite::WriteInt32ToArray(16, this->_internal_total_jank_frames_sf_prediction_error(), target);
1317 }
1318
1319 // optional int32 total_jank_frames_app_buffer_stuffing = 17;
1320 if (cached_has_bits & 0x00040000u) {
1321 target = stream->EnsureSpace(target);
1322 target = ::_pbi::WireFormatLite::WriteInt32ToArray(17, this->_internal_total_jank_frames_app_buffer_stuffing(), target);
1323 }
1324
1325 // optional int32 display_refresh_rate_bucket = 18;
1326 if (cached_has_bits & 0x00080000u) {
1327 target = stream->EnsureSpace(target);
1328 target = ::_pbi::WireFormatLite::WriteInt32ToArray(18, this->_internal_display_refresh_rate_bucket(), target);
1329 }
1330
1331 // optional .android.surfaceflinger.FrameTimingHistogram sf_deadline_misses = 19;
1332 if (cached_has_bits & 0x00000004u) {
1333 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1334 InternalWriteMessage(19, _Internal::sf_deadline_misses(this),
1335 _Internal::sf_deadline_misses(this).GetCachedSize(), target, stream);
1336 }
1337
1338 // optional .android.surfaceflinger.FrameTimingHistogram sf_prediction_errors = 20;
1339 if (cached_has_bits & 0x00000008u) {
1340 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1341 InternalWriteMessage(20, _Internal::sf_prediction_errors(this),
1342 _Internal::sf_prediction_errors(this).GetCachedSize(), target, stream);
1343 }
1344
1345 // optional int32 render_rate_bucket = 21;
1346 if (cached_has_bits & 0x00100000u) {
1347 target = stream->EnsureSpace(target);
1348 target = ::_pbi::WireFormatLite::WriteInt32ToArray(21, this->_internal_render_rate_bucket(), target);
1349 }
1350
1351 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1352 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1353 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1354 }
1355 // @@protoc_insertion_point(serialize_to_array_end:android.surfaceflinger.SurfaceflingerStatsGlobalInfo)
1356 return target;
1357 }
1358
ByteSizeLong() const1359 size_t SurfaceflingerStatsGlobalInfo::ByteSizeLong() const {
1360 // @@protoc_insertion_point(message_byte_size_start:android.surfaceflinger.SurfaceflingerStatsGlobalInfo)
1361 size_t total_size = 0;
1362
1363 ::uint32_t cached_has_bits = 0;
1364 // Prevent compiler warnings about cached_has_bits being unused
1365 (void) cached_has_bits;
1366
1367 cached_has_bits = _impl_._has_bits_[0];
1368 if (cached_has_bits & 0x000000ffu) {
1369 // optional .android.surfaceflinger.FrameTimingHistogram frame_duration = 7;
1370 if (cached_has_bits & 0x00000001u) {
1371 total_size += 1 +
1372 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1373 *_impl_.frame_duration_);
1374 }
1375
1376 // optional .android.surfaceflinger.FrameTimingHistogram render_engine_timing = 8;
1377 if (cached_has_bits & 0x00000002u) {
1378 total_size += 1 +
1379 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1380 *_impl_.render_engine_timing_);
1381 }
1382
1383 // optional .android.surfaceflinger.FrameTimingHistogram sf_deadline_misses = 19;
1384 if (cached_has_bits & 0x00000004u) {
1385 total_size += 2 +
1386 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1387 *_impl_.sf_deadline_misses_);
1388 }
1389
1390 // optional .android.surfaceflinger.FrameTimingHistogram sf_prediction_errors = 20;
1391 if (cached_has_bits & 0x00000008u) {
1392 total_size += 2 +
1393 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1394 *_impl_.sf_prediction_errors_);
1395 }
1396
1397 // optional int64 total_frames = 1;
1398 if (cached_has_bits & 0x00000010u) {
1399 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_total_frames());
1400 }
1401
1402 // optional int64 missed_frames = 2;
1403 if (cached_has_bits & 0x00000020u) {
1404 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_missed_frames());
1405 }
1406
1407 // optional int64 client_composition_frames = 3;
1408 if (cached_has_bits & 0x00000040u) {
1409 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_client_composition_frames());
1410 }
1411
1412 // optional int64 display_on_millis = 4;
1413 if (cached_has_bits & 0x00000080u) {
1414 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_display_on_millis());
1415 }
1416
1417 }
1418 if (cached_has_bits & 0x0000ff00u) {
1419 // optional int64 animation_millis = 5;
1420 if (cached_has_bits & 0x00000100u) {
1421 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_animation_millis());
1422 }
1423
1424 // optional int32 event_connection_count = 6;
1425 if (cached_has_bits & 0x00000200u) {
1426 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_event_connection_count());
1427 }
1428
1429 // optional int32 total_timeline_frames = 9;
1430 if (cached_has_bits & 0x00000400u) {
1431 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_total_timeline_frames());
1432 }
1433
1434 // optional int32 total_janky_frames = 10;
1435 if (cached_has_bits & 0x00000800u) {
1436 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_total_janky_frames());
1437 }
1438
1439 // optional int32 total_janky_frames_with_long_cpu = 11;
1440 if (cached_has_bits & 0x00001000u) {
1441 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_total_janky_frames_with_long_cpu());
1442 }
1443
1444 // optional int32 total_janky_frames_with_long_gpu = 12;
1445 if (cached_has_bits & 0x00002000u) {
1446 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_total_janky_frames_with_long_gpu());
1447 }
1448
1449 // optional int32 total_janky_frames_sf_unattributed = 13;
1450 if (cached_has_bits & 0x00004000u) {
1451 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_total_janky_frames_sf_unattributed());
1452 }
1453
1454 // optional int32 total_janky_frames_app_unattributed = 14;
1455 if (cached_has_bits & 0x00008000u) {
1456 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_total_janky_frames_app_unattributed());
1457 }
1458
1459 }
1460 if (cached_has_bits & 0x001f0000u) {
1461 // optional int32 total_janky_frames_sf_scheduling = 15;
1462 if (cached_has_bits & 0x00010000u) {
1463 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_total_janky_frames_sf_scheduling());
1464 }
1465
1466 // optional int32 total_jank_frames_sf_prediction_error = 16;
1467 if (cached_has_bits & 0x00020000u) {
1468 total_size += 2 +
1469 ::_pbi::WireFormatLite::Int32Size(
1470 this->_internal_total_jank_frames_sf_prediction_error());
1471 }
1472
1473 // optional int32 total_jank_frames_app_buffer_stuffing = 17;
1474 if (cached_has_bits & 0x00040000u) {
1475 total_size += 2 +
1476 ::_pbi::WireFormatLite::Int32Size(
1477 this->_internal_total_jank_frames_app_buffer_stuffing());
1478 }
1479
1480 // optional int32 display_refresh_rate_bucket = 18;
1481 if (cached_has_bits & 0x00080000u) {
1482 total_size += 2 +
1483 ::_pbi::WireFormatLite::Int32Size(
1484 this->_internal_display_refresh_rate_bucket());
1485 }
1486
1487 // optional int32 render_rate_bucket = 21;
1488 if (cached_has_bits & 0x00100000u) {
1489 total_size += 2 +
1490 ::_pbi::WireFormatLite::Int32Size(
1491 this->_internal_render_rate_bucket());
1492 }
1493
1494 }
1495 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1496 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1497 }
1498 int cached_size = ::_pbi::ToCachedSize(total_size);
1499 SetCachedSize(cached_size);
1500 return total_size;
1501 }
1502
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1503 void SurfaceflingerStatsGlobalInfo::CheckTypeAndMergeFrom(
1504 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1505 MergeFrom(*::_pbi::DownCast<const SurfaceflingerStatsGlobalInfo*>(
1506 &from));
1507 }
1508
MergeFrom(const SurfaceflingerStatsGlobalInfo & from)1509 void SurfaceflingerStatsGlobalInfo::MergeFrom(const SurfaceflingerStatsGlobalInfo& from) {
1510 SurfaceflingerStatsGlobalInfo* const _this = this;
1511 // @@protoc_insertion_point(class_specific_merge_from_start:android.surfaceflinger.SurfaceflingerStatsGlobalInfo)
1512 GOOGLE_DCHECK_NE(&from, _this);
1513 ::uint32_t cached_has_bits = 0;
1514 (void) cached_has_bits;
1515
1516 cached_has_bits = from._impl_._has_bits_[0];
1517 if (cached_has_bits & 0x000000ffu) {
1518 if (cached_has_bits & 0x00000001u) {
1519 _this->_internal_mutable_frame_duration()->::android::surfaceflinger::FrameTimingHistogram::MergeFrom(
1520 from._internal_frame_duration());
1521 }
1522 if (cached_has_bits & 0x00000002u) {
1523 _this->_internal_mutable_render_engine_timing()->::android::surfaceflinger::FrameTimingHistogram::MergeFrom(
1524 from._internal_render_engine_timing());
1525 }
1526 if (cached_has_bits & 0x00000004u) {
1527 _this->_internal_mutable_sf_deadline_misses()->::android::surfaceflinger::FrameTimingHistogram::MergeFrom(
1528 from._internal_sf_deadline_misses());
1529 }
1530 if (cached_has_bits & 0x00000008u) {
1531 _this->_internal_mutable_sf_prediction_errors()->::android::surfaceflinger::FrameTimingHistogram::MergeFrom(
1532 from._internal_sf_prediction_errors());
1533 }
1534 if (cached_has_bits & 0x00000010u) {
1535 _this->_impl_.total_frames_ = from._impl_.total_frames_;
1536 }
1537 if (cached_has_bits & 0x00000020u) {
1538 _this->_impl_.missed_frames_ = from._impl_.missed_frames_;
1539 }
1540 if (cached_has_bits & 0x00000040u) {
1541 _this->_impl_.client_composition_frames_ = from._impl_.client_composition_frames_;
1542 }
1543 if (cached_has_bits & 0x00000080u) {
1544 _this->_impl_.display_on_millis_ = from._impl_.display_on_millis_;
1545 }
1546 _this->_impl_._has_bits_[0] |= cached_has_bits;
1547 }
1548 if (cached_has_bits & 0x0000ff00u) {
1549 if (cached_has_bits & 0x00000100u) {
1550 _this->_impl_.animation_millis_ = from._impl_.animation_millis_;
1551 }
1552 if (cached_has_bits & 0x00000200u) {
1553 _this->_impl_.event_connection_count_ = from._impl_.event_connection_count_;
1554 }
1555 if (cached_has_bits & 0x00000400u) {
1556 _this->_impl_.total_timeline_frames_ = from._impl_.total_timeline_frames_;
1557 }
1558 if (cached_has_bits & 0x00000800u) {
1559 _this->_impl_.total_janky_frames_ = from._impl_.total_janky_frames_;
1560 }
1561 if (cached_has_bits & 0x00001000u) {
1562 _this->_impl_.total_janky_frames_with_long_cpu_ = from._impl_.total_janky_frames_with_long_cpu_;
1563 }
1564 if (cached_has_bits & 0x00002000u) {
1565 _this->_impl_.total_janky_frames_with_long_gpu_ = from._impl_.total_janky_frames_with_long_gpu_;
1566 }
1567 if (cached_has_bits & 0x00004000u) {
1568 _this->_impl_.total_janky_frames_sf_unattributed_ = from._impl_.total_janky_frames_sf_unattributed_;
1569 }
1570 if (cached_has_bits & 0x00008000u) {
1571 _this->_impl_.total_janky_frames_app_unattributed_ = from._impl_.total_janky_frames_app_unattributed_;
1572 }
1573 _this->_impl_._has_bits_[0] |= cached_has_bits;
1574 }
1575 if (cached_has_bits & 0x001f0000u) {
1576 if (cached_has_bits & 0x00010000u) {
1577 _this->_impl_.total_janky_frames_sf_scheduling_ = from._impl_.total_janky_frames_sf_scheduling_;
1578 }
1579 if (cached_has_bits & 0x00020000u) {
1580 _this->_impl_.total_jank_frames_sf_prediction_error_ = from._impl_.total_jank_frames_sf_prediction_error_;
1581 }
1582 if (cached_has_bits & 0x00040000u) {
1583 _this->_impl_.total_jank_frames_app_buffer_stuffing_ = from._impl_.total_jank_frames_app_buffer_stuffing_;
1584 }
1585 if (cached_has_bits & 0x00080000u) {
1586 _this->_impl_.display_refresh_rate_bucket_ = from._impl_.display_refresh_rate_bucket_;
1587 }
1588 if (cached_has_bits & 0x00100000u) {
1589 _this->_impl_.render_rate_bucket_ = from._impl_.render_rate_bucket_;
1590 }
1591 _this->_impl_._has_bits_[0] |= cached_has_bits;
1592 }
1593 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1594 }
1595
CopyFrom(const SurfaceflingerStatsGlobalInfo & from)1596 void SurfaceflingerStatsGlobalInfo::CopyFrom(const SurfaceflingerStatsGlobalInfo& from) {
1597 // @@protoc_insertion_point(class_specific_copy_from_start:android.surfaceflinger.SurfaceflingerStatsGlobalInfo)
1598 if (&from == this) return;
1599 Clear();
1600 MergeFrom(from);
1601 }
1602
IsInitialized() const1603 bool SurfaceflingerStatsGlobalInfo::IsInitialized() const {
1604 return true;
1605 }
1606
InternalSwap(SurfaceflingerStatsGlobalInfo * other)1607 void SurfaceflingerStatsGlobalInfo::InternalSwap(SurfaceflingerStatsGlobalInfo* other) {
1608 using std::swap;
1609 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1610 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1611 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1612 PROTOBUF_FIELD_OFFSET(SurfaceflingerStatsGlobalInfo, _impl_.render_rate_bucket_)
1613 + sizeof(SurfaceflingerStatsGlobalInfo::_impl_.render_rate_bucket_) // NOLINT
1614 - PROTOBUF_FIELD_OFFSET(SurfaceflingerStatsGlobalInfo, _impl_.frame_duration_)>(
1615 reinterpret_cast<char*>(&_impl_.frame_duration_),
1616 reinterpret_cast<char*>(&other->_impl_.frame_duration_));
1617 }
1618
GetTypeName() const1619 std::string SurfaceflingerStatsGlobalInfo::GetTypeName() const {
1620 return "android.surfaceflinger.SurfaceflingerStatsGlobalInfo";
1621 }
1622
1623
1624 // ===================================================================
1625
1626 class SurfaceflingerStatsLayerInfo_SetFrameRateVote::_Internal {
1627 public:
1628 using HasBits = decltype(std::declval<SurfaceflingerStatsLayerInfo_SetFrameRateVote>()._impl_._has_bits_);
set_has_frame_rate(HasBits * has_bits)1629 static void set_has_frame_rate(HasBits* has_bits) {
1630 (*has_bits)[0] |= 1u;
1631 }
set_has_frame_rate_compatibility(HasBits * has_bits)1632 static void set_has_frame_rate_compatibility(HasBits* has_bits) {
1633 (*has_bits)[0] |= 2u;
1634 }
set_has_seamlessness(HasBits * has_bits)1635 static void set_has_seamlessness(HasBits* has_bits) {
1636 (*has_bits)[0] |= 4u;
1637 }
1638 };
1639
SurfaceflingerStatsLayerInfo_SetFrameRateVote(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1640 SurfaceflingerStatsLayerInfo_SetFrameRateVote::SurfaceflingerStatsLayerInfo_SetFrameRateVote(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1641 bool is_message_owned)
1642 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1643 SharedCtor(arena, is_message_owned);
1644 // @@protoc_insertion_point(arena_constructor:android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote)
1645 }
SurfaceflingerStatsLayerInfo_SetFrameRateVote(const SurfaceflingerStatsLayerInfo_SetFrameRateVote & from)1646 SurfaceflingerStatsLayerInfo_SetFrameRateVote::SurfaceflingerStatsLayerInfo_SetFrameRateVote(const SurfaceflingerStatsLayerInfo_SetFrameRateVote& from)
1647 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1648 SurfaceflingerStatsLayerInfo_SetFrameRateVote* const _this = this; (void)_this;
1649 new (&_impl_) Impl_{
1650 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1651 , /*decltype(_impl_._cached_size_)*/{}
1652 , decltype(_impl_.frame_rate_){}
1653 , decltype(_impl_.frame_rate_compatibility_){}
1654 , decltype(_impl_.seamlessness_){}};
1655
1656 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1657 ::memcpy(&_impl_.frame_rate_, &from._impl_.frame_rate_,
1658 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.seamlessness_) -
1659 reinterpret_cast<char*>(&_impl_.frame_rate_)) + sizeof(_impl_.seamlessness_));
1660 // @@protoc_insertion_point(copy_constructor:android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote)
1661 }
1662
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1663 inline void SurfaceflingerStatsLayerInfo_SetFrameRateVote::SharedCtor(
1664 ::_pb::Arena* arena, bool is_message_owned) {
1665 (void)arena;
1666 (void)is_message_owned;
1667 new (&_impl_) Impl_{
1668 decltype(_impl_._has_bits_){}
1669 , /*decltype(_impl_._cached_size_)*/{}
1670 , decltype(_impl_.frame_rate_){0}
1671 , decltype(_impl_.frame_rate_compatibility_){0}
1672 , decltype(_impl_.seamlessness_){0}
1673 };
1674 }
1675
~SurfaceflingerStatsLayerInfo_SetFrameRateVote()1676 SurfaceflingerStatsLayerInfo_SetFrameRateVote::~SurfaceflingerStatsLayerInfo_SetFrameRateVote() {
1677 // @@protoc_insertion_point(destructor:android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote)
1678 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1679 (void)arena;
1680 return;
1681 }
1682 SharedDtor();
1683 }
1684
SharedDtor()1685 inline void SurfaceflingerStatsLayerInfo_SetFrameRateVote::SharedDtor() {
1686 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1687 }
1688
SetCachedSize(int size) const1689 void SurfaceflingerStatsLayerInfo_SetFrameRateVote::SetCachedSize(int size) const {
1690 _impl_._cached_size_.Set(size);
1691 }
1692
Clear()1693 void SurfaceflingerStatsLayerInfo_SetFrameRateVote::Clear() {
1694 // @@protoc_insertion_point(message_clear_start:android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote)
1695 ::uint32_t cached_has_bits = 0;
1696 // Prevent compiler warnings about cached_has_bits being unused
1697 (void) cached_has_bits;
1698
1699 cached_has_bits = _impl_._has_bits_[0];
1700 if (cached_has_bits & 0x00000007u) {
1701 ::memset(&_impl_.frame_rate_, 0, static_cast<size_t>(
1702 reinterpret_cast<char*>(&_impl_.seamlessness_) -
1703 reinterpret_cast<char*>(&_impl_.frame_rate_)) + sizeof(_impl_.seamlessness_));
1704 }
1705 _impl_._has_bits_.Clear();
1706 _internal_metadata_.Clear<std::string>();
1707 }
1708
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1709 const char* SurfaceflingerStatsLayerInfo_SetFrameRateVote::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1710 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1711 _Internal::HasBits has_bits{};
1712 while (!ctx->Done(&ptr)) {
1713 ::uint32_t tag;
1714 ptr = ::_pbi::ReadTag(ptr, &tag);
1715 switch (tag >> 3) {
1716 // optional float frame_rate = 1;
1717 case 1:
1718 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 13)) {
1719 _Internal::set_has_frame_rate(&has_bits);
1720 _impl_.frame_rate_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
1721 ptr += sizeof(float);
1722 } else {
1723 goto handle_unusual;
1724 }
1725 continue;
1726 // optional .android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote.FrameRateCompatibility frame_rate_compatibility = 2;
1727 case 2:
1728 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1729 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1730 CHK_(ptr);
1731 if (PROTOBUF_PREDICT_TRUE(::android::surfaceflinger::SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility_IsValid(val))) {
1732 _internal_set_frame_rate_compatibility(static_cast<::android::surfaceflinger::SurfaceflingerStatsLayerInfo_SetFrameRateVote_FrameRateCompatibility>(val));
1733 } else {
1734 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
1735 }
1736 } else {
1737 goto handle_unusual;
1738 }
1739 continue;
1740 // optional .android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote.Seamlessness seamlessness = 3;
1741 case 3:
1742 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1743 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1744 CHK_(ptr);
1745 if (PROTOBUF_PREDICT_TRUE(::android::surfaceflinger::SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness_IsValid(val))) {
1746 _internal_set_seamlessness(static_cast<::android::surfaceflinger::SurfaceflingerStatsLayerInfo_SetFrameRateVote_Seamlessness>(val));
1747 } else {
1748 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields());
1749 }
1750 } else {
1751 goto handle_unusual;
1752 }
1753 continue;
1754 default:
1755 goto handle_unusual;
1756 } // switch
1757 handle_unusual:
1758 if ((tag == 0) || ((tag & 7) == 4)) {
1759 CHK_(ptr);
1760 ctx->SetLastTag(tag);
1761 goto message_done;
1762 }
1763 ptr = UnknownFieldParse(
1764 tag,
1765 _internal_metadata_.mutable_unknown_fields<std::string>(),
1766 ptr, ctx);
1767 CHK_(ptr != nullptr);
1768 } // while
1769 message_done:
1770 _impl_._has_bits_.Or(has_bits);
1771 return ptr;
1772 failure:
1773 ptr = nullptr;
1774 goto message_done;
1775 #undef CHK_
1776 }
1777
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1778 ::uint8_t* SurfaceflingerStatsLayerInfo_SetFrameRateVote::_InternalSerialize(
1779 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1780 // @@protoc_insertion_point(serialize_to_array_start:android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote)
1781 ::uint32_t cached_has_bits = 0;
1782 (void) cached_has_bits;
1783
1784 cached_has_bits = _impl_._has_bits_[0];
1785 // optional float frame_rate = 1;
1786 if (cached_has_bits & 0x00000001u) {
1787 target = stream->EnsureSpace(target);
1788 target = ::_pbi::WireFormatLite::WriteFloatToArray(1, this->_internal_frame_rate(), target);
1789 }
1790
1791 // optional .android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote.FrameRateCompatibility frame_rate_compatibility = 2;
1792 if (cached_has_bits & 0x00000002u) {
1793 target = stream->EnsureSpace(target);
1794 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1795 2, this->_internal_frame_rate_compatibility(), target);
1796 }
1797
1798 // optional .android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote.Seamlessness seamlessness = 3;
1799 if (cached_has_bits & 0x00000004u) {
1800 target = stream->EnsureSpace(target);
1801 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1802 3, this->_internal_seamlessness(), target);
1803 }
1804
1805 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1806 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1807 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1808 }
1809 // @@protoc_insertion_point(serialize_to_array_end:android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote)
1810 return target;
1811 }
1812
ByteSizeLong() const1813 size_t SurfaceflingerStatsLayerInfo_SetFrameRateVote::ByteSizeLong() const {
1814 // @@protoc_insertion_point(message_byte_size_start:android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote)
1815 size_t total_size = 0;
1816
1817 ::uint32_t cached_has_bits = 0;
1818 // Prevent compiler warnings about cached_has_bits being unused
1819 (void) cached_has_bits;
1820
1821 cached_has_bits = _impl_._has_bits_[0];
1822 if (cached_has_bits & 0x00000007u) {
1823 // optional float frame_rate = 1;
1824 if (cached_has_bits & 0x00000001u) {
1825 total_size += 1 + 4;
1826 }
1827
1828 // optional .android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote.FrameRateCompatibility frame_rate_compatibility = 2;
1829 if (cached_has_bits & 0x00000002u) {
1830 total_size += 1 +
1831 ::_pbi::WireFormatLite::EnumSize(this->_internal_frame_rate_compatibility());
1832 }
1833
1834 // optional .android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote.Seamlessness seamlessness = 3;
1835 if (cached_has_bits & 0x00000004u) {
1836 total_size += 1 +
1837 ::_pbi::WireFormatLite::EnumSize(this->_internal_seamlessness());
1838 }
1839
1840 }
1841 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1842 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1843 }
1844 int cached_size = ::_pbi::ToCachedSize(total_size);
1845 SetCachedSize(cached_size);
1846 return total_size;
1847 }
1848
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1849 void SurfaceflingerStatsLayerInfo_SetFrameRateVote::CheckTypeAndMergeFrom(
1850 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1851 MergeFrom(*::_pbi::DownCast<const SurfaceflingerStatsLayerInfo_SetFrameRateVote*>(
1852 &from));
1853 }
1854
MergeFrom(const SurfaceflingerStatsLayerInfo_SetFrameRateVote & from)1855 void SurfaceflingerStatsLayerInfo_SetFrameRateVote::MergeFrom(const SurfaceflingerStatsLayerInfo_SetFrameRateVote& from) {
1856 SurfaceflingerStatsLayerInfo_SetFrameRateVote* const _this = this;
1857 // @@protoc_insertion_point(class_specific_merge_from_start:android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote)
1858 GOOGLE_DCHECK_NE(&from, _this);
1859 ::uint32_t cached_has_bits = 0;
1860 (void) cached_has_bits;
1861
1862 cached_has_bits = from._impl_._has_bits_[0];
1863 if (cached_has_bits & 0x00000007u) {
1864 if (cached_has_bits & 0x00000001u) {
1865 _this->_impl_.frame_rate_ = from._impl_.frame_rate_;
1866 }
1867 if (cached_has_bits & 0x00000002u) {
1868 _this->_impl_.frame_rate_compatibility_ = from._impl_.frame_rate_compatibility_;
1869 }
1870 if (cached_has_bits & 0x00000004u) {
1871 _this->_impl_.seamlessness_ = from._impl_.seamlessness_;
1872 }
1873 _this->_impl_._has_bits_[0] |= cached_has_bits;
1874 }
1875 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1876 }
1877
CopyFrom(const SurfaceflingerStatsLayerInfo_SetFrameRateVote & from)1878 void SurfaceflingerStatsLayerInfo_SetFrameRateVote::CopyFrom(const SurfaceflingerStatsLayerInfo_SetFrameRateVote& from) {
1879 // @@protoc_insertion_point(class_specific_copy_from_start:android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote)
1880 if (&from == this) return;
1881 Clear();
1882 MergeFrom(from);
1883 }
1884
IsInitialized() const1885 bool SurfaceflingerStatsLayerInfo_SetFrameRateVote::IsInitialized() const {
1886 return true;
1887 }
1888
InternalSwap(SurfaceflingerStatsLayerInfo_SetFrameRateVote * other)1889 void SurfaceflingerStatsLayerInfo_SetFrameRateVote::InternalSwap(SurfaceflingerStatsLayerInfo_SetFrameRateVote* other) {
1890 using std::swap;
1891 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1892 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1893 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1894 PROTOBUF_FIELD_OFFSET(SurfaceflingerStatsLayerInfo_SetFrameRateVote, _impl_.seamlessness_)
1895 + sizeof(SurfaceflingerStatsLayerInfo_SetFrameRateVote::_impl_.seamlessness_) // NOLINT
1896 - PROTOBUF_FIELD_OFFSET(SurfaceflingerStatsLayerInfo_SetFrameRateVote, _impl_.frame_rate_)>(
1897 reinterpret_cast<char*>(&_impl_.frame_rate_),
1898 reinterpret_cast<char*>(&other->_impl_.frame_rate_));
1899 }
1900
GetTypeName() const1901 std::string SurfaceflingerStatsLayerInfo_SetFrameRateVote::GetTypeName() const {
1902 return "android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote";
1903 }
1904
1905
1906 // ===================================================================
1907
1908 class SurfaceflingerStatsLayerInfo::_Internal {
1909 public:
1910 using HasBits = decltype(std::declval<SurfaceflingerStatsLayerInfo>()._impl_._has_bits_);
set_has_uid(HasBits * has_bits)1911 static void set_has_uid(HasBits* has_bits) {
1912 (*has_bits)[0] |= 16384u;
1913 }
set_has_display_refresh_rate_bucket(HasBits * has_bits)1914 static void set_has_display_refresh_rate_bucket(HasBits* has_bits) {
1915 (*has_bits)[0] |= 16777216u;
1916 }
set_has_render_rate_bucket(HasBits * has_bits)1917 static void set_has_render_rate_bucket(HasBits* has_bits) {
1918 (*has_bits)[0] |= 33554432u;
1919 }
set_has_game_mode(HasBits * has_bits)1920 static void set_has_game_mode(HasBits* has_bits) {
1921 (*has_bits)[0] |= 67108864u;
1922 }
set_has_layer_name(HasBits * has_bits)1923 static void set_has_layer_name(HasBits* has_bits) {
1924 (*has_bits)[0] |= 1u;
1925 }
set_has_total_frames(HasBits * has_bits)1926 static void set_has_total_frames(HasBits* has_bits) {
1927 (*has_bits)[0] |= 1024u;
1928 }
set_has_dropped_frames(HasBits * has_bits)1929 static void set_has_dropped_frames(HasBits* has_bits) {
1930 (*has_bits)[0] |= 2048u;
1931 }
1932 static const ::android::surfaceflinger::FrameTimingHistogram& present_to_present(const SurfaceflingerStatsLayerInfo* msg);
set_has_present_to_present(HasBits * has_bits)1933 static void set_has_present_to_present(HasBits* has_bits) {
1934 (*has_bits)[0] |= 2u;
1935 }
1936 static const ::android::surfaceflinger::FrameTimingHistogram& post_to_present(const SurfaceflingerStatsLayerInfo* msg);
set_has_post_to_present(HasBits * has_bits)1937 static void set_has_post_to_present(HasBits* has_bits) {
1938 (*has_bits)[0] |= 4u;
1939 }
1940 static const ::android::surfaceflinger::FrameTimingHistogram& acquire_to_present(const SurfaceflingerStatsLayerInfo* msg);
set_has_acquire_to_present(HasBits * has_bits)1941 static void set_has_acquire_to_present(HasBits* has_bits) {
1942 (*has_bits)[0] |= 8u;
1943 }
1944 static const ::android::surfaceflinger::FrameTimingHistogram& latch_to_present(const SurfaceflingerStatsLayerInfo* msg);
set_has_latch_to_present(HasBits * has_bits)1945 static void set_has_latch_to_present(HasBits* has_bits) {
1946 (*has_bits)[0] |= 16u;
1947 }
1948 static const ::android::surfaceflinger::FrameTimingHistogram& desired_to_present(const SurfaceflingerStatsLayerInfo* msg);
set_has_desired_to_present(HasBits * has_bits)1949 static void set_has_desired_to_present(HasBits* has_bits) {
1950 (*has_bits)[0] |= 32u;
1951 }
1952 static const ::android::surfaceflinger::FrameTimingHistogram& post_to_acquire(const SurfaceflingerStatsLayerInfo* msg);
set_has_post_to_acquire(HasBits * has_bits)1953 static void set_has_post_to_acquire(HasBits* has_bits) {
1954 (*has_bits)[0] |= 64u;
1955 }
set_has_late_acquire_frames(HasBits * has_bits)1956 static void set_has_late_acquire_frames(HasBits* has_bits) {
1957 (*has_bits)[0] |= 4096u;
1958 }
set_has_bad_desired_present_frames(HasBits * has_bits)1959 static void set_has_bad_desired_present_frames(HasBits* has_bits) {
1960 (*has_bits)[0] |= 8192u;
1961 }
set_has_total_timeline_frames(HasBits * has_bits)1962 static void set_has_total_timeline_frames(HasBits* has_bits) {
1963 (*has_bits)[0] |= 32768u;
1964 }
set_has_total_janky_frames(HasBits * has_bits)1965 static void set_has_total_janky_frames(HasBits* has_bits) {
1966 (*has_bits)[0] |= 65536u;
1967 }
set_has_total_janky_frames_with_long_cpu(HasBits * has_bits)1968 static void set_has_total_janky_frames_with_long_cpu(HasBits* has_bits) {
1969 (*has_bits)[0] |= 131072u;
1970 }
set_has_total_janky_frames_with_long_gpu(HasBits * has_bits)1971 static void set_has_total_janky_frames_with_long_gpu(HasBits* has_bits) {
1972 (*has_bits)[0] |= 262144u;
1973 }
set_has_total_janky_frames_sf_unattributed(HasBits * has_bits)1974 static void set_has_total_janky_frames_sf_unattributed(HasBits* has_bits) {
1975 (*has_bits)[0] |= 524288u;
1976 }
set_has_total_janky_frames_app_unattributed(HasBits * has_bits)1977 static void set_has_total_janky_frames_app_unattributed(HasBits* has_bits) {
1978 (*has_bits)[0] |= 1048576u;
1979 }
set_has_total_janky_frames_sf_scheduling(HasBits * has_bits)1980 static void set_has_total_janky_frames_sf_scheduling(HasBits* has_bits) {
1981 (*has_bits)[0] |= 2097152u;
1982 }
set_has_total_jank_frames_sf_prediction_error(HasBits * has_bits)1983 static void set_has_total_jank_frames_sf_prediction_error(HasBits* has_bits) {
1984 (*has_bits)[0] |= 4194304u;
1985 }
set_has_total_jank_frames_app_buffer_stuffing(HasBits * has_bits)1986 static void set_has_total_jank_frames_app_buffer_stuffing(HasBits* has_bits) {
1987 (*has_bits)[0] |= 8388608u;
1988 }
1989 static const ::android::surfaceflinger::SurfaceflingerStatsLayerInfo_SetFrameRateVote& set_frame_rate_vote(const SurfaceflingerStatsLayerInfo* msg);
set_has_set_frame_rate_vote(HasBits * has_bits)1990 static void set_has_set_frame_rate_vote(HasBits* has_bits) {
1991 (*has_bits)[0] |= 128u;
1992 }
1993 static const ::android::surfaceflinger::FrameTimingHistogram& app_deadline_misses(const SurfaceflingerStatsLayerInfo* msg);
set_has_app_deadline_misses(HasBits * has_bits)1994 static void set_has_app_deadline_misses(HasBits* has_bits) {
1995 (*has_bits)[0] |= 256u;
1996 }
1997 static const ::android::surfaceflinger::FrameTimingHistogram& present_to_present_delta(const SurfaceflingerStatsLayerInfo* msg);
set_has_present_to_present_delta(HasBits * has_bits)1998 static void set_has_present_to_present_delta(HasBits* has_bits) {
1999 (*has_bits)[0] |= 512u;
2000 }
2001 };
2002
2003 const ::android::surfaceflinger::FrameTimingHistogram&
present_to_present(const SurfaceflingerStatsLayerInfo * msg)2004 SurfaceflingerStatsLayerInfo::_Internal::present_to_present(const SurfaceflingerStatsLayerInfo* msg) {
2005 return *msg->_impl_.present_to_present_;
2006 }
2007 const ::android::surfaceflinger::FrameTimingHistogram&
post_to_present(const SurfaceflingerStatsLayerInfo * msg)2008 SurfaceflingerStatsLayerInfo::_Internal::post_to_present(const SurfaceflingerStatsLayerInfo* msg) {
2009 return *msg->_impl_.post_to_present_;
2010 }
2011 const ::android::surfaceflinger::FrameTimingHistogram&
acquire_to_present(const SurfaceflingerStatsLayerInfo * msg)2012 SurfaceflingerStatsLayerInfo::_Internal::acquire_to_present(const SurfaceflingerStatsLayerInfo* msg) {
2013 return *msg->_impl_.acquire_to_present_;
2014 }
2015 const ::android::surfaceflinger::FrameTimingHistogram&
latch_to_present(const SurfaceflingerStatsLayerInfo * msg)2016 SurfaceflingerStatsLayerInfo::_Internal::latch_to_present(const SurfaceflingerStatsLayerInfo* msg) {
2017 return *msg->_impl_.latch_to_present_;
2018 }
2019 const ::android::surfaceflinger::FrameTimingHistogram&
desired_to_present(const SurfaceflingerStatsLayerInfo * msg)2020 SurfaceflingerStatsLayerInfo::_Internal::desired_to_present(const SurfaceflingerStatsLayerInfo* msg) {
2021 return *msg->_impl_.desired_to_present_;
2022 }
2023 const ::android::surfaceflinger::FrameTimingHistogram&
post_to_acquire(const SurfaceflingerStatsLayerInfo * msg)2024 SurfaceflingerStatsLayerInfo::_Internal::post_to_acquire(const SurfaceflingerStatsLayerInfo* msg) {
2025 return *msg->_impl_.post_to_acquire_;
2026 }
2027 const ::android::surfaceflinger::SurfaceflingerStatsLayerInfo_SetFrameRateVote&
set_frame_rate_vote(const SurfaceflingerStatsLayerInfo * msg)2028 SurfaceflingerStatsLayerInfo::_Internal::set_frame_rate_vote(const SurfaceflingerStatsLayerInfo* msg) {
2029 return *msg->_impl_.set_frame_rate_vote_;
2030 }
2031 const ::android::surfaceflinger::FrameTimingHistogram&
app_deadline_misses(const SurfaceflingerStatsLayerInfo * msg)2032 SurfaceflingerStatsLayerInfo::_Internal::app_deadline_misses(const SurfaceflingerStatsLayerInfo* msg) {
2033 return *msg->_impl_.app_deadline_misses_;
2034 }
2035 const ::android::surfaceflinger::FrameTimingHistogram&
present_to_present_delta(const SurfaceflingerStatsLayerInfo * msg)2036 SurfaceflingerStatsLayerInfo::_Internal::present_to_present_delta(const SurfaceflingerStatsLayerInfo* msg) {
2037 return *msg->_impl_.present_to_present_delta_;
2038 }
SurfaceflingerStatsLayerInfo(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2039 SurfaceflingerStatsLayerInfo::SurfaceflingerStatsLayerInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2040 bool is_message_owned)
2041 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2042 SharedCtor(arena, is_message_owned);
2043 // @@protoc_insertion_point(arena_constructor:android.surfaceflinger.SurfaceflingerStatsLayerInfo)
2044 }
SurfaceflingerStatsLayerInfo(const SurfaceflingerStatsLayerInfo & from)2045 SurfaceflingerStatsLayerInfo::SurfaceflingerStatsLayerInfo(const SurfaceflingerStatsLayerInfo& from)
2046 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2047 SurfaceflingerStatsLayerInfo* const _this = this; (void)_this;
2048 new (&_impl_) Impl_{
2049 decltype(_impl_._has_bits_){from._impl_._has_bits_}
2050 , /*decltype(_impl_._cached_size_)*/{}
2051 , decltype(_impl_.layer_name_){}
2052 , decltype(_impl_.present_to_present_){nullptr}
2053 , decltype(_impl_.post_to_present_){nullptr}
2054 , decltype(_impl_.acquire_to_present_){nullptr}
2055 , decltype(_impl_.latch_to_present_){nullptr}
2056 , decltype(_impl_.desired_to_present_){nullptr}
2057 , decltype(_impl_.post_to_acquire_){nullptr}
2058 , decltype(_impl_.set_frame_rate_vote_){nullptr}
2059 , decltype(_impl_.app_deadline_misses_){nullptr}
2060 , decltype(_impl_.present_to_present_delta_){nullptr}
2061 , decltype(_impl_.total_frames_){}
2062 , decltype(_impl_.dropped_frames_){}
2063 , decltype(_impl_.late_acquire_frames_){}
2064 , decltype(_impl_.bad_desired_present_frames_){}
2065 , decltype(_impl_.uid_){}
2066 , decltype(_impl_.total_timeline_frames_){}
2067 , decltype(_impl_.total_janky_frames_){}
2068 , decltype(_impl_.total_janky_frames_with_long_cpu_){}
2069 , decltype(_impl_.total_janky_frames_with_long_gpu_){}
2070 , decltype(_impl_.total_janky_frames_sf_unattributed_){}
2071 , decltype(_impl_.total_janky_frames_app_unattributed_){}
2072 , decltype(_impl_.total_janky_frames_sf_scheduling_){}
2073 , decltype(_impl_.total_jank_frames_sf_prediction_error_){}
2074 , decltype(_impl_.total_jank_frames_app_buffer_stuffing_){}
2075 , decltype(_impl_.display_refresh_rate_bucket_){}
2076 , decltype(_impl_.render_rate_bucket_){}
2077 , decltype(_impl_.game_mode_){}};
2078
2079 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2080 _impl_.layer_name_.InitDefault();
2081 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2082 _impl_.layer_name_.Set("", GetArenaForAllocation());
2083 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2084 if (from._internal_has_layer_name()) {
2085 _this->_impl_.layer_name_.Set(from._internal_layer_name(),
2086 _this->GetArenaForAllocation());
2087 }
2088 if (from._internal_has_present_to_present()) {
2089 _this->_impl_.present_to_present_ = new ::android::surfaceflinger::FrameTimingHistogram(*from._impl_.present_to_present_);
2090 }
2091 if (from._internal_has_post_to_present()) {
2092 _this->_impl_.post_to_present_ = new ::android::surfaceflinger::FrameTimingHistogram(*from._impl_.post_to_present_);
2093 }
2094 if (from._internal_has_acquire_to_present()) {
2095 _this->_impl_.acquire_to_present_ = new ::android::surfaceflinger::FrameTimingHistogram(*from._impl_.acquire_to_present_);
2096 }
2097 if (from._internal_has_latch_to_present()) {
2098 _this->_impl_.latch_to_present_ = new ::android::surfaceflinger::FrameTimingHistogram(*from._impl_.latch_to_present_);
2099 }
2100 if (from._internal_has_desired_to_present()) {
2101 _this->_impl_.desired_to_present_ = new ::android::surfaceflinger::FrameTimingHistogram(*from._impl_.desired_to_present_);
2102 }
2103 if (from._internal_has_post_to_acquire()) {
2104 _this->_impl_.post_to_acquire_ = new ::android::surfaceflinger::FrameTimingHistogram(*from._impl_.post_to_acquire_);
2105 }
2106 if (from._internal_has_set_frame_rate_vote()) {
2107 _this->_impl_.set_frame_rate_vote_ = new ::android::surfaceflinger::SurfaceflingerStatsLayerInfo_SetFrameRateVote(*from._impl_.set_frame_rate_vote_);
2108 }
2109 if (from._internal_has_app_deadline_misses()) {
2110 _this->_impl_.app_deadline_misses_ = new ::android::surfaceflinger::FrameTimingHistogram(*from._impl_.app_deadline_misses_);
2111 }
2112 if (from._internal_has_present_to_present_delta()) {
2113 _this->_impl_.present_to_present_delta_ = new ::android::surfaceflinger::FrameTimingHistogram(*from._impl_.present_to_present_delta_);
2114 }
2115 ::memcpy(&_impl_.total_frames_, &from._impl_.total_frames_,
2116 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.game_mode_) -
2117 reinterpret_cast<char*>(&_impl_.total_frames_)) + sizeof(_impl_.game_mode_));
2118 // @@protoc_insertion_point(copy_constructor:android.surfaceflinger.SurfaceflingerStatsLayerInfo)
2119 }
2120
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2121 inline void SurfaceflingerStatsLayerInfo::SharedCtor(
2122 ::_pb::Arena* arena, bool is_message_owned) {
2123 (void)arena;
2124 (void)is_message_owned;
2125 new (&_impl_) Impl_{
2126 decltype(_impl_._has_bits_){}
2127 , /*decltype(_impl_._cached_size_)*/{}
2128 , decltype(_impl_.layer_name_){}
2129 , decltype(_impl_.present_to_present_){nullptr}
2130 , decltype(_impl_.post_to_present_){nullptr}
2131 , decltype(_impl_.acquire_to_present_){nullptr}
2132 , decltype(_impl_.latch_to_present_){nullptr}
2133 , decltype(_impl_.desired_to_present_){nullptr}
2134 , decltype(_impl_.post_to_acquire_){nullptr}
2135 , decltype(_impl_.set_frame_rate_vote_){nullptr}
2136 , decltype(_impl_.app_deadline_misses_){nullptr}
2137 , decltype(_impl_.present_to_present_delta_){nullptr}
2138 , decltype(_impl_.total_frames_){::int64_t{0}}
2139 , decltype(_impl_.dropped_frames_){::int64_t{0}}
2140 , decltype(_impl_.late_acquire_frames_){::int64_t{0}}
2141 , decltype(_impl_.bad_desired_present_frames_){::int64_t{0}}
2142 , decltype(_impl_.uid_){0}
2143 , decltype(_impl_.total_timeline_frames_){0}
2144 , decltype(_impl_.total_janky_frames_){0}
2145 , decltype(_impl_.total_janky_frames_with_long_cpu_){0}
2146 , decltype(_impl_.total_janky_frames_with_long_gpu_){0}
2147 , decltype(_impl_.total_janky_frames_sf_unattributed_){0}
2148 , decltype(_impl_.total_janky_frames_app_unattributed_){0}
2149 , decltype(_impl_.total_janky_frames_sf_scheduling_){0}
2150 , decltype(_impl_.total_jank_frames_sf_prediction_error_){0}
2151 , decltype(_impl_.total_jank_frames_app_buffer_stuffing_){0}
2152 , decltype(_impl_.display_refresh_rate_bucket_){0}
2153 , decltype(_impl_.render_rate_bucket_){0}
2154 , decltype(_impl_.game_mode_){0}
2155 };
2156 _impl_.layer_name_.InitDefault();
2157 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2158 _impl_.layer_name_.Set("", GetArenaForAllocation());
2159 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2160 }
2161
~SurfaceflingerStatsLayerInfo()2162 SurfaceflingerStatsLayerInfo::~SurfaceflingerStatsLayerInfo() {
2163 // @@protoc_insertion_point(destructor:android.surfaceflinger.SurfaceflingerStatsLayerInfo)
2164 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2165 (void)arena;
2166 return;
2167 }
2168 SharedDtor();
2169 }
2170
SharedDtor()2171 inline void SurfaceflingerStatsLayerInfo::SharedDtor() {
2172 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2173 _impl_.layer_name_.Destroy();
2174 if (this != internal_default_instance()) delete _impl_.present_to_present_;
2175 if (this != internal_default_instance()) delete _impl_.post_to_present_;
2176 if (this != internal_default_instance()) delete _impl_.acquire_to_present_;
2177 if (this != internal_default_instance()) delete _impl_.latch_to_present_;
2178 if (this != internal_default_instance()) delete _impl_.desired_to_present_;
2179 if (this != internal_default_instance()) delete _impl_.post_to_acquire_;
2180 if (this != internal_default_instance()) delete _impl_.set_frame_rate_vote_;
2181 if (this != internal_default_instance()) delete _impl_.app_deadline_misses_;
2182 if (this != internal_default_instance()) delete _impl_.present_to_present_delta_;
2183 }
2184
SetCachedSize(int size) const2185 void SurfaceflingerStatsLayerInfo::SetCachedSize(int size) const {
2186 _impl_._cached_size_.Set(size);
2187 }
2188
Clear()2189 void SurfaceflingerStatsLayerInfo::Clear() {
2190 // @@protoc_insertion_point(message_clear_start:android.surfaceflinger.SurfaceflingerStatsLayerInfo)
2191 ::uint32_t cached_has_bits = 0;
2192 // Prevent compiler warnings about cached_has_bits being unused
2193 (void) cached_has_bits;
2194
2195 cached_has_bits = _impl_._has_bits_[0];
2196 if (cached_has_bits & 0x000000ffu) {
2197 if (cached_has_bits & 0x00000001u) {
2198 _impl_.layer_name_.ClearNonDefaultToEmpty();
2199 }
2200 if (cached_has_bits & 0x00000002u) {
2201 GOOGLE_DCHECK(_impl_.present_to_present_ != nullptr);
2202 _impl_.present_to_present_->Clear();
2203 }
2204 if (cached_has_bits & 0x00000004u) {
2205 GOOGLE_DCHECK(_impl_.post_to_present_ != nullptr);
2206 _impl_.post_to_present_->Clear();
2207 }
2208 if (cached_has_bits & 0x00000008u) {
2209 GOOGLE_DCHECK(_impl_.acquire_to_present_ != nullptr);
2210 _impl_.acquire_to_present_->Clear();
2211 }
2212 if (cached_has_bits & 0x00000010u) {
2213 GOOGLE_DCHECK(_impl_.latch_to_present_ != nullptr);
2214 _impl_.latch_to_present_->Clear();
2215 }
2216 if (cached_has_bits & 0x00000020u) {
2217 GOOGLE_DCHECK(_impl_.desired_to_present_ != nullptr);
2218 _impl_.desired_to_present_->Clear();
2219 }
2220 if (cached_has_bits & 0x00000040u) {
2221 GOOGLE_DCHECK(_impl_.post_to_acquire_ != nullptr);
2222 _impl_.post_to_acquire_->Clear();
2223 }
2224 if (cached_has_bits & 0x00000080u) {
2225 GOOGLE_DCHECK(_impl_.set_frame_rate_vote_ != nullptr);
2226 _impl_.set_frame_rate_vote_->Clear();
2227 }
2228 }
2229 if (cached_has_bits & 0x00000300u) {
2230 if (cached_has_bits & 0x00000100u) {
2231 GOOGLE_DCHECK(_impl_.app_deadline_misses_ != nullptr);
2232 _impl_.app_deadline_misses_->Clear();
2233 }
2234 if (cached_has_bits & 0x00000200u) {
2235 GOOGLE_DCHECK(_impl_.present_to_present_delta_ != nullptr);
2236 _impl_.present_to_present_delta_->Clear();
2237 }
2238 }
2239 if (cached_has_bits & 0x0000fc00u) {
2240 ::memset(&_impl_.total_frames_, 0, static_cast<size_t>(
2241 reinterpret_cast<char*>(&_impl_.total_timeline_frames_) -
2242 reinterpret_cast<char*>(&_impl_.total_frames_)) + sizeof(_impl_.total_timeline_frames_));
2243 }
2244 if (cached_has_bits & 0x00ff0000u) {
2245 ::memset(&_impl_.total_janky_frames_, 0, static_cast<size_t>(
2246 reinterpret_cast<char*>(&_impl_.total_jank_frames_app_buffer_stuffing_) -
2247 reinterpret_cast<char*>(&_impl_.total_janky_frames_)) + sizeof(_impl_.total_jank_frames_app_buffer_stuffing_));
2248 }
2249 if (cached_has_bits & 0x07000000u) {
2250 ::memset(&_impl_.display_refresh_rate_bucket_, 0, static_cast<size_t>(
2251 reinterpret_cast<char*>(&_impl_.game_mode_) -
2252 reinterpret_cast<char*>(&_impl_.display_refresh_rate_bucket_)) + sizeof(_impl_.game_mode_));
2253 }
2254 _impl_._has_bits_.Clear();
2255 _internal_metadata_.Clear<std::string>();
2256 }
2257
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2258 const char* SurfaceflingerStatsLayerInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2259 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2260 _Internal::HasBits has_bits{};
2261 while (!ctx->Done(&ptr)) {
2262 ::uint32_t tag;
2263 ptr = ::_pbi::ReadTag(ptr, &tag);
2264 switch (tag >> 3) {
2265 // optional string layer_name = 1;
2266 case 1:
2267 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2268 auto str = _internal_mutable_layer_name();
2269 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2270 CHK_(ptr);
2271 } else {
2272 goto handle_unusual;
2273 }
2274 continue;
2275 // optional int64 total_frames = 2;
2276 case 2:
2277 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
2278 _Internal::set_has_total_frames(&has_bits);
2279 _impl_.total_frames_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2280 CHK_(ptr);
2281 } else {
2282 goto handle_unusual;
2283 }
2284 continue;
2285 // optional int64 dropped_frames = 3;
2286 case 3:
2287 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
2288 _Internal::set_has_dropped_frames(&has_bits);
2289 _impl_.dropped_frames_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2290 CHK_(ptr);
2291 } else {
2292 goto handle_unusual;
2293 }
2294 continue;
2295 // optional .android.surfaceflinger.FrameTimingHistogram present_to_present = 4;
2296 case 4:
2297 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
2298 ptr = ctx->ParseMessage(_internal_mutable_present_to_present(), ptr);
2299 CHK_(ptr);
2300 } else {
2301 goto handle_unusual;
2302 }
2303 continue;
2304 // optional .android.surfaceflinger.FrameTimingHistogram post_to_present = 5;
2305 case 5:
2306 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
2307 ptr = ctx->ParseMessage(_internal_mutable_post_to_present(), ptr);
2308 CHK_(ptr);
2309 } else {
2310 goto handle_unusual;
2311 }
2312 continue;
2313 // optional .android.surfaceflinger.FrameTimingHistogram acquire_to_present = 6;
2314 case 6:
2315 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
2316 ptr = ctx->ParseMessage(_internal_mutable_acquire_to_present(), ptr);
2317 CHK_(ptr);
2318 } else {
2319 goto handle_unusual;
2320 }
2321 continue;
2322 // optional .android.surfaceflinger.FrameTimingHistogram latch_to_present = 7;
2323 case 7:
2324 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
2325 ptr = ctx->ParseMessage(_internal_mutable_latch_to_present(), ptr);
2326 CHK_(ptr);
2327 } else {
2328 goto handle_unusual;
2329 }
2330 continue;
2331 // optional .android.surfaceflinger.FrameTimingHistogram desired_to_present = 8;
2332 case 8:
2333 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
2334 ptr = ctx->ParseMessage(_internal_mutable_desired_to_present(), ptr);
2335 CHK_(ptr);
2336 } else {
2337 goto handle_unusual;
2338 }
2339 continue;
2340 // optional .android.surfaceflinger.FrameTimingHistogram post_to_acquire = 9;
2341 case 9:
2342 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
2343 ptr = ctx->ParseMessage(_internal_mutable_post_to_acquire(), ptr);
2344 CHK_(ptr);
2345 } else {
2346 goto handle_unusual;
2347 }
2348 continue;
2349 // optional int64 late_acquire_frames = 10;
2350 case 10:
2351 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
2352 _Internal::set_has_late_acquire_frames(&has_bits);
2353 _impl_.late_acquire_frames_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2354 CHK_(ptr);
2355 } else {
2356 goto handle_unusual;
2357 }
2358 continue;
2359 // optional int64 bad_desired_present_frames = 11;
2360 case 11:
2361 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 88)) {
2362 _Internal::set_has_bad_desired_present_frames(&has_bits);
2363 _impl_.bad_desired_present_frames_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2364 CHK_(ptr);
2365 } else {
2366 goto handle_unusual;
2367 }
2368 continue;
2369 // optional int32 uid = 12;
2370 case 12:
2371 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 96)) {
2372 _Internal::set_has_uid(&has_bits);
2373 _impl_.uid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2374 CHK_(ptr);
2375 } else {
2376 goto handle_unusual;
2377 }
2378 continue;
2379 // optional int32 total_timeline_frames = 13;
2380 case 13:
2381 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 104)) {
2382 _Internal::set_has_total_timeline_frames(&has_bits);
2383 _impl_.total_timeline_frames_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2384 CHK_(ptr);
2385 } else {
2386 goto handle_unusual;
2387 }
2388 continue;
2389 // optional int32 total_janky_frames = 14;
2390 case 14:
2391 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 112)) {
2392 _Internal::set_has_total_janky_frames(&has_bits);
2393 _impl_.total_janky_frames_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2394 CHK_(ptr);
2395 } else {
2396 goto handle_unusual;
2397 }
2398 continue;
2399 // optional int32 total_janky_frames_with_long_cpu = 15;
2400 case 15:
2401 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 120)) {
2402 _Internal::set_has_total_janky_frames_with_long_cpu(&has_bits);
2403 _impl_.total_janky_frames_with_long_cpu_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2404 CHK_(ptr);
2405 } else {
2406 goto handle_unusual;
2407 }
2408 continue;
2409 // optional int32 total_janky_frames_with_long_gpu = 16;
2410 case 16:
2411 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 128)) {
2412 _Internal::set_has_total_janky_frames_with_long_gpu(&has_bits);
2413 _impl_.total_janky_frames_with_long_gpu_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2414 CHK_(ptr);
2415 } else {
2416 goto handle_unusual;
2417 }
2418 continue;
2419 // optional int32 total_janky_frames_sf_unattributed = 17;
2420 case 17:
2421 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 136)) {
2422 _Internal::set_has_total_janky_frames_sf_unattributed(&has_bits);
2423 _impl_.total_janky_frames_sf_unattributed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2424 CHK_(ptr);
2425 } else {
2426 goto handle_unusual;
2427 }
2428 continue;
2429 // optional int32 total_janky_frames_app_unattributed = 18;
2430 case 18:
2431 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 144)) {
2432 _Internal::set_has_total_janky_frames_app_unattributed(&has_bits);
2433 _impl_.total_janky_frames_app_unattributed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2434 CHK_(ptr);
2435 } else {
2436 goto handle_unusual;
2437 }
2438 continue;
2439 // optional int32 total_janky_frames_sf_scheduling = 19;
2440 case 19:
2441 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 152)) {
2442 _Internal::set_has_total_janky_frames_sf_scheduling(&has_bits);
2443 _impl_.total_janky_frames_sf_scheduling_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2444 CHK_(ptr);
2445 } else {
2446 goto handle_unusual;
2447 }
2448 continue;
2449 // optional int32 total_jank_frames_sf_prediction_error = 20;
2450 case 20:
2451 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 160)) {
2452 _Internal::set_has_total_jank_frames_sf_prediction_error(&has_bits);
2453 _impl_.total_jank_frames_sf_prediction_error_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2454 CHK_(ptr);
2455 } else {
2456 goto handle_unusual;
2457 }
2458 continue;
2459 // optional int32 total_jank_frames_app_buffer_stuffing = 21;
2460 case 21:
2461 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 168)) {
2462 _Internal::set_has_total_jank_frames_app_buffer_stuffing(&has_bits);
2463 _impl_.total_jank_frames_app_buffer_stuffing_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2464 CHK_(ptr);
2465 } else {
2466 goto handle_unusual;
2467 }
2468 continue;
2469 // optional int32 display_refresh_rate_bucket = 22;
2470 case 22:
2471 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 176)) {
2472 _Internal::set_has_display_refresh_rate_bucket(&has_bits);
2473 _impl_.display_refresh_rate_bucket_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2474 CHK_(ptr);
2475 } else {
2476 goto handle_unusual;
2477 }
2478 continue;
2479 // optional int32 render_rate_bucket = 23;
2480 case 23:
2481 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 184)) {
2482 _Internal::set_has_render_rate_bucket(&has_bits);
2483 _impl_.render_rate_bucket_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2484 CHK_(ptr);
2485 } else {
2486 goto handle_unusual;
2487 }
2488 continue;
2489 // optional .android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote set_frame_rate_vote = 24;
2490 case 24:
2491 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 194)) {
2492 ptr = ctx->ParseMessage(_internal_mutable_set_frame_rate_vote(), ptr);
2493 CHK_(ptr);
2494 } else {
2495 goto handle_unusual;
2496 }
2497 continue;
2498 // optional .android.surfaceflinger.FrameTimingHistogram app_deadline_misses = 25;
2499 case 25:
2500 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 202)) {
2501 ptr = ctx->ParseMessage(_internal_mutable_app_deadline_misses(), ptr);
2502 CHK_(ptr);
2503 } else {
2504 goto handle_unusual;
2505 }
2506 continue;
2507 // optional .android.surfaceflinger.SurfaceflingerStatsLayerInfo.GameMode game_mode = 26;
2508 case 26:
2509 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 208)) {
2510 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2511 CHK_(ptr);
2512 if (PROTOBUF_PREDICT_TRUE(::android::surfaceflinger::SurfaceflingerStatsLayerInfo_GameMode_IsValid(val))) {
2513 _internal_set_game_mode(static_cast<::android::surfaceflinger::SurfaceflingerStatsLayerInfo_GameMode>(val));
2514 } else {
2515 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(26, val, mutable_unknown_fields());
2516 }
2517 } else {
2518 goto handle_unusual;
2519 }
2520 continue;
2521 // optional .android.surfaceflinger.FrameTimingHistogram present_to_present_delta = 27;
2522 case 27:
2523 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 218)) {
2524 ptr = ctx->ParseMessage(_internal_mutable_present_to_present_delta(), ptr);
2525 CHK_(ptr);
2526 } else {
2527 goto handle_unusual;
2528 }
2529 continue;
2530 default:
2531 goto handle_unusual;
2532 } // switch
2533 handle_unusual:
2534 if ((tag == 0) || ((tag & 7) == 4)) {
2535 CHK_(ptr);
2536 ctx->SetLastTag(tag);
2537 goto message_done;
2538 }
2539 ptr = UnknownFieldParse(
2540 tag,
2541 _internal_metadata_.mutable_unknown_fields<std::string>(),
2542 ptr, ctx);
2543 CHK_(ptr != nullptr);
2544 } // while
2545 message_done:
2546 _impl_._has_bits_.Or(has_bits);
2547 return ptr;
2548 failure:
2549 ptr = nullptr;
2550 goto message_done;
2551 #undef CHK_
2552 }
2553
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2554 ::uint8_t* SurfaceflingerStatsLayerInfo::_InternalSerialize(
2555 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2556 // @@protoc_insertion_point(serialize_to_array_start:android.surfaceflinger.SurfaceflingerStatsLayerInfo)
2557 ::uint32_t cached_has_bits = 0;
2558 (void) cached_has_bits;
2559
2560 cached_has_bits = _impl_._has_bits_[0];
2561 // optional string layer_name = 1;
2562 if (cached_has_bits & 0x00000001u) {
2563 target = stream->WriteStringMaybeAliased(
2564 1, this->_internal_layer_name(), target);
2565 }
2566
2567 // optional int64 total_frames = 2;
2568 if (cached_has_bits & 0x00000400u) {
2569 target = stream->EnsureSpace(target);
2570 target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_total_frames(), target);
2571 }
2572
2573 // optional int64 dropped_frames = 3;
2574 if (cached_has_bits & 0x00000800u) {
2575 target = stream->EnsureSpace(target);
2576 target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_dropped_frames(), target);
2577 }
2578
2579 // optional .android.surfaceflinger.FrameTimingHistogram present_to_present = 4;
2580 if (cached_has_bits & 0x00000002u) {
2581 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2582 InternalWriteMessage(4, _Internal::present_to_present(this),
2583 _Internal::present_to_present(this).GetCachedSize(), target, stream);
2584 }
2585
2586 // optional .android.surfaceflinger.FrameTimingHistogram post_to_present = 5;
2587 if (cached_has_bits & 0x00000004u) {
2588 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2589 InternalWriteMessage(5, _Internal::post_to_present(this),
2590 _Internal::post_to_present(this).GetCachedSize(), target, stream);
2591 }
2592
2593 // optional .android.surfaceflinger.FrameTimingHistogram acquire_to_present = 6;
2594 if (cached_has_bits & 0x00000008u) {
2595 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2596 InternalWriteMessage(6, _Internal::acquire_to_present(this),
2597 _Internal::acquire_to_present(this).GetCachedSize(), target, stream);
2598 }
2599
2600 // optional .android.surfaceflinger.FrameTimingHistogram latch_to_present = 7;
2601 if (cached_has_bits & 0x00000010u) {
2602 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2603 InternalWriteMessage(7, _Internal::latch_to_present(this),
2604 _Internal::latch_to_present(this).GetCachedSize(), target, stream);
2605 }
2606
2607 // optional .android.surfaceflinger.FrameTimingHistogram desired_to_present = 8;
2608 if (cached_has_bits & 0x00000020u) {
2609 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2610 InternalWriteMessage(8, _Internal::desired_to_present(this),
2611 _Internal::desired_to_present(this).GetCachedSize(), target, stream);
2612 }
2613
2614 // optional .android.surfaceflinger.FrameTimingHistogram post_to_acquire = 9;
2615 if (cached_has_bits & 0x00000040u) {
2616 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2617 InternalWriteMessage(9, _Internal::post_to_acquire(this),
2618 _Internal::post_to_acquire(this).GetCachedSize(), target, stream);
2619 }
2620
2621 // optional int64 late_acquire_frames = 10;
2622 if (cached_has_bits & 0x00001000u) {
2623 target = stream->EnsureSpace(target);
2624 target = ::_pbi::WireFormatLite::WriteInt64ToArray(10, this->_internal_late_acquire_frames(), target);
2625 }
2626
2627 // optional int64 bad_desired_present_frames = 11;
2628 if (cached_has_bits & 0x00002000u) {
2629 target = stream->EnsureSpace(target);
2630 target = ::_pbi::WireFormatLite::WriteInt64ToArray(11, this->_internal_bad_desired_present_frames(), target);
2631 }
2632
2633 // optional int32 uid = 12;
2634 if (cached_has_bits & 0x00004000u) {
2635 target = stream->EnsureSpace(target);
2636 target = ::_pbi::WireFormatLite::WriteInt32ToArray(12, this->_internal_uid(), target);
2637 }
2638
2639 // optional int32 total_timeline_frames = 13;
2640 if (cached_has_bits & 0x00008000u) {
2641 target = stream->EnsureSpace(target);
2642 target = ::_pbi::WireFormatLite::WriteInt32ToArray(13, this->_internal_total_timeline_frames(), target);
2643 }
2644
2645 // optional int32 total_janky_frames = 14;
2646 if (cached_has_bits & 0x00010000u) {
2647 target = stream->EnsureSpace(target);
2648 target = ::_pbi::WireFormatLite::WriteInt32ToArray(14, this->_internal_total_janky_frames(), target);
2649 }
2650
2651 // optional int32 total_janky_frames_with_long_cpu = 15;
2652 if (cached_has_bits & 0x00020000u) {
2653 target = stream->EnsureSpace(target);
2654 target = ::_pbi::WireFormatLite::WriteInt32ToArray(15, this->_internal_total_janky_frames_with_long_cpu(), target);
2655 }
2656
2657 // optional int32 total_janky_frames_with_long_gpu = 16;
2658 if (cached_has_bits & 0x00040000u) {
2659 target = stream->EnsureSpace(target);
2660 target = ::_pbi::WireFormatLite::WriteInt32ToArray(16, this->_internal_total_janky_frames_with_long_gpu(), target);
2661 }
2662
2663 // optional int32 total_janky_frames_sf_unattributed = 17;
2664 if (cached_has_bits & 0x00080000u) {
2665 target = stream->EnsureSpace(target);
2666 target = ::_pbi::WireFormatLite::WriteInt32ToArray(17, this->_internal_total_janky_frames_sf_unattributed(), target);
2667 }
2668
2669 // optional int32 total_janky_frames_app_unattributed = 18;
2670 if (cached_has_bits & 0x00100000u) {
2671 target = stream->EnsureSpace(target);
2672 target = ::_pbi::WireFormatLite::WriteInt32ToArray(18, this->_internal_total_janky_frames_app_unattributed(), target);
2673 }
2674
2675 // optional int32 total_janky_frames_sf_scheduling = 19;
2676 if (cached_has_bits & 0x00200000u) {
2677 target = stream->EnsureSpace(target);
2678 target = ::_pbi::WireFormatLite::WriteInt32ToArray(19, this->_internal_total_janky_frames_sf_scheduling(), target);
2679 }
2680
2681 // optional int32 total_jank_frames_sf_prediction_error = 20;
2682 if (cached_has_bits & 0x00400000u) {
2683 target = stream->EnsureSpace(target);
2684 target = ::_pbi::WireFormatLite::WriteInt32ToArray(20, this->_internal_total_jank_frames_sf_prediction_error(), target);
2685 }
2686
2687 // optional int32 total_jank_frames_app_buffer_stuffing = 21;
2688 if (cached_has_bits & 0x00800000u) {
2689 target = stream->EnsureSpace(target);
2690 target = ::_pbi::WireFormatLite::WriteInt32ToArray(21, this->_internal_total_jank_frames_app_buffer_stuffing(), target);
2691 }
2692
2693 // optional int32 display_refresh_rate_bucket = 22;
2694 if (cached_has_bits & 0x01000000u) {
2695 target = stream->EnsureSpace(target);
2696 target = ::_pbi::WireFormatLite::WriteInt32ToArray(22, this->_internal_display_refresh_rate_bucket(), target);
2697 }
2698
2699 // optional int32 render_rate_bucket = 23;
2700 if (cached_has_bits & 0x02000000u) {
2701 target = stream->EnsureSpace(target);
2702 target = ::_pbi::WireFormatLite::WriteInt32ToArray(23, this->_internal_render_rate_bucket(), target);
2703 }
2704
2705 // optional .android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote set_frame_rate_vote = 24;
2706 if (cached_has_bits & 0x00000080u) {
2707 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2708 InternalWriteMessage(24, _Internal::set_frame_rate_vote(this),
2709 _Internal::set_frame_rate_vote(this).GetCachedSize(), target, stream);
2710 }
2711
2712 // optional .android.surfaceflinger.FrameTimingHistogram app_deadline_misses = 25;
2713 if (cached_has_bits & 0x00000100u) {
2714 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2715 InternalWriteMessage(25, _Internal::app_deadline_misses(this),
2716 _Internal::app_deadline_misses(this).GetCachedSize(), target, stream);
2717 }
2718
2719 // optional .android.surfaceflinger.SurfaceflingerStatsLayerInfo.GameMode game_mode = 26;
2720 if (cached_has_bits & 0x04000000u) {
2721 target = stream->EnsureSpace(target);
2722 target = ::_pbi::WireFormatLite::WriteEnumToArray(
2723 26, this->_internal_game_mode(), target);
2724 }
2725
2726 // optional .android.surfaceflinger.FrameTimingHistogram present_to_present_delta = 27;
2727 if (cached_has_bits & 0x00000200u) {
2728 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2729 InternalWriteMessage(27, _Internal::present_to_present_delta(this),
2730 _Internal::present_to_present_delta(this).GetCachedSize(), target, stream);
2731 }
2732
2733 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2734 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2735 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2736 }
2737 // @@protoc_insertion_point(serialize_to_array_end:android.surfaceflinger.SurfaceflingerStatsLayerInfo)
2738 return target;
2739 }
2740
ByteSizeLong() const2741 size_t SurfaceflingerStatsLayerInfo::ByteSizeLong() const {
2742 // @@protoc_insertion_point(message_byte_size_start:android.surfaceflinger.SurfaceflingerStatsLayerInfo)
2743 size_t total_size = 0;
2744
2745 ::uint32_t cached_has_bits = 0;
2746 // Prevent compiler warnings about cached_has_bits being unused
2747 (void) cached_has_bits;
2748
2749 cached_has_bits = _impl_._has_bits_[0];
2750 if (cached_has_bits & 0x000000ffu) {
2751 // optional string layer_name = 1;
2752 if (cached_has_bits & 0x00000001u) {
2753 total_size += 1 +
2754 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2755 this->_internal_layer_name());
2756 }
2757
2758 // optional .android.surfaceflinger.FrameTimingHistogram present_to_present = 4;
2759 if (cached_has_bits & 0x00000002u) {
2760 total_size += 1 +
2761 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2762 *_impl_.present_to_present_);
2763 }
2764
2765 // optional .android.surfaceflinger.FrameTimingHistogram post_to_present = 5;
2766 if (cached_has_bits & 0x00000004u) {
2767 total_size += 1 +
2768 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2769 *_impl_.post_to_present_);
2770 }
2771
2772 // optional .android.surfaceflinger.FrameTimingHistogram acquire_to_present = 6;
2773 if (cached_has_bits & 0x00000008u) {
2774 total_size += 1 +
2775 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2776 *_impl_.acquire_to_present_);
2777 }
2778
2779 // optional .android.surfaceflinger.FrameTimingHistogram latch_to_present = 7;
2780 if (cached_has_bits & 0x00000010u) {
2781 total_size += 1 +
2782 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2783 *_impl_.latch_to_present_);
2784 }
2785
2786 // optional .android.surfaceflinger.FrameTimingHistogram desired_to_present = 8;
2787 if (cached_has_bits & 0x00000020u) {
2788 total_size += 1 +
2789 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2790 *_impl_.desired_to_present_);
2791 }
2792
2793 // optional .android.surfaceflinger.FrameTimingHistogram post_to_acquire = 9;
2794 if (cached_has_bits & 0x00000040u) {
2795 total_size += 1 +
2796 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2797 *_impl_.post_to_acquire_);
2798 }
2799
2800 // optional .android.surfaceflinger.SurfaceflingerStatsLayerInfo.SetFrameRateVote set_frame_rate_vote = 24;
2801 if (cached_has_bits & 0x00000080u) {
2802 total_size += 2 +
2803 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2804 *_impl_.set_frame_rate_vote_);
2805 }
2806
2807 }
2808 if (cached_has_bits & 0x0000ff00u) {
2809 // optional .android.surfaceflinger.FrameTimingHistogram app_deadline_misses = 25;
2810 if (cached_has_bits & 0x00000100u) {
2811 total_size += 2 +
2812 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2813 *_impl_.app_deadline_misses_);
2814 }
2815
2816 // optional .android.surfaceflinger.FrameTimingHistogram present_to_present_delta = 27;
2817 if (cached_has_bits & 0x00000200u) {
2818 total_size += 2 +
2819 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2820 *_impl_.present_to_present_delta_);
2821 }
2822
2823 // optional int64 total_frames = 2;
2824 if (cached_has_bits & 0x00000400u) {
2825 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_total_frames());
2826 }
2827
2828 // optional int64 dropped_frames = 3;
2829 if (cached_has_bits & 0x00000800u) {
2830 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_dropped_frames());
2831 }
2832
2833 // optional int64 late_acquire_frames = 10;
2834 if (cached_has_bits & 0x00001000u) {
2835 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_late_acquire_frames());
2836 }
2837
2838 // optional int64 bad_desired_present_frames = 11;
2839 if (cached_has_bits & 0x00002000u) {
2840 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_bad_desired_present_frames());
2841 }
2842
2843 // optional int32 uid = 12;
2844 if (cached_has_bits & 0x00004000u) {
2845 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_uid());
2846 }
2847
2848 // optional int32 total_timeline_frames = 13;
2849 if (cached_has_bits & 0x00008000u) {
2850 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_total_timeline_frames());
2851 }
2852
2853 }
2854 if (cached_has_bits & 0x00ff0000u) {
2855 // optional int32 total_janky_frames = 14;
2856 if (cached_has_bits & 0x00010000u) {
2857 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_total_janky_frames());
2858 }
2859
2860 // optional int32 total_janky_frames_with_long_cpu = 15;
2861 if (cached_has_bits & 0x00020000u) {
2862 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_total_janky_frames_with_long_cpu());
2863 }
2864
2865 // optional int32 total_janky_frames_with_long_gpu = 16;
2866 if (cached_has_bits & 0x00040000u) {
2867 total_size += 2 +
2868 ::_pbi::WireFormatLite::Int32Size(
2869 this->_internal_total_janky_frames_with_long_gpu());
2870 }
2871
2872 // optional int32 total_janky_frames_sf_unattributed = 17;
2873 if (cached_has_bits & 0x00080000u) {
2874 total_size += 2 +
2875 ::_pbi::WireFormatLite::Int32Size(
2876 this->_internal_total_janky_frames_sf_unattributed());
2877 }
2878
2879 // optional int32 total_janky_frames_app_unattributed = 18;
2880 if (cached_has_bits & 0x00100000u) {
2881 total_size += 2 +
2882 ::_pbi::WireFormatLite::Int32Size(
2883 this->_internal_total_janky_frames_app_unattributed());
2884 }
2885
2886 // optional int32 total_janky_frames_sf_scheduling = 19;
2887 if (cached_has_bits & 0x00200000u) {
2888 total_size += 2 +
2889 ::_pbi::WireFormatLite::Int32Size(
2890 this->_internal_total_janky_frames_sf_scheduling());
2891 }
2892
2893 // optional int32 total_jank_frames_sf_prediction_error = 20;
2894 if (cached_has_bits & 0x00400000u) {
2895 total_size += 2 +
2896 ::_pbi::WireFormatLite::Int32Size(
2897 this->_internal_total_jank_frames_sf_prediction_error());
2898 }
2899
2900 // optional int32 total_jank_frames_app_buffer_stuffing = 21;
2901 if (cached_has_bits & 0x00800000u) {
2902 total_size += 2 +
2903 ::_pbi::WireFormatLite::Int32Size(
2904 this->_internal_total_jank_frames_app_buffer_stuffing());
2905 }
2906
2907 }
2908 if (cached_has_bits & 0x07000000u) {
2909 // optional int32 display_refresh_rate_bucket = 22;
2910 if (cached_has_bits & 0x01000000u) {
2911 total_size += 2 +
2912 ::_pbi::WireFormatLite::Int32Size(
2913 this->_internal_display_refresh_rate_bucket());
2914 }
2915
2916 // optional int32 render_rate_bucket = 23;
2917 if (cached_has_bits & 0x02000000u) {
2918 total_size += 2 +
2919 ::_pbi::WireFormatLite::Int32Size(
2920 this->_internal_render_rate_bucket());
2921 }
2922
2923 // optional .android.surfaceflinger.SurfaceflingerStatsLayerInfo.GameMode game_mode = 26;
2924 if (cached_has_bits & 0x04000000u) {
2925 total_size += 2 +
2926 ::_pbi::WireFormatLite::EnumSize(this->_internal_game_mode());
2927 }
2928
2929 }
2930 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2931 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2932 }
2933 int cached_size = ::_pbi::ToCachedSize(total_size);
2934 SetCachedSize(cached_size);
2935 return total_size;
2936 }
2937
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2938 void SurfaceflingerStatsLayerInfo::CheckTypeAndMergeFrom(
2939 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2940 MergeFrom(*::_pbi::DownCast<const SurfaceflingerStatsLayerInfo*>(
2941 &from));
2942 }
2943
MergeFrom(const SurfaceflingerStatsLayerInfo & from)2944 void SurfaceflingerStatsLayerInfo::MergeFrom(const SurfaceflingerStatsLayerInfo& from) {
2945 SurfaceflingerStatsLayerInfo* const _this = this;
2946 // @@protoc_insertion_point(class_specific_merge_from_start:android.surfaceflinger.SurfaceflingerStatsLayerInfo)
2947 GOOGLE_DCHECK_NE(&from, _this);
2948 ::uint32_t cached_has_bits = 0;
2949 (void) cached_has_bits;
2950
2951 cached_has_bits = from._impl_._has_bits_[0];
2952 if (cached_has_bits & 0x000000ffu) {
2953 if (cached_has_bits & 0x00000001u) {
2954 _this->_internal_set_layer_name(from._internal_layer_name());
2955 }
2956 if (cached_has_bits & 0x00000002u) {
2957 _this->_internal_mutable_present_to_present()->::android::surfaceflinger::FrameTimingHistogram::MergeFrom(
2958 from._internal_present_to_present());
2959 }
2960 if (cached_has_bits & 0x00000004u) {
2961 _this->_internal_mutable_post_to_present()->::android::surfaceflinger::FrameTimingHistogram::MergeFrom(
2962 from._internal_post_to_present());
2963 }
2964 if (cached_has_bits & 0x00000008u) {
2965 _this->_internal_mutable_acquire_to_present()->::android::surfaceflinger::FrameTimingHistogram::MergeFrom(
2966 from._internal_acquire_to_present());
2967 }
2968 if (cached_has_bits & 0x00000010u) {
2969 _this->_internal_mutable_latch_to_present()->::android::surfaceflinger::FrameTimingHistogram::MergeFrom(
2970 from._internal_latch_to_present());
2971 }
2972 if (cached_has_bits & 0x00000020u) {
2973 _this->_internal_mutable_desired_to_present()->::android::surfaceflinger::FrameTimingHistogram::MergeFrom(
2974 from._internal_desired_to_present());
2975 }
2976 if (cached_has_bits & 0x00000040u) {
2977 _this->_internal_mutable_post_to_acquire()->::android::surfaceflinger::FrameTimingHistogram::MergeFrom(
2978 from._internal_post_to_acquire());
2979 }
2980 if (cached_has_bits & 0x00000080u) {
2981 _this->_internal_mutable_set_frame_rate_vote()->::android::surfaceflinger::SurfaceflingerStatsLayerInfo_SetFrameRateVote::MergeFrom(
2982 from._internal_set_frame_rate_vote());
2983 }
2984 }
2985 if (cached_has_bits & 0x0000ff00u) {
2986 if (cached_has_bits & 0x00000100u) {
2987 _this->_internal_mutable_app_deadline_misses()->::android::surfaceflinger::FrameTimingHistogram::MergeFrom(
2988 from._internal_app_deadline_misses());
2989 }
2990 if (cached_has_bits & 0x00000200u) {
2991 _this->_internal_mutable_present_to_present_delta()->::android::surfaceflinger::FrameTimingHistogram::MergeFrom(
2992 from._internal_present_to_present_delta());
2993 }
2994 if (cached_has_bits & 0x00000400u) {
2995 _this->_impl_.total_frames_ = from._impl_.total_frames_;
2996 }
2997 if (cached_has_bits & 0x00000800u) {
2998 _this->_impl_.dropped_frames_ = from._impl_.dropped_frames_;
2999 }
3000 if (cached_has_bits & 0x00001000u) {
3001 _this->_impl_.late_acquire_frames_ = from._impl_.late_acquire_frames_;
3002 }
3003 if (cached_has_bits & 0x00002000u) {
3004 _this->_impl_.bad_desired_present_frames_ = from._impl_.bad_desired_present_frames_;
3005 }
3006 if (cached_has_bits & 0x00004000u) {
3007 _this->_impl_.uid_ = from._impl_.uid_;
3008 }
3009 if (cached_has_bits & 0x00008000u) {
3010 _this->_impl_.total_timeline_frames_ = from._impl_.total_timeline_frames_;
3011 }
3012 _this->_impl_._has_bits_[0] |= cached_has_bits;
3013 }
3014 if (cached_has_bits & 0x00ff0000u) {
3015 if (cached_has_bits & 0x00010000u) {
3016 _this->_impl_.total_janky_frames_ = from._impl_.total_janky_frames_;
3017 }
3018 if (cached_has_bits & 0x00020000u) {
3019 _this->_impl_.total_janky_frames_with_long_cpu_ = from._impl_.total_janky_frames_with_long_cpu_;
3020 }
3021 if (cached_has_bits & 0x00040000u) {
3022 _this->_impl_.total_janky_frames_with_long_gpu_ = from._impl_.total_janky_frames_with_long_gpu_;
3023 }
3024 if (cached_has_bits & 0x00080000u) {
3025 _this->_impl_.total_janky_frames_sf_unattributed_ = from._impl_.total_janky_frames_sf_unattributed_;
3026 }
3027 if (cached_has_bits & 0x00100000u) {
3028 _this->_impl_.total_janky_frames_app_unattributed_ = from._impl_.total_janky_frames_app_unattributed_;
3029 }
3030 if (cached_has_bits & 0x00200000u) {
3031 _this->_impl_.total_janky_frames_sf_scheduling_ = from._impl_.total_janky_frames_sf_scheduling_;
3032 }
3033 if (cached_has_bits & 0x00400000u) {
3034 _this->_impl_.total_jank_frames_sf_prediction_error_ = from._impl_.total_jank_frames_sf_prediction_error_;
3035 }
3036 if (cached_has_bits & 0x00800000u) {
3037 _this->_impl_.total_jank_frames_app_buffer_stuffing_ = from._impl_.total_jank_frames_app_buffer_stuffing_;
3038 }
3039 _this->_impl_._has_bits_[0] |= cached_has_bits;
3040 }
3041 if (cached_has_bits & 0x07000000u) {
3042 if (cached_has_bits & 0x01000000u) {
3043 _this->_impl_.display_refresh_rate_bucket_ = from._impl_.display_refresh_rate_bucket_;
3044 }
3045 if (cached_has_bits & 0x02000000u) {
3046 _this->_impl_.render_rate_bucket_ = from._impl_.render_rate_bucket_;
3047 }
3048 if (cached_has_bits & 0x04000000u) {
3049 _this->_impl_.game_mode_ = from._impl_.game_mode_;
3050 }
3051 _this->_impl_._has_bits_[0] |= cached_has_bits;
3052 }
3053 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3054 }
3055
CopyFrom(const SurfaceflingerStatsLayerInfo & from)3056 void SurfaceflingerStatsLayerInfo::CopyFrom(const SurfaceflingerStatsLayerInfo& from) {
3057 // @@protoc_insertion_point(class_specific_copy_from_start:android.surfaceflinger.SurfaceflingerStatsLayerInfo)
3058 if (&from == this) return;
3059 Clear();
3060 MergeFrom(from);
3061 }
3062
IsInitialized() const3063 bool SurfaceflingerStatsLayerInfo::IsInitialized() const {
3064 return true;
3065 }
3066
InternalSwap(SurfaceflingerStatsLayerInfo * other)3067 void SurfaceflingerStatsLayerInfo::InternalSwap(SurfaceflingerStatsLayerInfo* other) {
3068 using std::swap;
3069 auto* lhs_arena = GetArenaForAllocation();
3070 auto* rhs_arena = other->GetArenaForAllocation();
3071 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3072 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3073 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3074 &_impl_.layer_name_, lhs_arena,
3075 &other->_impl_.layer_name_, rhs_arena
3076 );
3077 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
3078 PROTOBUF_FIELD_OFFSET(SurfaceflingerStatsLayerInfo, _impl_.game_mode_)
3079 + sizeof(SurfaceflingerStatsLayerInfo::_impl_.game_mode_) // NOLINT
3080 - PROTOBUF_FIELD_OFFSET(SurfaceflingerStatsLayerInfo, _impl_.present_to_present_)>(
3081 reinterpret_cast<char*>(&_impl_.present_to_present_),
3082 reinterpret_cast<char*>(&other->_impl_.present_to_present_));
3083 }
3084
GetTypeName() const3085 std::string SurfaceflingerStatsLayerInfo::GetTypeName() const {
3086 return "android.surfaceflinger.SurfaceflingerStatsLayerInfo";
3087 }
3088
3089
3090 // ===================================================================
3091
3092 class FrameTimingHistogram::_Internal {
3093 public:
3094 };
3095
FrameTimingHistogram(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3096 FrameTimingHistogram::FrameTimingHistogram(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3097 bool is_message_owned)
3098 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3099 SharedCtor(arena, is_message_owned);
3100 // @@protoc_insertion_point(arena_constructor:android.surfaceflinger.FrameTimingHistogram)
3101 }
FrameTimingHistogram(const FrameTimingHistogram & from)3102 FrameTimingHistogram::FrameTimingHistogram(const FrameTimingHistogram& from)
3103 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3104 FrameTimingHistogram* const _this = this; (void)_this;
3105 new (&_impl_) Impl_{
3106 decltype(_impl_.time_millis_buckets_){from._impl_.time_millis_buckets_}
3107 , decltype(_impl_.frame_counts_){from._impl_.frame_counts_}
3108 , /*decltype(_impl_._cached_size_)*/{}};
3109
3110 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3111 // @@protoc_insertion_point(copy_constructor:android.surfaceflinger.FrameTimingHistogram)
3112 }
3113
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3114 inline void FrameTimingHistogram::SharedCtor(
3115 ::_pb::Arena* arena, bool is_message_owned) {
3116 (void)arena;
3117 (void)is_message_owned;
3118 new (&_impl_) Impl_{
3119 decltype(_impl_.time_millis_buckets_){arena}
3120 , decltype(_impl_.frame_counts_){arena}
3121 , /*decltype(_impl_._cached_size_)*/{}
3122 };
3123 }
3124
~FrameTimingHistogram()3125 FrameTimingHistogram::~FrameTimingHistogram() {
3126 // @@protoc_insertion_point(destructor:android.surfaceflinger.FrameTimingHistogram)
3127 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3128 (void)arena;
3129 return;
3130 }
3131 SharedDtor();
3132 }
3133
SharedDtor()3134 inline void FrameTimingHistogram::SharedDtor() {
3135 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3136 _impl_.time_millis_buckets_.~RepeatedField();
3137 _impl_.frame_counts_.~RepeatedField();
3138 }
3139
SetCachedSize(int size) const3140 void FrameTimingHistogram::SetCachedSize(int size) const {
3141 _impl_._cached_size_.Set(size);
3142 }
3143
Clear()3144 void FrameTimingHistogram::Clear() {
3145 // @@protoc_insertion_point(message_clear_start:android.surfaceflinger.FrameTimingHistogram)
3146 ::uint32_t cached_has_bits = 0;
3147 // Prevent compiler warnings about cached_has_bits being unused
3148 (void) cached_has_bits;
3149
3150 _impl_.time_millis_buckets_.Clear();
3151 _impl_.frame_counts_.Clear();
3152 _internal_metadata_.Clear<std::string>();
3153 }
3154
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3155 const char* FrameTimingHistogram::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3156 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3157 while (!ctx->Done(&ptr)) {
3158 ::uint32_t tag;
3159 ptr = ::_pbi::ReadTag(ptr, &tag);
3160 switch (tag >> 3) {
3161 // repeated int32 time_millis_buckets = 1;
3162 case 1:
3163 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
3164 ptr -= 1;
3165 do {
3166 ptr += 1;
3167 _internal_add_time_millis_buckets(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
3168 CHK_(ptr);
3169 if (!ctx->DataAvailable(ptr)) break;
3170 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<8>(ptr));
3171 } else if (static_cast<::uint8_t>(tag) == 10) {
3172 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_time_millis_buckets(), ptr, ctx);
3173 CHK_(ptr);
3174 } else {
3175 goto handle_unusual;
3176 }
3177 continue;
3178 // repeated int64 frame_counts = 2;
3179 case 2:
3180 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
3181 ptr -= 1;
3182 do {
3183 ptr += 1;
3184 _internal_add_frame_counts(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
3185 CHK_(ptr);
3186 if (!ctx->DataAvailable(ptr)) break;
3187 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr));
3188 } else if (static_cast<::uint8_t>(tag) == 18) {
3189 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_frame_counts(), ptr, ctx);
3190 CHK_(ptr);
3191 } else {
3192 goto handle_unusual;
3193 }
3194 continue;
3195 default:
3196 goto handle_unusual;
3197 } // switch
3198 handle_unusual:
3199 if ((tag == 0) || ((tag & 7) == 4)) {
3200 CHK_(ptr);
3201 ctx->SetLastTag(tag);
3202 goto message_done;
3203 }
3204 ptr = UnknownFieldParse(
3205 tag,
3206 _internal_metadata_.mutable_unknown_fields<std::string>(),
3207 ptr, ctx);
3208 CHK_(ptr != nullptr);
3209 } // while
3210 message_done:
3211 return ptr;
3212 failure:
3213 ptr = nullptr;
3214 goto message_done;
3215 #undef CHK_
3216 }
3217
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3218 ::uint8_t* FrameTimingHistogram::_InternalSerialize(
3219 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3220 // @@protoc_insertion_point(serialize_to_array_start:android.surfaceflinger.FrameTimingHistogram)
3221 ::uint32_t cached_has_bits = 0;
3222 (void) cached_has_bits;
3223
3224 // repeated int32 time_millis_buckets = 1;
3225 for (int i = 0, n = this->_internal_time_millis_buckets_size(); i < n; i++) {
3226 target = stream->EnsureSpace(target);
3227 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_time_millis_buckets(i), target);
3228 }
3229
3230 // repeated int64 frame_counts = 2;
3231 for (int i = 0, n = this->_internal_frame_counts_size(); i < n; i++) {
3232 target = stream->EnsureSpace(target);
3233 target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_frame_counts(i), target);
3234 }
3235
3236 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3237 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3238 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3239 }
3240 // @@protoc_insertion_point(serialize_to_array_end:android.surfaceflinger.FrameTimingHistogram)
3241 return target;
3242 }
3243
ByteSizeLong() const3244 size_t FrameTimingHistogram::ByteSizeLong() const {
3245 // @@protoc_insertion_point(message_byte_size_start:android.surfaceflinger.FrameTimingHistogram)
3246 size_t total_size = 0;
3247
3248 ::uint32_t cached_has_bits = 0;
3249 // Prevent compiler warnings about cached_has_bits being unused
3250 (void) cached_has_bits;
3251
3252 // repeated int32 time_millis_buckets = 1;
3253 {
3254 size_t data_size = ::_pbi::WireFormatLite::
3255 Int32Size(this->_impl_.time_millis_buckets_);
3256 total_size += 1 *
3257 ::_pbi::FromIntSize(this->_internal_time_millis_buckets_size());
3258 total_size += data_size;
3259 }
3260
3261 // repeated int64 frame_counts = 2;
3262 {
3263 size_t data_size = ::_pbi::WireFormatLite::
3264 Int64Size(this->_impl_.frame_counts_);
3265 total_size += 1 *
3266 ::_pbi::FromIntSize(this->_internal_frame_counts_size());
3267 total_size += data_size;
3268 }
3269
3270 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3271 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3272 }
3273 int cached_size = ::_pbi::ToCachedSize(total_size);
3274 SetCachedSize(cached_size);
3275 return total_size;
3276 }
3277
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3278 void FrameTimingHistogram::CheckTypeAndMergeFrom(
3279 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3280 MergeFrom(*::_pbi::DownCast<const FrameTimingHistogram*>(
3281 &from));
3282 }
3283
MergeFrom(const FrameTimingHistogram & from)3284 void FrameTimingHistogram::MergeFrom(const FrameTimingHistogram& from) {
3285 FrameTimingHistogram* const _this = this;
3286 // @@protoc_insertion_point(class_specific_merge_from_start:android.surfaceflinger.FrameTimingHistogram)
3287 GOOGLE_DCHECK_NE(&from, _this);
3288 ::uint32_t cached_has_bits = 0;
3289 (void) cached_has_bits;
3290
3291 _this->_impl_.time_millis_buckets_.MergeFrom(from._impl_.time_millis_buckets_);
3292 _this->_impl_.frame_counts_.MergeFrom(from._impl_.frame_counts_);
3293 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3294 }
3295
CopyFrom(const FrameTimingHistogram & from)3296 void FrameTimingHistogram::CopyFrom(const FrameTimingHistogram& from) {
3297 // @@protoc_insertion_point(class_specific_copy_from_start:android.surfaceflinger.FrameTimingHistogram)
3298 if (&from == this) return;
3299 Clear();
3300 MergeFrom(from);
3301 }
3302
IsInitialized() const3303 bool FrameTimingHistogram::IsInitialized() const {
3304 return true;
3305 }
3306
InternalSwap(FrameTimingHistogram * other)3307 void FrameTimingHistogram::InternalSwap(FrameTimingHistogram* other) {
3308 using std::swap;
3309 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3310 _impl_.time_millis_buckets_.InternalSwap(&other->_impl_.time_millis_buckets_);
3311 _impl_.frame_counts_.InternalSwap(&other->_impl_.frame_counts_);
3312 }
3313
GetTypeName() const3314 std::string FrameTimingHistogram::GetTypeName() const {
3315 return "android.surfaceflinger.FrameTimingHistogram";
3316 }
3317
3318
3319 // @@protoc_insertion_point(namespace_scope)
3320 } // namespace surfaceflinger
3321 } // namespace android
3322 PROTOBUF_NAMESPACE_OPEN
3323 template<> PROTOBUF_NOINLINE ::android::surfaceflinger::SurfaceflingerStatsGlobalInfoWrapper*
CreateMaybeMessage(Arena * arena)3324 Arena::CreateMaybeMessage< ::android::surfaceflinger::SurfaceflingerStatsGlobalInfoWrapper >(Arena* arena) {
3325 return Arena::CreateMessageInternal< ::android::surfaceflinger::SurfaceflingerStatsGlobalInfoWrapper >(arena);
3326 }
3327 template<> PROTOBUF_NOINLINE ::android::surfaceflinger::SurfaceflingerStatsLayerInfoWrapper*
CreateMaybeMessage(Arena * arena)3328 Arena::CreateMaybeMessage< ::android::surfaceflinger::SurfaceflingerStatsLayerInfoWrapper >(Arena* arena) {
3329 return Arena::CreateMessageInternal< ::android::surfaceflinger::SurfaceflingerStatsLayerInfoWrapper >(arena);
3330 }
3331 template<> PROTOBUF_NOINLINE ::android::surfaceflinger::SurfaceflingerStatsGlobalInfo*
CreateMaybeMessage(Arena * arena)3332 Arena::CreateMaybeMessage< ::android::surfaceflinger::SurfaceflingerStatsGlobalInfo >(Arena* arena) {
3333 return Arena::CreateMessageInternal< ::android::surfaceflinger::SurfaceflingerStatsGlobalInfo >(arena);
3334 }
3335 template<> PROTOBUF_NOINLINE ::android::surfaceflinger::SurfaceflingerStatsLayerInfo_SetFrameRateVote*
CreateMaybeMessage(Arena * arena)3336 Arena::CreateMaybeMessage< ::android::surfaceflinger::SurfaceflingerStatsLayerInfo_SetFrameRateVote >(Arena* arena) {
3337 return Arena::CreateMessageInternal< ::android::surfaceflinger::SurfaceflingerStatsLayerInfo_SetFrameRateVote >(arena);
3338 }
3339 template<> PROTOBUF_NOINLINE ::android::surfaceflinger::SurfaceflingerStatsLayerInfo*
CreateMaybeMessage(Arena * arena)3340 Arena::CreateMaybeMessage< ::android::surfaceflinger::SurfaceflingerStatsLayerInfo >(Arena* arena) {
3341 return Arena::CreateMessageInternal< ::android::surfaceflinger::SurfaceflingerStatsLayerInfo >(arena);
3342 }
3343 template<> PROTOBUF_NOINLINE ::android::surfaceflinger::FrameTimingHistogram*
CreateMaybeMessage(Arena * arena)3344 Arena::CreateMaybeMessage< ::android::surfaceflinger::FrameTimingHistogram >(Arena* arena) {
3345 return Arena::CreateMessageInternal< ::android::surfaceflinger::FrameTimingHistogram >(arena);
3346 }
3347 PROTOBUF_NAMESPACE_CLOSE
3348
3349 // @@protoc_insertion_point(global_scope)
3350 #include <google/protobuf/port_undef.inc>
3351