1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/android/frame_timeline_event.proto
3
4 #include "protos/perfetto/trace/android/frame_timeline_event.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 perfetto {
22 namespace protos {
FrameTimelineEvent_ExpectedSurfaceFrameStart(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR FrameTimelineEvent_ExpectedSurfaceFrameStart::FrameTimelineEvent_ExpectedSurfaceFrameStart(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.layer_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28 , /*decltype(_impl_.cookie_)*/::int64_t{0}
29 , /*decltype(_impl_.token_)*/::int64_t{0}
30 , /*decltype(_impl_.display_frame_token_)*/::int64_t{0}
31 , /*decltype(_impl_.pid_)*/0} {}
32 struct FrameTimelineEvent_ExpectedSurfaceFrameStartDefaultTypeInternal {
FrameTimelineEvent_ExpectedSurfaceFrameStartDefaultTypeInternalperfetto::protos::FrameTimelineEvent_ExpectedSurfaceFrameStartDefaultTypeInternal33 PROTOBUF_CONSTEXPR FrameTimelineEvent_ExpectedSurfaceFrameStartDefaultTypeInternal()
34 : _instance(::_pbi::ConstantInitialized{}) {}
~FrameTimelineEvent_ExpectedSurfaceFrameStartDefaultTypeInternalperfetto::protos::FrameTimelineEvent_ExpectedSurfaceFrameStartDefaultTypeInternal35 ~FrameTimelineEvent_ExpectedSurfaceFrameStartDefaultTypeInternal() {}
36 union { // NOLINT(misc-non-private-member-variables-in-classes)
37 FrameTimelineEvent_ExpectedSurfaceFrameStart _instance;
38 };
39 };
40 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FrameTimelineEvent_ExpectedSurfaceFrameStartDefaultTypeInternal _FrameTimelineEvent_ExpectedSurfaceFrameStart_default_instance_;
FrameTimelineEvent_ActualSurfaceFrameStart(::_pbi::ConstantInitialized)41 PROTOBUF_CONSTEXPR FrameTimelineEvent_ActualSurfaceFrameStart::FrameTimelineEvent_ActualSurfaceFrameStart(
42 ::_pbi::ConstantInitialized): _impl_{
43 /*decltype(_impl_._has_bits_)*/{}
44 , /*decltype(_impl_._cached_size_)*/{}
45 , /*decltype(_impl_.layer_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
46 , /*decltype(_impl_.cookie_)*/::int64_t{0}
47 , /*decltype(_impl_.token_)*/::int64_t{0}
48 , /*decltype(_impl_.display_frame_token_)*/::int64_t{0}
49 , /*decltype(_impl_.pid_)*/0
50 , /*decltype(_impl_.present_type_)*/0
51 , /*decltype(_impl_.on_time_finish_)*/false
52 , /*decltype(_impl_.gpu_composition_)*/false
53 , /*decltype(_impl_.is_buffer_)*/false
54 , /*decltype(_impl_.jank_type_)*/0
55 , /*decltype(_impl_.prediction_type_)*/0
56 , /*decltype(_impl_.jank_severity_type_)*/0} {}
57 struct FrameTimelineEvent_ActualSurfaceFrameStartDefaultTypeInternal {
FrameTimelineEvent_ActualSurfaceFrameStartDefaultTypeInternalperfetto::protos::FrameTimelineEvent_ActualSurfaceFrameStartDefaultTypeInternal58 PROTOBUF_CONSTEXPR FrameTimelineEvent_ActualSurfaceFrameStartDefaultTypeInternal()
59 : _instance(::_pbi::ConstantInitialized{}) {}
~FrameTimelineEvent_ActualSurfaceFrameStartDefaultTypeInternalperfetto::protos::FrameTimelineEvent_ActualSurfaceFrameStartDefaultTypeInternal60 ~FrameTimelineEvent_ActualSurfaceFrameStartDefaultTypeInternal() {}
61 union { // NOLINT(misc-non-private-member-variables-in-classes)
62 FrameTimelineEvent_ActualSurfaceFrameStart _instance;
63 };
64 };
65 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FrameTimelineEvent_ActualSurfaceFrameStartDefaultTypeInternal _FrameTimelineEvent_ActualSurfaceFrameStart_default_instance_;
FrameTimelineEvent_ExpectedDisplayFrameStart(::_pbi::ConstantInitialized)66 PROTOBUF_CONSTEXPR FrameTimelineEvent_ExpectedDisplayFrameStart::FrameTimelineEvent_ExpectedDisplayFrameStart(
67 ::_pbi::ConstantInitialized): _impl_{
68 /*decltype(_impl_._has_bits_)*/{}
69 , /*decltype(_impl_._cached_size_)*/{}
70 , /*decltype(_impl_.cookie_)*/::int64_t{0}
71 , /*decltype(_impl_.token_)*/::int64_t{0}
72 , /*decltype(_impl_.pid_)*/0} {}
73 struct FrameTimelineEvent_ExpectedDisplayFrameStartDefaultTypeInternal {
FrameTimelineEvent_ExpectedDisplayFrameStartDefaultTypeInternalperfetto::protos::FrameTimelineEvent_ExpectedDisplayFrameStartDefaultTypeInternal74 PROTOBUF_CONSTEXPR FrameTimelineEvent_ExpectedDisplayFrameStartDefaultTypeInternal()
75 : _instance(::_pbi::ConstantInitialized{}) {}
~FrameTimelineEvent_ExpectedDisplayFrameStartDefaultTypeInternalperfetto::protos::FrameTimelineEvent_ExpectedDisplayFrameStartDefaultTypeInternal76 ~FrameTimelineEvent_ExpectedDisplayFrameStartDefaultTypeInternal() {}
77 union { // NOLINT(misc-non-private-member-variables-in-classes)
78 FrameTimelineEvent_ExpectedDisplayFrameStart _instance;
79 };
80 };
81 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FrameTimelineEvent_ExpectedDisplayFrameStartDefaultTypeInternal _FrameTimelineEvent_ExpectedDisplayFrameStart_default_instance_;
FrameTimelineEvent_ActualDisplayFrameStart(::_pbi::ConstantInitialized)82 PROTOBUF_CONSTEXPR FrameTimelineEvent_ActualDisplayFrameStart::FrameTimelineEvent_ActualDisplayFrameStart(
83 ::_pbi::ConstantInitialized): _impl_{
84 /*decltype(_impl_._has_bits_)*/{}
85 , /*decltype(_impl_._cached_size_)*/{}
86 , /*decltype(_impl_.cookie_)*/::int64_t{0}
87 , /*decltype(_impl_.token_)*/::int64_t{0}
88 , /*decltype(_impl_.pid_)*/0
89 , /*decltype(_impl_.present_type_)*/0
90 , /*decltype(_impl_.on_time_finish_)*/false
91 , /*decltype(_impl_.gpu_composition_)*/false
92 , /*decltype(_impl_.jank_type_)*/0
93 , /*decltype(_impl_.prediction_type_)*/0
94 , /*decltype(_impl_.jank_severity_type_)*/0} {}
95 struct FrameTimelineEvent_ActualDisplayFrameStartDefaultTypeInternal {
FrameTimelineEvent_ActualDisplayFrameStartDefaultTypeInternalperfetto::protos::FrameTimelineEvent_ActualDisplayFrameStartDefaultTypeInternal96 PROTOBUF_CONSTEXPR FrameTimelineEvent_ActualDisplayFrameStartDefaultTypeInternal()
97 : _instance(::_pbi::ConstantInitialized{}) {}
~FrameTimelineEvent_ActualDisplayFrameStartDefaultTypeInternalperfetto::protos::FrameTimelineEvent_ActualDisplayFrameStartDefaultTypeInternal98 ~FrameTimelineEvent_ActualDisplayFrameStartDefaultTypeInternal() {}
99 union { // NOLINT(misc-non-private-member-variables-in-classes)
100 FrameTimelineEvent_ActualDisplayFrameStart _instance;
101 };
102 };
103 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FrameTimelineEvent_ActualDisplayFrameStartDefaultTypeInternal _FrameTimelineEvent_ActualDisplayFrameStart_default_instance_;
FrameTimelineEvent_FrameEnd(::_pbi::ConstantInitialized)104 PROTOBUF_CONSTEXPR FrameTimelineEvent_FrameEnd::FrameTimelineEvent_FrameEnd(
105 ::_pbi::ConstantInitialized): _impl_{
106 /*decltype(_impl_._has_bits_)*/{}
107 , /*decltype(_impl_._cached_size_)*/{}
108 , /*decltype(_impl_.cookie_)*/::int64_t{0}} {}
109 struct FrameTimelineEvent_FrameEndDefaultTypeInternal {
FrameTimelineEvent_FrameEndDefaultTypeInternalperfetto::protos::FrameTimelineEvent_FrameEndDefaultTypeInternal110 PROTOBUF_CONSTEXPR FrameTimelineEvent_FrameEndDefaultTypeInternal()
111 : _instance(::_pbi::ConstantInitialized{}) {}
~FrameTimelineEvent_FrameEndDefaultTypeInternalperfetto::protos::FrameTimelineEvent_FrameEndDefaultTypeInternal112 ~FrameTimelineEvent_FrameEndDefaultTypeInternal() {}
113 union { // NOLINT(misc-non-private-member-variables-in-classes)
114 FrameTimelineEvent_FrameEnd _instance;
115 };
116 };
117 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FrameTimelineEvent_FrameEndDefaultTypeInternal _FrameTimelineEvent_FrameEnd_default_instance_;
FrameTimelineEvent(::_pbi::ConstantInitialized)118 PROTOBUF_CONSTEXPR FrameTimelineEvent::FrameTimelineEvent(
119 ::_pbi::ConstantInitialized): _impl_{
120 /*decltype(_impl_.event_)*/{}
121 , /*decltype(_impl_._cached_size_)*/{}
122 , /*decltype(_impl_._oneof_case_)*/{}} {}
123 struct FrameTimelineEventDefaultTypeInternal {
FrameTimelineEventDefaultTypeInternalperfetto::protos::FrameTimelineEventDefaultTypeInternal124 PROTOBUF_CONSTEXPR FrameTimelineEventDefaultTypeInternal()
125 : _instance(::_pbi::ConstantInitialized{}) {}
~FrameTimelineEventDefaultTypeInternalperfetto::protos::FrameTimelineEventDefaultTypeInternal126 ~FrameTimelineEventDefaultTypeInternal() {}
127 union { // NOLINT(misc-non-private-member-variables-in-classes)
128 FrameTimelineEvent _instance;
129 };
130 };
131 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FrameTimelineEventDefaultTypeInternal _FrameTimelineEvent_default_instance_;
132 } // namespace protos
133 } // namespace perfetto
134 namespace perfetto {
135 namespace protos {
FrameTimelineEvent_JankType_IsValid(int value)136 bool FrameTimelineEvent_JankType_IsValid(int value) {
137 switch (value) {
138 case 0:
139 case 1:
140 case 2:
141 case 4:
142 case 8:
143 case 16:
144 case 32:
145 case 64:
146 case 128:
147 case 256:
148 case 512:
149 case 1024:
150 return true;
151 default:
152 return false;
153 }
154 }
155
156 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> FrameTimelineEvent_JankType_strings[12] = {};
157
158 static const char FrameTimelineEvent_JankType_names[] =
159 "JANK_APP_DEADLINE_MISSED"
160 "JANK_BUFFER_STUFFING"
161 "JANK_DISPLAY_HAL"
162 "JANK_DROPPED"
163 "JANK_NONE"
164 "JANK_PREDICTION_ERROR"
165 "JANK_SF_CPU_DEADLINE_MISSED"
166 "JANK_SF_GPU_DEADLINE_MISSED"
167 "JANK_SF_SCHEDULING"
168 "JANK_SF_STUFFING"
169 "JANK_UNKNOWN"
170 "JANK_UNSPECIFIED";
171
172 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry FrameTimelineEvent_JankType_entries[] = {
173 { {FrameTimelineEvent_JankType_names + 0, 24}, 64 },
174 { {FrameTimelineEvent_JankType_names + 24, 20}, 128 },
175 { {FrameTimelineEvent_JankType_names + 44, 16}, 8 },
176 { {FrameTimelineEvent_JankType_names + 60, 12}, 1024 },
177 { {FrameTimelineEvent_JankType_names + 72, 9}, 1 },
178 { {FrameTimelineEvent_JankType_names + 81, 21}, 4 },
179 { {FrameTimelineEvent_JankType_names + 102, 27}, 16 },
180 { {FrameTimelineEvent_JankType_names + 129, 27}, 32 },
181 { {FrameTimelineEvent_JankType_names + 156, 18}, 2 },
182 { {FrameTimelineEvent_JankType_names + 174, 16}, 512 },
183 { {FrameTimelineEvent_JankType_names + 190, 12}, 256 },
184 { {FrameTimelineEvent_JankType_names + 202, 16}, 0 },
185 };
186
187 static const int FrameTimelineEvent_JankType_entries_by_number[] = {
188 11, // 0 -> JANK_UNSPECIFIED
189 4, // 1 -> JANK_NONE
190 8, // 2 -> JANK_SF_SCHEDULING
191 5, // 4 -> JANK_PREDICTION_ERROR
192 2, // 8 -> JANK_DISPLAY_HAL
193 6, // 16 -> JANK_SF_CPU_DEADLINE_MISSED
194 7, // 32 -> JANK_SF_GPU_DEADLINE_MISSED
195 0, // 64 -> JANK_APP_DEADLINE_MISSED
196 1, // 128 -> JANK_BUFFER_STUFFING
197 10, // 256 -> JANK_UNKNOWN
198 9, // 512 -> JANK_SF_STUFFING
199 3, // 1024 -> JANK_DROPPED
200 };
201
FrameTimelineEvent_JankType_Name(FrameTimelineEvent_JankType value)202 const std::string& FrameTimelineEvent_JankType_Name(
203 FrameTimelineEvent_JankType value) {
204 static const bool dummy =
205 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
206 FrameTimelineEvent_JankType_entries,
207 FrameTimelineEvent_JankType_entries_by_number,
208 12, FrameTimelineEvent_JankType_strings);
209 (void) dummy;
210 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
211 FrameTimelineEvent_JankType_entries,
212 FrameTimelineEvent_JankType_entries_by_number,
213 12, value);
214 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
215 FrameTimelineEvent_JankType_strings[idx].get();
216 }
FrameTimelineEvent_JankType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,FrameTimelineEvent_JankType * value)217 bool FrameTimelineEvent_JankType_Parse(
218 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FrameTimelineEvent_JankType* value) {
219 int int_value;
220 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
221 FrameTimelineEvent_JankType_entries, 12, name, &int_value);
222 if (success) {
223 *value = static_cast<FrameTimelineEvent_JankType>(int_value);
224 }
225 return success;
226 }
227 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
228 constexpr FrameTimelineEvent_JankType FrameTimelineEvent::JANK_UNSPECIFIED;
229 constexpr FrameTimelineEvent_JankType FrameTimelineEvent::JANK_NONE;
230 constexpr FrameTimelineEvent_JankType FrameTimelineEvent::JANK_SF_SCHEDULING;
231 constexpr FrameTimelineEvent_JankType FrameTimelineEvent::JANK_PREDICTION_ERROR;
232 constexpr FrameTimelineEvent_JankType FrameTimelineEvent::JANK_DISPLAY_HAL;
233 constexpr FrameTimelineEvent_JankType FrameTimelineEvent::JANK_SF_CPU_DEADLINE_MISSED;
234 constexpr FrameTimelineEvent_JankType FrameTimelineEvent::JANK_SF_GPU_DEADLINE_MISSED;
235 constexpr FrameTimelineEvent_JankType FrameTimelineEvent::JANK_APP_DEADLINE_MISSED;
236 constexpr FrameTimelineEvent_JankType FrameTimelineEvent::JANK_BUFFER_STUFFING;
237 constexpr FrameTimelineEvent_JankType FrameTimelineEvent::JANK_UNKNOWN;
238 constexpr FrameTimelineEvent_JankType FrameTimelineEvent::JANK_SF_STUFFING;
239 constexpr FrameTimelineEvent_JankType FrameTimelineEvent::JANK_DROPPED;
240 constexpr FrameTimelineEvent_JankType FrameTimelineEvent::JankType_MIN;
241 constexpr FrameTimelineEvent_JankType FrameTimelineEvent::JankType_MAX;
242 constexpr int FrameTimelineEvent::JankType_ARRAYSIZE;
243 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
FrameTimelineEvent_JankSeverityType_IsValid(int value)244 bool FrameTimelineEvent_JankSeverityType_IsValid(int value) {
245 switch (value) {
246 case 0:
247 case 1:
248 case 2:
249 case 3:
250 return true;
251 default:
252 return false;
253 }
254 }
255
256 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> FrameTimelineEvent_JankSeverityType_strings[4] = {};
257
258 static const char FrameTimelineEvent_JankSeverityType_names[] =
259 "SEVERITY_FULL"
260 "SEVERITY_NONE"
261 "SEVERITY_PARTIAL"
262 "SEVERITY_UNKNOWN";
263
264 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry FrameTimelineEvent_JankSeverityType_entries[] = {
265 { {FrameTimelineEvent_JankSeverityType_names + 0, 13}, 3 },
266 { {FrameTimelineEvent_JankSeverityType_names + 13, 13}, 1 },
267 { {FrameTimelineEvent_JankSeverityType_names + 26, 16}, 2 },
268 { {FrameTimelineEvent_JankSeverityType_names + 42, 16}, 0 },
269 };
270
271 static const int FrameTimelineEvent_JankSeverityType_entries_by_number[] = {
272 3, // 0 -> SEVERITY_UNKNOWN
273 1, // 1 -> SEVERITY_NONE
274 2, // 2 -> SEVERITY_PARTIAL
275 0, // 3 -> SEVERITY_FULL
276 };
277
FrameTimelineEvent_JankSeverityType_Name(FrameTimelineEvent_JankSeverityType value)278 const std::string& FrameTimelineEvent_JankSeverityType_Name(
279 FrameTimelineEvent_JankSeverityType value) {
280 static const bool dummy =
281 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
282 FrameTimelineEvent_JankSeverityType_entries,
283 FrameTimelineEvent_JankSeverityType_entries_by_number,
284 4, FrameTimelineEvent_JankSeverityType_strings);
285 (void) dummy;
286 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
287 FrameTimelineEvent_JankSeverityType_entries,
288 FrameTimelineEvent_JankSeverityType_entries_by_number,
289 4, value);
290 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
291 FrameTimelineEvent_JankSeverityType_strings[idx].get();
292 }
FrameTimelineEvent_JankSeverityType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,FrameTimelineEvent_JankSeverityType * value)293 bool FrameTimelineEvent_JankSeverityType_Parse(
294 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FrameTimelineEvent_JankSeverityType* value) {
295 int int_value;
296 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
297 FrameTimelineEvent_JankSeverityType_entries, 4, name, &int_value);
298 if (success) {
299 *value = static_cast<FrameTimelineEvent_JankSeverityType>(int_value);
300 }
301 return success;
302 }
303 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
304 constexpr FrameTimelineEvent_JankSeverityType FrameTimelineEvent::SEVERITY_UNKNOWN;
305 constexpr FrameTimelineEvent_JankSeverityType FrameTimelineEvent::SEVERITY_NONE;
306 constexpr FrameTimelineEvent_JankSeverityType FrameTimelineEvent::SEVERITY_PARTIAL;
307 constexpr FrameTimelineEvent_JankSeverityType FrameTimelineEvent::SEVERITY_FULL;
308 constexpr FrameTimelineEvent_JankSeverityType FrameTimelineEvent::JankSeverityType_MIN;
309 constexpr FrameTimelineEvent_JankSeverityType FrameTimelineEvent::JankSeverityType_MAX;
310 constexpr int FrameTimelineEvent::JankSeverityType_ARRAYSIZE;
311 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
FrameTimelineEvent_PresentType_IsValid(int value)312 bool FrameTimelineEvent_PresentType_IsValid(int value) {
313 switch (value) {
314 case 0:
315 case 1:
316 case 2:
317 case 3:
318 case 4:
319 case 5:
320 return true;
321 default:
322 return false;
323 }
324 }
325
326 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> FrameTimelineEvent_PresentType_strings[6] = {};
327
328 static const char FrameTimelineEvent_PresentType_names[] =
329 "PRESENT_DROPPED"
330 "PRESENT_EARLY"
331 "PRESENT_LATE"
332 "PRESENT_ON_TIME"
333 "PRESENT_UNKNOWN"
334 "PRESENT_UNSPECIFIED";
335
336 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry FrameTimelineEvent_PresentType_entries[] = {
337 { {FrameTimelineEvent_PresentType_names + 0, 15}, 4 },
338 { {FrameTimelineEvent_PresentType_names + 15, 13}, 3 },
339 { {FrameTimelineEvent_PresentType_names + 28, 12}, 2 },
340 { {FrameTimelineEvent_PresentType_names + 40, 15}, 1 },
341 { {FrameTimelineEvent_PresentType_names + 55, 15}, 5 },
342 { {FrameTimelineEvent_PresentType_names + 70, 19}, 0 },
343 };
344
345 static const int FrameTimelineEvent_PresentType_entries_by_number[] = {
346 5, // 0 -> PRESENT_UNSPECIFIED
347 3, // 1 -> PRESENT_ON_TIME
348 2, // 2 -> PRESENT_LATE
349 1, // 3 -> PRESENT_EARLY
350 0, // 4 -> PRESENT_DROPPED
351 4, // 5 -> PRESENT_UNKNOWN
352 };
353
FrameTimelineEvent_PresentType_Name(FrameTimelineEvent_PresentType value)354 const std::string& FrameTimelineEvent_PresentType_Name(
355 FrameTimelineEvent_PresentType value) {
356 static const bool dummy =
357 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
358 FrameTimelineEvent_PresentType_entries,
359 FrameTimelineEvent_PresentType_entries_by_number,
360 6, FrameTimelineEvent_PresentType_strings);
361 (void) dummy;
362 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
363 FrameTimelineEvent_PresentType_entries,
364 FrameTimelineEvent_PresentType_entries_by_number,
365 6, value);
366 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
367 FrameTimelineEvent_PresentType_strings[idx].get();
368 }
FrameTimelineEvent_PresentType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,FrameTimelineEvent_PresentType * value)369 bool FrameTimelineEvent_PresentType_Parse(
370 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FrameTimelineEvent_PresentType* value) {
371 int int_value;
372 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
373 FrameTimelineEvent_PresentType_entries, 6, name, &int_value);
374 if (success) {
375 *value = static_cast<FrameTimelineEvent_PresentType>(int_value);
376 }
377 return success;
378 }
379 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
380 constexpr FrameTimelineEvent_PresentType FrameTimelineEvent::PRESENT_UNSPECIFIED;
381 constexpr FrameTimelineEvent_PresentType FrameTimelineEvent::PRESENT_ON_TIME;
382 constexpr FrameTimelineEvent_PresentType FrameTimelineEvent::PRESENT_LATE;
383 constexpr FrameTimelineEvent_PresentType FrameTimelineEvent::PRESENT_EARLY;
384 constexpr FrameTimelineEvent_PresentType FrameTimelineEvent::PRESENT_DROPPED;
385 constexpr FrameTimelineEvent_PresentType FrameTimelineEvent::PRESENT_UNKNOWN;
386 constexpr FrameTimelineEvent_PresentType FrameTimelineEvent::PresentType_MIN;
387 constexpr FrameTimelineEvent_PresentType FrameTimelineEvent::PresentType_MAX;
388 constexpr int FrameTimelineEvent::PresentType_ARRAYSIZE;
389 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
FrameTimelineEvent_PredictionType_IsValid(int value)390 bool FrameTimelineEvent_PredictionType_IsValid(int value) {
391 switch (value) {
392 case 0:
393 case 1:
394 case 2:
395 case 3:
396 return true;
397 default:
398 return false;
399 }
400 }
401
402 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> FrameTimelineEvent_PredictionType_strings[4] = {};
403
404 static const char FrameTimelineEvent_PredictionType_names[] =
405 "PREDICTION_EXPIRED"
406 "PREDICTION_UNKNOWN"
407 "PREDICTION_UNSPECIFIED"
408 "PREDICTION_VALID";
409
410 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry FrameTimelineEvent_PredictionType_entries[] = {
411 { {FrameTimelineEvent_PredictionType_names + 0, 18}, 2 },
412 { {FrameTimelineEvent_PredictionType_names + 18, 18}, 3 },
413 { {FrameTimelineEvent_PredictionType_names + 36, 22}, 0 },
414 { {FrameTimelineEvent_PredictionType_names + 58, 16}, 1 },
415 };
416
417 static const int FrameTimelineEvent_PredictionType_entries_by_number[] = {
418 2, // 0 -> PREDICTION_UNSPECIFIED
419 3, // 1 -> PREDICTION_VALID
420 0, // 2 -> PREDICTION_EXPIRED
421 1, // 3 -> PREDICTION_UNKNOWN
422 };
423
FrameTimelineEvent_PredictionType_Name(FrameTimelineEvent_PredictionType value)424 const std::string& FrameTimelineEvent_PredictionType_Name(
425 FrameTimelineEvent_PredictionType value) {
426 static const bool dummy =
427 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
428 FrameTimelineEvent_PredictionType_entries,
429 FrameTimelineEvent_PredictionType_entries_by_number,
430 4, FrameTimelineEvent_PredictionType_strings);
431 (void) dummy;
432 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
433 FrameTimelineEvent_PredictionType_entries,
434 FrameTimelineEvent_PredictionType_entries_by_number,
435 4, value);
436 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
437 FrameTimelineEvent_PredictionType_strings[idx].get();
438 }
FrameTimelineEvent_PredictionType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,FrameTimelineEvent_PredictionType * value)439 bool FrameTimelineEvent_PredictionType_Parse(
440 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FrameTimelineEvent_PredictionType* value) {
441 int int_value;
442 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
443 FrameTimelineEvent_PredictionType_entries, 4, name, &int_value);
444 if (success) {
445 *value = static_cast<FrameTimelineEvent_PredictionType>(int_value);
446 }
447 return success;
448 }
449 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
450 constexpr FrameTimelineEvent_PredictionType FrameTimelineEvent::PREDICTION_UNSPECIFIED;
451 constexpr FrameTimelineEvent_PredictionType FrameTimelineEvent::PREDICTION_VALID;
452 constexpr FrameTimelineEvent_PredictionType FrameTimelineEvent::PREDICTION_EXPIRED;
453 constexpr FrameTimelineEvent_PredictionType FrameTimelineEvent::PREDICTION_UNKNOWN;
454 constexpr FrameTimelineEvent_PredictionType FrameTimelineEvent::PredictionType_MIN;
455 constexpr FrameTimelineEvent_PredictionType FrameTimelineEvent::PredictionType_MAX;
456 constexpr int FrameTimelineEvent::PredictionType_ARRAYSIZE;
457 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
458
459 // ===================================================================
460
461 class FrameTimelineEvent_ExpectedSurfaceFrameStart::_Internal {
462 public:
463 using HasBits = decltype(std::declval<FrameTimelineEvent_ExpectedSurfaceFrameStart>()._impl_._has_bits_);
set_has_cookie(HasBits * has_bits)464 static void set_has_cookie(HasBits* has_bits) {
465 (*has_bits)[0] |= 2u;
466 }
set_has_token(HasBits * has_bits)467 static void set_has_token(HasBits* has_bits) {
468 (*has_bits)[0] |= 4u;
469 }
set_has_display_frame_token(HasBits * has_bits)470 static void set_has_display_frame_token(HasBits* has_bits) {
471 (*has_bits)[0] |= 8u;
472 }
set_has_pid(HasBits * has_bits)473 static void set_has_pid(HasBits* has_bits) {
474 (*has_bits)[0] |= 16u;
475 }
set_has_layer_name(HasBits * has_bits)476 static void set_has_layer_name(HasBits* has_bits) {
477 (*has_bits)[0] |= 1u;
478 }
479 };
480
FrameTimelineEvent_ExpectedSurfaceFrameStart(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)481 FrameTimelineEvent_ExpectedSurfaceFrameStart::FrameTimelineEvent_ExpectedSurfaceFrameStart(::PROTOBUF_NAMESPACE_ID::Arena* arena,
482 bool is_message_owned)
483 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
484 SharedCtor(arena, is_message_owned);
485 // @@protoc_insertion_point(arena_constructor:perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart)
486 }
FrameTimelineEvent_ExpectedSurfaceFrameStart(const FrameTimelineEvent_ExpectedSurfaceFrameStart & from)487 FrameTimelineEvent_ExpectedSurfaceFrameStart::FrameTimelineEvent_ExpectedSurfaceFrameStart(const FrameTimelineEvent_ExpectedSurfaceFrameStart& from)
488 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
489 FrameTimelineEvent_ExpectedSurfaceFrameStart* const _this = this; (void)_this;
490 new (&_impl_) Impl_{
491 decltype(_impl_._has_bits_){from._impl_._has_bits_}
492 , /*decltype(_impl_._cached_size_)*/{}
493 , decltype(_impl_.layer_name_){}
494 , decltype(_impl_.cookie_){}
495 , decltype(_impl_.token_){}
496 , decltype(_impl_.display_frame_token_){}
497 , decltype(_impl_.pid_){}};
498
499 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
500 _impl_.layer_name_.InitDefault();
501 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
502 _impl_.layer_name_.Set("", GetArenaForAllocation());
503 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
504 if (from._internal_has_layer_name()) {
505 _this->_impl_.layer_name_.Set(from._internal_layer_name(),
506 _this->GetArenaForAllocation());
507 }
508 ::memcpy(&_impl_.cookie_, &from._impl_.cookie_,
509 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.pid_) -
510 reinterpret_cast<char*>(&_impl_.cookie_)) + sizeof(_impl_.pid_));
511 // @@protoc_insertion_point(copy_constructor:perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart)
512 }
513
SharedCtor(::_pb::Arena * arena,bool is_message_owned)514 inline void FrameTimelineEvent_ExpectedSurfaceFrameStart::SharedCtor(
515 ::_pb::Arena* arena, bool is_message_owned) {
516 (void)arena;
517 (void)is_message_owned;
518 new (&_impl_) Impl_{
519 decltype(_impl_._has_bits_){}
520 , /*decltype(_impl_._cached_size_)*/{}
521 , decltype(_impl_.layer_name_){}
522 , decltype(_impl_.cookie_){::int64_t{0}}
523 , decltype(_impl_.token_){::int64_t{0}}
524 , decltype(_impl_.display_frame_token_){::int64_t{0}}
525 , decltype(_impl_.pid_){0}
526 };
527 _impl_.layer_name_.InitDefault();
528 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
529 _impl_.layer_name_.Set("", GetArenaForAllocation());
530 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
531 }
532
~FrameTimelineEvent_ExpectedSurfaceFrameStart()533 FrameTimelineEvent_ExpectedSurfaceFrameStart::~FrameTimelineEvent_ExpectedSurfaceFrameStart() {
534 // @@protoc_insertion_point(destructor:perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart)
535 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
536 (void)arena;
537 return;
538 }
539 SharedDtor();
540 }
541
SharedDtor()542 inline void FrameTimelineEvent_ExpectedSurfaceFrameStart::SharedDtor() {
543 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
544 _impl_.layer_name_.Destroy();
545 }
546
SetCachedSize(int size) const547 void FrameTimelineEvent_ExpectedSurfaceFrameStart::SetCachedSize(int size) const {
548 _impl_._cached_size_.Set(size);
549 }
550
Clear()551 void FrameTimelineEvent_ExpectedSurfaceFrameStart::Clear() {
552 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart)
553 ::uint32_t cached_has_bits = 0;
554 // Prevent compiler warnings about cached_has_bits being unused
555 (void) cached_has_bits;
556
557 cached_has_bits = _impl_._has_bits_[0];
558 if (cached_has_bits & 0x00000001u) {
559 _impl_.layer_name_.ClearNonDefaultToEmpty();
560 }
561 if (cached_has_bits & 0x0000001eu) {
562 ::memset(&_impl_.cookie_, 0, static_cast<size_t>(
563 reinterpret_cast<char*>(&_impl_.pid_) -
564 reinterpret_cast<char*>(&_impl_.cookie_)) + sizeof(_impl_.pid_));
565 }
566 _impl_._has_bits_.Clear();
567 _internal_metadata_.Clear<std::string>();
568 }
569
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)570 const char* FrameTimelineEvent_ExpectedSurfaceFrameStart::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
571 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
572 _Internal::HasBits has_bits{};
573 while (!ctx->Done(&ptr)) {
574 ::uint32_t tag;
575 ptr = ::_pbi::ReadTag(ptr, &tag);
576 switch (tag >> 3) {
577 // optional int64 cookie = 1;
578 case 1:
579 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
580 _Internal::set_has_cookie(&has_bits);
581 _impl_.cookie_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
582 CHK_(ptr);
583 } else {
584 goto handle_unusual;
585 }
586 continue;
587 // optional int64 token = 2;
588 case 2:
589 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
590 _Internal::set_has_token(&has_bits);
591 _impl_.token_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
592 CHK_(ptr);
593 } else {
594 goto handle_unusual;
595 }
596 continue;
597 // optional int64 display_frame_token = 3;
598 case 3:
599 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
600 _Internal::set_has_display_frame_token(&has_bits);
601 _impl_.display_frame_token_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
602 CHK_(ptr);
603 } else {
604 goto handle_unusual;
605 }
606 continue;
607 // optional int32 pid = 4;
608 case 4:
609 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
610 _Internal::set_has_pid(&has_bits);
611 _impl_.pid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
612 CHK_(ptr);
613 } else {
614 goto handle_unusual;
615 }
616 continue;
617 // optional string layer_name = 5;
618 case 5:
619 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
620 auto str = _internal_mutable_layer_name();
621 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
622 CHK_(ptr);
623 } else {
624 goto handle_unusual;
625 }
626 continue;
627 default:
628 goto handle_unusual;
629 } // switch
630 handle_unusual:
631 if ((tag == 0) || ((tag & 7) == 4)) {
632 CHK_(ptr);
633 ctx->SetLastTag(tag);
634 goto message_done;
635 }
636 ptr = UnknownFieldParse(
637 tag,
638 _internal_metadata_.mutable_unknown_fields<std::string>(),
639 ptr, ctx);
640 CHK_(ptr != nullptr);
641 } // while
642 message_done:
643 _impl_._has_bits_.Or(has_bits);
644 return ptr;
645 failure:
646 ptr = nullptr;
647 goto message_done;
648 #undef CHK_
649 }
650
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const651 ::uint8_t* FrameTimelineEvent_ExpectedSurfaceFrameStart::_InternalSerialize(
652 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
653 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart)
654 ::uint32_t cached_has_bits = 0;
655 (void) cached_has_bits;
656
657 cached_has_bits = _impl_._has_bits_[0];
658 // optional int64 cookie = 1;
659 if (cached_has_bits & 0x00000002u) {
660 target = stream->EnsureSpace(target);
661 target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_cookie(), target);
662 }
663
664 // optional int64 token = 2;
665 if (cached_has_bits & 0x00000004u) {
666 target = stream->EnsureSpace(target);
667 target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_token(), target);
668 }
669
670 // optional int64 display_frame_token = 3;
671 if (cached_has_bits & 0x00000008u) {
672 target = stream->EnsureSpace(target);
673 target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_display_frame_token(), target);
674 }
675
676 // optional int32 pid = 4;
677 if (cached_has_bits & 0x00000010u) {
678 target = stream->EnsureSpace(target);
679 target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_pid(), target);
680 }
681
682 // optional string layer_name = 5;
683 if (cached_has_bits & 0x00000001u) {
684 target = stream->WriteStringMaybeAliased(
685 5, this->_internal_layer_name(), target);
686 }
687
688 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
689 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
690 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
691 }
692 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart)
693 return target;
694 }
695
ByteSizeLong() const696 size_t FrameTimelineEvent_ExpectedSurfaceFrameStart::ByteSizeLong() const {
697 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart)
698 size_t total_size = 0;
699
700 ::uint32_t cached_has_bits = 0;
701 // Prevent compiler warnings about cached_has_bits being unused
702 (void) cached_has_bits;
703
704 cached_has_bits = _impl_._has_bits_[0];
705 if (cached_has_bits & 0x0000001fu) {
706 // optional string layer_name = 5;
707 if (cached_has_bits & 0x00000001u) {
708 total_size += 1 +
709 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
710 this->_internal_layer_name());
711 }
712
713 // optional int64 cookie = 1;
714 if (cached_has_bits & 0x00000002u) {
715 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_cookie());
716 }
717
718 // optional int64 token = 2;
719 if (cached_has_bits & 0x00000004u) {
720 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_token());
721 }
722
723 // optional int64 display_frame_token = 3;
724 if (cached_has_bits & 0x00000008u) {
725 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_display_frame_token());
726 }
727
728 // optional int32 pid = 4;
729 if (cached_has_bits & 0x00000010u) {
730 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_pid());
731 }
732
733 }
734 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
735 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
736 }
737 int cached_size = ::_pbi::ToCachedSize(total_size);
738 SetCachedSize(cached_size);
739 return total_size;
740 }
741
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)742 void FrameTimelineEvent_ExpectedSurfaceFrameStart::CheckTypeAndMergeFrom(
743 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
744 MergeFrom(*::_pbi::DownCast<const FrameTimelineEvent_ExpectedSurfaceFrameStart*>(
745 &from));
746 }
747
MergeFrom(const FrameTimelineEvent_ExpectedSurfaceFrameStart & from)748 void FrameTimelineEvent_ExpectedSurfaceFrameStart::MergeFrom(const FrameTimelineEvent_ExpectedSurfaceFrameStart& from) {
749 FrameTimelineEvent_ExpectedSurfaceFrameStart* const _this = this;
750 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart)
751 GOOGLE_DCHECK_NE(&from, _this);
752 ::uint32_t cached_has_bits = 0;
753 (void) cached_has_bits;
754
755 cached_has_bits = from._impl_._has_bits_[0];
756 if (cached_has_bits & 0x0000001fu) {
757 if (cached_has_bits & 0x00000001u) {
758 _this->_internal_set_layer_name(from._internal_layer_name());
759 }
760 if (cached_has_bits & 0x00000002u) {
761 _this->_impl_.cookie_ = from._impl_.cookie_;
762 }
763 if (cached_has_bits & 0x00000004u) {
764 _this->_impl_.token_ = from._impl_.token_;
765 }
766 if (cached_has_bits & 0x00000008u) {
767 _this->_impl_.display_frame_token_ = from._impl_.display_frame_token_;
768 }
769 if (cached_has_bits & 0x00000010u) {
770 _this->_impl_.pid_ = from._impl_.pid_;
771 }
772 _this->_impl_._has_bits_[0] |= cached_has_bits;
773 }
774 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
775 }
776
CopyFrom(const FrameTimelineEvent_ExpectedSurfaceFrameStart & from)777 void FrameTimelineEvent_ExpectedSurfaceFrameStart::CopyFrom(const FrameTimelineEvent_ExpectedSurfaceFrameStart& from) {
778 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart)
779 if (&from == this) return;
780 Clear();
781 MergeFrom(from);
782 }
783
IsInitialized() const784 bool FrameTimelineEvent_ExpectedSurfaceFrameStart::IsInitialized() const {
785 return true;
786 }
787
InternalSwap(FrameTimelineEvent_ExpectedSurfaceFrameStart * other)788 void FrameTimelineEvent_ExpectedSurfaceFrameStart::InternalSwap(FrameTimelineEvent_ExpectedSurfaceFrameStart* other) {
789 using std::swap;
790 auto* lhs_arena = GetArenaForAllocation();
791 auto* rhs_arena = other->GetArenaForAllocation();
792 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
793 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
794 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
795 &_impl_.layer_name_, lhs_arena,
796 &other->_impl_.layer_name_, rhs_arena
797 );
798 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
799 PROTOBUF_FIELD_OFFSET(FrameTimelineEvent_ExpectedSurfaceFrameStart, _impl_.pid_)
800 + sizeof(FrameTimelineEvent_ExpectedSurfaceFrameStart::_impl_.pid_) // NOLINT
801 - PROTOBUF_FIELD_OFFSET(FrameTimelineEvent_ExpectedSurfaceFrameStart, _impl_.cookie_)>(
802 reinterpret_cast<char*>(&_impl_.cookie_),
803 reinterpret_cast<char*>(&other->_impl_.cookie_));
804 }
805
GetTypeName() const806 std::string FrameTimelineEvent_ExpectedSurfaceFrameStart::GetTypeName() const {
807 return "perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart";
808 }
809
810
811 // ===================================================================
812
813 class FrameTimelineEvent_ActualSurfaceFrameStart::_Internal {
814 public:
815 using HasBits = decltype(std::declval<FrameTimelineEvent_ActualSurfaceFrameStart>()._impl_._has_bits_);
set_has_cookie(HasBits * has_bits)816 static void set_has_cookie(HasBits* has_bits) {
817 (*has_bits)[0] |= 2u;
818 }
set_has_token(HasBits * has_bits)819 static void set_has_token(HasBits* has_bits) {
820 (*has_bits)[0] |= 4u;
821 }
set_has_display_frame_token(HasBits * has_bits)822 static void set_has_display_frame_token(HasBits* has_bits) {
823 (*has_bits)[0] |= 8u;
824 }
set_has_pid(HasBits * has_bits)825 static void set_has_pid(HasBits* has_bits) {
826 (*has_bits)[0] |= 16u;
827 }
set_has_layer_name(HasBits * has_bits)828 static void set_has_layer_name(HasBits* has_bits) {
829 (*has_bits)[0] |= 1u;
830 }
set_has_present_type(HasBits * has_bits)831 static void set_has_present_type(HasBits* has_bits) {
832 (*has_bits)[0] |= 32u;
833 }
set_has_on_time_finish(HasBits * has_bits)834 static void set_has_on_time_finish(HasBits* has_bits) {
835 (*has_bits)[0] |= 64u;
836 }
set_has_gpu_composition(HasBits * has_bits)837 static void set_has_gpu_composition(HasBits* has_bits) {
838 (*has_bits)[0] |= 128u;
839 }
set_has_jank_type(HasBits * has_bits)840 static void set_has_jank_type(HasBits* has_bits) {
841 (*has_bits)[0] |= 512u;
842 }
set_has_prediction_type(HasBits * has_bits)843 static void set_has_prediction_type(HasBits* has_bits) {
844 (*has_bits)[0] |= 1024u;
845 }
set_has_is_buffer(HasBits * has_bits)846 static void set_has_is_buffer(HasBits* has_bits) {
847 (*has_bits)[0] |= 256u;
848 }
set_has_jank_severity_type(HasBits * has_bits)849 static void set_has_jank_severity_type(HasBits* has_bits) {
850 (*has_bits)[0] |= 2048u;
851 }
852 };
853
FrameTimelineEvent_ActualSurfaceFrameStart(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)854 FrameTimelineEvent_ActualSurfaceFrameStart::FrameTimelineEvent_ActualSurfaceFrameStart(::PROTOBUF_NAMESPACE_ID::Arena* arena,
855 bool is_message_owned)
856 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
857 SharedCtor(arena, is_message_owned);
858 // @@protoc_insertion_point(arena_constructor:perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart)
859 }
FrameTimelineEvent_ActualSurfaceFrameStart(const FrameTimelineEvent_ActualSurfaceFrameStart & from)860 FrameTimelineEvent_ActualSurfaceFrameStart::FrameTimelineEvent_ActualSurfaceFrameStart(const FrameTimelineEvent_ActualSurfaceFrameStart& from)
861 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
862 FrameTimelineEvent_ActualSurfaceFrameStart* const _this = this; (void)_this;
863 new (&_impl_) Impl_{
864 decltype(_impl_._has_bits_){from._impl_._has_bits_}
865 , /*decltype(_impl_._cached_size_)*/{}
866 , decltype(_impl_.layer_name_){}
867 , decltype(_impl_.cookie_){}
868 , decltype(_impl_.token_){}
869 , decltype(_impl_.display_frame_token_){}
870 , decltype(_impl_.pid_){}
871 , decltype(_impl_.present_type_){}
872 , decltype(_impl_.on_time_finish_){}
873 , decltype(_impl_.gpu_composition_){}
874 , decltype(_impl_.is_buffer_){}
875 , decltype(_impl_.jank_type_){}
876 , decltype(_impl_.prediction_type_){}
877 , decltype(_impl_.jank_severity_type_){}};
878
879 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
880 _impl_.layer_name_.InitDefault();
881 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
882 _impl_.layer_name_.Set("", GetArenaForAllocation());
883 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
884 if (from._internal_has_layer_name()) {
885 _this->_impl_.layer_name_.Set(from._internal_layer_name(),
886 _this->GetArenaForAllocation());
887 }
888 ::memcpy(&_impl_.cookie_, &from._impl_.cookie_,
889 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.jank_severity_type_) -
890 reinterpret_cast<char*>(&_impl_.cookie_)) + sizeof(_impl_.jank_severity_type_));
891 // @@protoc_insertion_point(copy_constructor:perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart)
892 }
893
SharedCtor(::_pb::Arena * arena,bool is_message_owned)894 inline void FrameTimelineEvent_ActualSurfaceFrameStart::SharedCtor(
895 ::_pb::Arena* arena, bool is_message_owned) {
896 (void)arena;
897 (void)is_message_owned;
898 new (&_impl_) Impl_{
899 decltype(_impl_._has_bits_){}
900 , /*decltype(_impl_._cached_size_)*/{}
901 , decltype(_impl_.layer_name_){}
902 , decltype(_impl_.cookie_){::int64_t{0}}
903 , decltype(_impl_.token_){::int64_t{0}}
904 , decltype(_impl_.display_frame_token_){::int64_t{0}}
905 , decltype(_impl_.pid_){0}
906 , decltype(_impl_.present_type_){0}
907 , decltype(_impl_.on_time_finish_){false}
908 , decltype(_impl_.gpu_composition_){false}
909 , decltype(_impl_.is_buffer_){false}
910 , decltype(_impl_.jank_type_){0}
911 , decltype(_impl_.prediction_type_){0}
912 , decltype(_impl_.jank_severity_type_){0}
913 };
914 _impl_.layer_name_.InitDefault();
915 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
916 _impl_.layer_name_.Set("", GetArenaForAllocation());
917 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
918 }
919
~FrameTimelineEvent_ActualSurfaceFrameStart()920 FrameTimelineEvent_ActualSurfaceFrameStart::~FrameTimelineEvent_ActualSurfaceFrameStart() {
921 // @@protoc_insertion_point(destructor:perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart)
922 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
923 (void)arena;
924 return;
925 }
926 SharedDtor();
927 }
928
SharedDtor()929 inline void FrameTimelineEvent_ActualSurfaceFrameStart::SharedDtor() {
930 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
931 _impl_.layer_name_.Destroy();
932 }
933
SetCachedSize(int size) const934 void FrameTimelineEvent_ActualSurfaceFrameStart::SetCachedSize(int size) const {
935 _impl_._cached_size_.Set(size);
936 }
937
Clear()938 void FrameTimelineEvent_ActualSurfaceFrameStart::Clear() {
939 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart)
940 ::uint32_t cached_has_bits = 0;
941 // Prevent compiler warnings about cached_has_bits being unused
942 (void) cached_has_bits;
943
944 cached_has_bits = _impl_._has_bits_[0];
945 if (cached_has_bits & 0x00000001u) {
946 _impl_.layer_name_.ClearNonDefaultToEmpty();
947 }
948 if (cached_has_bits & 0x000000feu) {
949 ::memset(&_impl_.cookie_, 0, static_cast<size_t>(
950 reinterpret_cast<char*>(&_impl_.gpu_composition_) -
951 reinterpret_cast<char*>(&_impl_.cookie_)) + sizeof(_impl_.gpu_composition_));
952 }
953 if (cached_has_bits & 0x00000f00u) {
954 ::memset(&_impl_.is_buffer_, 0, static_cast<size_t>(
955 reinterpret_cast<char*>(&_impl_.jank_severity_type_) -
956 reinterpret_cast<char*>(&_impl_.is_buffer_)) + sizeof(_impl_.jank_severity_type_));
957 }
958 _impl_._has_bits_.Clear();
959 _internal_metadata_.Clear<std::string>();
960 }
961
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)962 const char* FrameTimelineEvent_ActualSurfaceFrameStart::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
963 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
964 _Internal::HasBits has_bits{};
965 while (!ctx->Done(&ptr)) {
966 ::uint32_t tag;
967 ptr = ::_pbi::ReadTag(ptr, &tag);
968 switch (tag >> 3) {
969 // optional int64 cookie = 1;
970 case 1:
971 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
972 _Internal::set_has_cookie(&has_bits);
973 _impl_.cookie_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
974 CHK_(ptr);
975 } else {
976 goto handle_unusual;
977 }
978 continue;
979 // optional int64 token = 2;
980 case 2:
981 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
982 _Internal::set_has_token(&has_bits);
983 _impl_.token_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
984 CHK_(ptr);
985 } else {
986 goto handle_unusual;
987 }
988 continue;
989 // optional int64 display_frame_token = 3;
990 case 3:
991 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
992 _Internal::set_has_display_frame_token(&has_bits);
993 _impl_.display_frame_token_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
994 CHK_(ptr);
995 } else {
996 goto handle_unusual;
997 }
998 continue;
999 // optional int32 pid = 4;
1000 case 4:
1001 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
1002 _Internal::set_has_pid(&has_bits);
1003 _impl_.pid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1004 CHK_(ptr);
1005 } else {
1006 goto handle_unusual;
1007 }
1008 continue;
1009 // optional string layer_name = 5;
1010 case 5:
1011 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
1012 auto str = _internal_mutable_layer_name();
1013 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1014 CHK_(ptr);
1015 } else {
1016 goto handle_unusual;
1017 }
1018 continue;
1019 // optional .perfetto.protos.FrameTimelineEvent.PresentType present_type = 6;
1020 case 6:
1021 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
1022 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1023 CHK_(ptr);
1024 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::FrameTimelineEvent_PresentType_IsValid(val))) {
1025 _internal_set_present_type(static_cast<::perfetto::protos::FrameTimelineEvent_PresentType>(val));
1026 } else {
1027 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields());
1028 }
1029 } else {
1030 goto handle_unusual;
1031 }
1032 continue;
1033 // optional bool on_time_finish = 7;
1034 case 7:
1035 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
1036 _Internal::set_has_on_time_finish(&has_bits);
1037 _impl_.on_time_finish_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1038 CHK_(ptr);
1039 } else {
1040 goto handle_unusual;
1041 }
1042 continue;
1043 // optional bool gpu_composition = 8;
1044 case 8:
1045 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
1046 _Internal::set_has_gpu_composition(&has_bits);
1047 _impl_.gpu_composition_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1048 CHK_(ptr);
1049 } else {
1050 goto handle_unusual;
1051 }
1052 continue;
1053 // optional int32 jank_type = 9;
1054 case 9:
1055 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
1056 _Internal::set_has_jank_type(&has_bits);
1057 _impl_.jank_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1058 CHK_(ptr);
1059 } else {
1060 goto handle_unusual;
1061 }
1062 continue;
1063 // optional .perfetto.protos.FrameTimelineEvent.PredictionType prediction_type = 10;
1064 case 10:
1065 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
1066 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1067 CHK_(ptr);
1068 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::FrameTimelineEvent_PredictionType_IsValid(val))) {
1069 _internal_set_prediction_type(static_cast<::perfetto::protos::FrameTimelineEvent_PredictionType>(val));
1070 } else {
1071 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(10, val, mutable_unknown_fields());
1072 }
1073 } else {
1074 goto handle_unusual;
1075 }
1076 continue;
1077 // optional bool is_buffer = 11;
1078 case 11:
1079 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 88)) {
1080 _Internal::set_has_is_buffer(&has_bits);
1081 _impl_.is_buffer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1082 CHK_(ptr);
1083 } else {
1084 goto handle_unusual;
1085 }
1086 continue;
1087 // optional .perfetto.protos.FrameTimelineEvent.JankSeverityType jank_severity_type = 12;
1088 case 12:
1089 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 96)) {
1090 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1091 CHK_(ptr);
1092 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::FrameTimelineEvent_JankSeverityType_IsValid(val))) {
1093 _internal_set_jank_severity_type(static_cast<::perfetto::protos::FrameTimelineEvent_JankSeverityType>(val));
1094 } else {
1095 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(12, val, mutable_unknown_fields());
1096 }
1097 } else {
1098 goto handle_unusual;
1099 }
1100 continue;
1101 default:
1102 goto handle_unusual;
1103 } // switch
1104 handle_unusual:
1105 if ((tag == 0) || ((tag & 7) == 4)) {
1106 CHK_(ptr);
1107 ctx->SetLastTag(tag);
1108 goto message_done;
1109 }
1110 ptr = UnknownFieldParse(
1111 tag,
1112 _internal_metadata_.mutable_unknown_fields<std::string>(),
1113 ptr, ctx);
1114 CHK_(ptr != nullptr);
1115 } // while
1116 message_done:
1117 _impl_._has_bits_.Or(has_bits);
1118 return ptr;
1119 failure:
1120 ptr = nullptr;
1121 goto message_done;
1122 #undef CHK_
1123 }
1124
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1125 ::uint8_t* FrameTimelineEvent_ActualSurfaceFrameStart::_InternalSerialize(
1126 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1127 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart)
1128 ::uint32_t cached_has_bits = 0;
1129 (void) cached_has_bits;
1130
1131 cached_has_bits = _impl_._has_bits_[0];
1132 // optional int64 cookie = 1;
1133 if (cached_has_bits & 0x00000002u) {
1134 target = stream->EnsureSpace(target);
1135 target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_cookie(), target);
1136 }
1137
1138 // optional int64 token = 2;
1139 if (cached_has_bits & 0x00000004u) {
1140 target = stream->EnsureSpace(target);
1141 target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_token(), target);
1142 }
1143
1144 // optional int64 display_frame_token = 3;
1145 if (cached_has_bits & 0x00000008u) {
1146 target = stream->EnsureSpace(target);
1147 target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_display_frame_token(), target);
1148 }
1149
1150 // optional int32 pid = 4;
1151 if (cached_has_bits & 0x00000010u) {
1152 target = stream->EnsureSpace(target);
1153 target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_pid(), target);
1154 }
1155
1156 // optional string layer_name = 5;
1157 if (cached_has_bits & 0x00000001u) {
1158 target = stream->WriteStringMaybeAliased(
1159 5, this->_internal_layer_name(), target);
1160 }
1161
1162 // optional .perfetto.protos.FrameTimelineEvent.PresentType present_type = 6;
1163 if (cached_has_bits & 0x00000020u) {
1164 target = stream->EnsureSpace(target);
1165 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1166 6, this->_internal_present_type(), target);
1167 }
1168
1169 // optional bool on_time_finish = 7;
1170 if (cached_has_bits & 0x00000040u) {
1171 target = stream->EnsureSpace(target);
1172 target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_on_time_finish(), target);
1173 }
1174
1175 // optional bool gpu_composition = 8;
1176 if (cached_has_bits & 0x00000080u) {
1177 target = stream->EnsureSpace(target);
1178 target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_gpu_composition(), target);
1179 }
1180
1181 // optional int32 jank_type = 9;
1182 if (cached_has_bits & 0x00000200u) {
1183 target = stream->EnsureSpace(target);
1184 target = ::_pbi::WireFormatLite::WriteInt32ToArray(9, this->_internal_jank_type(), target);
1185 }
1186
1187 // optional .perfetto.protos.FrameTimelineEvent.PredictionType prediction_type = 10;
1188 if (cached_has_bits & 0x00000400u) {
1189 target = stream->EnsureSpace(target);
1190 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1191 10, this->_internal_prediction_type(), target);
1192 }
1193
1194 // optional bool is_buffer = 11;
1195 if (cached_has_bits & 0x00000100u) {
1196 target = stream->EnsureSpace(target);
1197 target = ::_pbi::WireFormatLite::WriteBoolToArray(11, this->_internal_is_buffer(), target);
1198 }
1199
1200 // optional .perfetto.protos.FrameTimelineEvent.JankSeverityType jank_severity_type = 12;
1201 if (cached_has_bits & 0x00000800u) {
1202 target = stream->EnsureSpace(target);
1203 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1204 12, this->_internal_jank_severity_type(), target);
1205 }
1206
1207 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1208 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1209 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1210 }
1211 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart)
1212 return target;
1213 }
1214
ByteSizeLong() const1215 size_t FrameTimelineEvent_ActualSurfaceFrameStart::ByteSizeLong() const {
1216 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart)
1217 size_t total_size = 0;
1218
1219 ::uint32_t cached_has_bits = 0;
1220 // Prevent compiler warnings about cached_has_bits being unused
1221 (void) cached_has_bits;
1222
1223 cached_has_bits = _impl_._has_bits_[0];
1224 if (cached_has_bits & 0x000000ffu) {
1225 // optional string layer_name = 5;
1226 if (cached_has_bits & 0x00000001u) {
1227 total_size += 1 +
1228 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1229 this->_internal_layer_name());
1230 }
1231
1232 // optional int64 cookie = 1;
1233 if (cached_has_bits & 0x00000002u) {
1234 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_cookie());
1235 }
1236
1237 // optional int64 token = 2;
1238 if (cached_has_bits & 0x00000004u) {
1239 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_token());
1240 }
1241
1242 // optional int64 display_frame_token = 3;
1243 if (cached_has_bits & 0x00000008u) {
1244 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_display_frame_token());
1245 }
1246
1247 // optional int32 pid = 4;
1248 if (cached_has_bits & 0x00000010u) {
1249 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_pid());
1250 }
1251
1252 // optional .perfetto.protos.FrameTimelineEvent.PresentType present_type = 6;
1253 if (cached_has_bits & 0x00000020u) {
1254 total_size += 1 +
1255 ::_pbi::WireFormatLite::EnumSize(this->_internal_present_type());
1256 }
1257
1258 // optional bool on_time_finish = 7;
1259 if (cached_has_bits & 0x00000040u) {
1260 total_size += 1 + 1;
1261 }
1262
1263 // optional bool gpu_composition = 8;
1264 if (cached_has_bits & 0x00000080u) {
1265 total_size += 1 + 1;
1266 }
1267
1268 }
1269 if (cached_has_bits & 0x00000f00u) {
1270 // optional bool is_buffer = 11;
1271 if (cached_has_bits & 0x00000100u) {
1272 total_size += 1 + 1;
1273 }
1274
1275 // optional int32 jank_type = 9;
1276 if (cached_has_bits & 0x00000200u) {
1277 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_jank_type());
1278 }
1279
1280 // optional .perfetto.protos.FrameTimelineEvent.PredictionType prediction_type = 10;
1281 if (cached_has_bits & 0x00000400u) {
1282 total_size += 1 +
1283 ::_pbi::WireFormatLite::EnumSize(this->_internal_prediction_type());
1284 }
1285
1286 // optional .perfetto.protos.FrameTimelineEvent.JankSeverityType jank_severity_type = 12;
1287 if (cached_has_bits & 0x00000800u) {
1288 total_size += 1 +
1289 ::_pbi::WireFormatLite::EnumSize(this->_internal_jank_severity_type());
1290 }
1291
1292 }
1293 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1294 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1295 }
1296 int cached_size = ::_pbi::ToCachedSize(total_size);
1297 SetCachedSize(cached_size);
1298 return total_size;
1299 }
1300
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1301 void FrameTimelineEvent_ActualSurfaceFrameStart::CheckTypeAndMergeFrom(
1302 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1303 MergeFrom(*::_pbi::DownCast<const FrameTimelineEvent_ActualSurfaceFrameStart*>(
1304 &from));
1305 }
1306
MergeFrom(const FrameTimelineEvent_ActualSurfaceFrameStart & from)1307 void FrameTimelineEvent_ActualSurfaceFrameStart::MergeFrom(const FrameTimelineEvent_ActualSurfaceFrameStart& from) {
1308 FrameTimelineEvent_ActualSurfaceFrameStart* const _this = this;
1309 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart)
1310 GOOGLE_DCHECK_NE(&from, _this);
1311 ::uint32_t cached_has_bits = 0;
1312 (void) cached_has_bits;
1313
1314 cached_has_bits = from._impl_._has_bits_[0];
1315 if (cached_has_bits & 0x000000ffu) {
1316 if (cached_has_bits & 0x00000001u) {
1317 _this->_internal_set_layer_name(from._internal_layer_name());
1318 }
1319 if (cached_has_bits & 0x00000002u) {
1320 _this->_impl_.cookie_ = from._impl_.cookie_;
1321 }
1322 if (cached_has_bits & 0x00000004u) {
1323 _this->_impl_.token_ = from._impl_.token_;
1324 }
1325 if (cached_has_bits & 0x00000008u) {
1326 _this->_impl_.display_frame_token_ = from._impl_.display_frame_token_;
1327 }
1328 if (cached_has_bits & 0x00000010u) {
1329 _this->_impl_.pid_ = from._impl_.pid_;
1330 }
1331 if (cached_has_bits & 0x00000020u) {
1332 _this->_impl_.present_type_ = from._impl_.present_type_;
1333 }
1334 if (cached_has_bits & 0x00000040u) {
1335 _this->_impl_.on_time_finish_ = from._impl_.on_time_finish_;
1336 }
1337 if (cached_has_bits & 0x00000080u) {
1338 _this->_impl_.gpu_composition_ = from._impl_.gpu_composition_;
1339 }
1340 _this->_impl_._has_bits_[0] |= cached_has_bits;
1341 }
1342 if (cached_has_bits & 0x00000f00u) {
1343 if (cached_has_bits & 0x00000100u) {
1344 _this->_impl_.is_buffer_ = from._impl_.is_buffer_;
1345 }
1346 if (cached_has_bits & 0x00000200u) {
1347 _this->_impl_.jank_type_ = from._impl_.jank_type_;
1348 }
1349 if (cached_has_bits & 0x00000400u) {
1350 _this->_impl_.prediction_type_ = from._impl_.prediction_type_;
1351 }
1352 if (cached_has_bits & 0x00000800u) {
1353 _this->_impl_.jank_severity_type_ = from._impl_.jank_severity_type_;
1354 }
1355 _this->_impl_._has_bits_[0] |= cached_has_bits;
1356 }
1357 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1358 }
1359
CopyFrom(const FrameTimelineEvent_ActualSurfaceFrameStart & from)1360 void FrameTimelineEvent_ActualSurfaceFrameStart::CopyFrom(const FrameTimelineEvent_ActualSurfaceFrameStart& from) {
1361 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart)
1362 if (&from == this) return;
1363 Clear();
1364 MergeFrom(from);
1365 }
1366
IsInitialized() const1367 bool FrameTimelineEvent_ActualSurfaceFrameStart::IsInitialized() const {
1368 return true;
1369 }
1370
InternalSwap(FrameTimelineEvent_ActualSurfaceFrameStart * other)1371 void FrameTimelineEvent_ActualSurfaceFrameStart::InternalSwap(FrameTimelineEvent_ActualSurfaceFrameStart* other) {
1372 using std::swap;
1373 auto* lhs_arena = GetArenaForAllocation();
1374 auto* rhs_arena = other->GetArenaForAllocation();
1375 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1376 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1377 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1378 &_impl_.layer_name_, lhs_arena,
1379 &other->_impl_.layer_name_, rhs_arena
1380 );
1381 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1382 PROTOBUF_FIELD_OFFSET(FrameTimelineEvent_ActualSurfaceFrameStart, _impl_.jank_severity_type_)
1383 + sizeof(FrameTimelineEvent_ActualSurfaceFrameStart::_impl_.jank_severity_type_) // NOLINT
1384 - PROTOBUF_FIELD_OFFSET(FrameTimelineEvent_ActualSurfaceFrameStart, _impl_.cookie_)>(
1385 reinterpret_cast<char*>(&_impl_.cookie_),
1386 reinterpret_cast<char*>(&other->_impl_.cookie_));
1387 }
1388
GetTypeName() const1389 std::string FrameTimelineEvent_ActualSurfaceFrameStart::GetTypeName() const {
1390 return "perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart";
1391 }
1392
1393
1394 // ===================================================================
1395
1396 class FrameTimelineEvent_ExpectedDisplayFrameStart::_Internal {
1397 public:
1398 using HasBits = decltype(std::declval<FrameTimelineEvent_ExpectedDisplayFrameStart>()._impl_._has_bits_);
set_has_cookie(HasBits * has_bits)1399 static void set_has_cookie(HasBits* has_bits) {
1400 (*has_bits)[0] |= 1u;
1401 }
set_has_token(HasBits * has_bits)1402 static void set_has_token(HasBits* has_bits) {
1403 (*has_bits)[0] |= 2u;
1404 }
set_has_pid(HasBits * has_bits)1405 static void set_has_pid(HasBits* has_bits) {
1406 (*has_bits)[0] |= 4u;
1407 }
1408 };
1409
FrameTimelineEvent_ExpectedDisplayFrameStart(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1410 FrameTimelineEvent_ExpectedDisplayFrameStart::FrameTimelineEvent_ExpectedDisplayFrameStart(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1411 bool is_message_owned)
1412 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1413 SharedCtor(arena, is_message_owned);
1414 // @@protoc_insertion_point(arena_constructor:perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart)
1415 }
FrameTimelineEvent_ExpectedDisplayFrameStart(const FrameTimelineEvent_ExpectedDisplayFrameStart & from)1416 FrameTimelineEvent_ExpectedDisplayFrameStart::FrameTimelineEvent_ExpectedDisplayFrameStart(const FrameTimelineEvent_ExpectedDisplayFrameStart& from)
1417 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1418 FrameTimelineEvent_ExpectedDisplayFrameStart* const _this = this; (void)_this;
1419 new (&_impl_) Impl_{
1420 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1421 , /*decltype(_impl_._cached_size_)*/{}
1422 , decltype(_impl_.cookie_){}
1423 , decltype(_impl_.token_){}
1424 , decltype(_impl_.pid_){}};
1425
1426 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1427 ::memcpy(&_impl_.cookie_, &from._impl_.cookie_,
1428 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.pid_) -
1429 reinterpret_cast<char*>(&_impl_.cookie_)) + sizeof(_impl_.pid_));
1430 // @@protoc_insertion_point(copy_constructor:perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart)
1431 }
1432
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1433 inline void FrameTimelineEvent_ExpectedDisplayFrameStart::SharedCtor(
1434 ::_pb::Arena* arena, bool is_message_owned) {
1435 (void)arena;
1436 (void)is_message_owned;
1437 new (&_impl_) Impl_{
1438 decltype(_impl_._has_bits_){}
1439 , /*decltype(_impl_._cached_size_)*/{}
1440 , decltype(_impl_.cookie_){::int64_t{0}}
1441 , decltype(_impl_.token_){::int64_t{0}}
1442 , decltype(_impl_.pid_){0}
1443 };
1444 }
1445
~FrameTimelineEvent_ExpectedDisplayFrameStart()1446 FrameTimelineEvent_ExpectedDisplayFrameStart::~FrameTimelineEvent_ExpectedDisplayFrameStart() {
1447 // @@protoc_insertion_point(destructor:perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart)
1448 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1449 (void)arena;
1450 return;
1451 }
1452 SharedDtor();
1453 }
1454
SharedDtor()1455 inline void FrameTimelineEvent_ExpectedDisplayFrameStart::SharedDtor() {
1456 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1457 }
1458
SetCachedSize(int size) const1459 void FrameTimelineEvent_ExpectedDisplayFrameStart::SetCachedSize(int size) const {
1460 _impl_._cached_size_.Set(size);
1461 }
1462
Clear()1463 void FrameTimelineEvent_ExpectedDisplayFrameStart::Clear() {
1464 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart)
1465 ::uint32_t cached_has_bits = 0;
1466 // Prevent compiler warnings about cached_has_bits being unused
1467 (void) cached_has_bits;
1468
1469 cached_has_bits = _impl_._has_bits_[0];
1470 if (cached_has_bits & 0x00000007u) {
1471 ::memset(&_impl_.cookie_, 0, static_cast<size_t>(
1472 reinterpret_cast<char*>(&_impl_.pid_) -
1473 reinterpret_cast<char*>(&_impl_.cookie_)) + sizeof(_impl_.pid_));
1474 }
1475 _impl_._has_bits_.Clear();
1476 _internal_metadata_.Clear<std::string>();
1477 }
1478
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1479 const char* FrameTimelineEvent_ExpectedDisplayFrameStart::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1480 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1481 _Internal::HasBits has_bits{};
1482 while (!ctx->Done(&ptr)) {
1483 ::uint32_t tag;
1484 ptr = ::_pbi::ReadTag(ptr, &tag);
1485 switch (tag >> 3) {
1486 // optional int64 cookie = 1;
1487 case 1:
1488 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1489 _Internal::set_has_cookie(&has_bits);
1490 _impl_.cookie_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1491 CHK_(ptr);
1492 } else {
1493 goto handle_unusual;
1494 }
1495 continue;
1496 // optional int64 token = 2;
1497 case 2:
1498 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1499 _Internal::set_has_token(&has_bits);
1500 _impl_.token_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1501 CHK_(ptr);
1502 } else {
1503 goto handle_unusual;
1504 }
1505 continue;
1506 // optional int32 pid = 3;
1507 case 3:
1508 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1509 _Internal::set_has_pid(&has_bits);
1510 _impl_.pid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1511 CHK_(ptr);
1512 } else {
1513 goto handle_unusual;
1514 }
1515 continue;
1516 default:
1517 goto handle_unusual;
1518 } // switch
1519 handle_unusual:
1520 if ((tag == 0) || ((tag & 7) == 4)) {
1521 CHK_(ptr);
1522 ctx->SetLastTag(tag);
1523 goto message_done;
1524 }
1525 ptr = UnknownFieldParse(
1526 tag,
1527 _internal_metadata_.mutable_unknown_fields<std::string>(),
1528 ptr, ctx);
1529 CHK_(ptr != nullptr);
1530 } // while
1531 message_done:
1532 _impl_._has_bits_.Or(has_bits);
1533 return ptr;
1534 failure:
1535 ptr = nullptr;
1536 goto message_done;
1537 #undef CHK_
1538 }
1539
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1540 ::uint8_t* FrameTimelineEvent_ExpectedDisplayFrameStart::_InternalSerialize(
1541 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1542 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart)
1543 ::uint32_t cached_has_bits = 0;
1544 (void) cached_has_bits;
1545
1546 cached_has_bits = _impl_._has_bits_[0];
1547 // optional int64 cookie = 1;
1548 if (cached_has_bits & 0x00000001u) {
1549 target = stream->EnsureSpace(target);
1550 target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_cookie(), target);
1551 }
1552
1553 // optional int64 token = 2;
1554 if (cached_has_bits & 0x00000002u) {
1555 target = stream->EnsureSpace(target);
1556 target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_token(), target);
1557 }
1558
1559 // optional int32 pid = 3;
1560 if (cached_has_bits & 0x00000004u) {
1561 target = stream->EnsureSpace(target);
1562 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_pid(), target);
1563 }
1564
1565 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1566 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1567 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1568 }
1569 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart)
1570 return target;
1571 }
1572
ByteSizeLong() const1573 size_t FrameTimelineEvent_ExpectedDisplayFrameStart::ByteSizeLong() const {
1574 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart)
1575 size_t total_size = 0;
1576
1577 ::uint32_t cached_has_bits = 0;
1578 // Prevent compiler warnings about cached_has_bits being unused
1579 (void) cached_has_bits;
1580
1581 cached_has_bits = _impl_._has_bits_[0];
1582 if (cached_has_bits & 0x00000007u) {
1583 // optional int64 cookie = 1;
1584 if (cached_has_bits & 0x00000001u) {
1585 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_cookie());
1586 }
1587
1588 // optional int64 token = 2;
1589 if (cached_has_bits & 0x00000002u) {
1590 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_token());
1591 }
1592
1593 // optional int32 pid = 3;
1594 if (cached_has_bits & 0x00000004u) {
1595 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_pid());
1596 }
1597
1598 }
1599 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1600 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1601 }
1602 int cached_size = ::_pbi::ToCachedSize(total_size);
1603 SetCachedSize(cached_size);
1604 return total_size;
1605 }
1606
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1607 void FrameTimelineEvent_ExpectedDisplayFrameStart::CheckTypeAndMergeFrom(
1608 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1609 MergeFrom(*::_pbi::DownCast<const FrameTimelineEvent_ExpectedDisplayFrameStart*>(
1610 &from));
1611 }
1612
MergeFrom(const FrameTimelineEvent_ExpectedDisplayFrameStart & from)1613 void FrameTimelineEvent_ExpectedDisplayFrameStart::MergeFrom(const FrameTimelineEvent_ExpectedDisplayFrameStart& from) {
1614 FrameTimelineEvent_ExpectedDisplayFrameStart* const _this = this;
1615 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart)
1616 GOOGLE_DCHECK_NE(&from, _this);
1617 ::uint32_t cached_has_bits = 0;
1618 (void) cached_has_bits;
1619
1620 cached_has_bits = from._impl_._has_bits_[0];
1621 if (cached_has_bits & 0x00000007u) {
1622 if (cached_has_bits & 0x00000001u) {
1623 _this->_impl_.cookie_ = from._impl_.cookie_;
1624 }
1625 if (cached_has_bits & 0x00000002u) {
1626 _this->_impl_.token_ = from._impl_.token_;
1627 }
1628 if (cached_has_bits & 0x00000004u) {
1629 _this->_impl_.pid_ = from._impl_.pid_;
1630 }
1631 _this->_impl_._has_bits_[0] |= cached_has_bits;
1632 }
1633 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1634 }
1635
CopyFrom(const FrameTimelineEvent_ExpectedDisplayFrameStart & from)1636 void FrameTimelineEvent_ExpectedDisplayFrameStart::CopyFrom(const FrameTimelineEvent_ExpectedDisplayFrameStart& from) {
1637 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart)
1638 if (&from == this) return;
1639 Clear();
1640 MergeFrom(from);
1641 }
1642
IsInitialized() const1643 bool FrameTimelineEvent_ExpectedDisplayFrameStart::IsInitialized() const {
1644 return true;
1645 }
1646
InternalSwap(FrameTimelineEvent_ExpectedDisplayFrameStart * other)1647 void FrameTimelineEvent_ExpectedDisplayFrameStart::InternalSwap(FrameTimelineEvent_ExpectedDisplayFrameStart* other) {
1648 using std::swap;
1649 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1650 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1651 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1652 PROTOBUF_FIELD_OFFSET(FrameTimelineEvent_ExpectedDisplayFrameStart, _impl_.pid_)
1653 + sizeof(FrameTimelineEvent_ExpectedDisplayFrameStart::_impl_.pid_) // NOLINT
1654 - PROTOBUF_FIELD_OFFSET(FrameTimelineEvent_ExpectedDisplayFrameStart, _impl_.cookie_)>(
1655 reinterpret_cast<char*>(&_impl_.cookie_),
1656 reinterpret_cast<char*>(&other->_impl_.cookie_));
1657 }
1658
GetTypeName() const1659 std::string FrameTimelineEvent_ExpectedDisplayFrameStart::GetTypeName() const {
1660 return "perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart";
1661 }
1662
1663
1664 // ===================================================================
1665
1666 class FrameTimelineEvent_ActualDisplayFrameStart::_Internal {
1667 public:
1668 using HasBits = decltype(std::declval<FrameTimelineEvent_ActualDisplayFrameStart>()._impl_._has_bits_);
set_has_cookie(HasBits * has_bits)1669 static void set_has_cookie(HasBits* has_bits) {
1670 (*has_bits)[0] |= 1u;
1671 }
set_has_token(HasBits * has_bits)1672 static void set_has_token(HasBits* has_bits) {
1673 (*has_bits)[0] |= 2u;
1674 }
set_has_pid(HasBits * has_bits)1675 static void set_has_pid(HasBits* has_bits) {
1676 (*has_bits)[0] |= 4u;
1677 }
set_has_present_type(HasBits * has_bits)1678 static void set_has_present_type(HasBits* has_bits) {
1679 (*has_bits)[0] |= 8u;
1680 }
set_has_on_time_finish(HasBits * has_bits)1681 static void set_has_on_time_finish(HasBits* has_bits) {
1682 (*has_bits)[0] |= 16u;
1683 }
set_has_gpu_composition(HasBits * has_bits)1684 static void set_has_gpu_composition(HasBits* has_bits) {
1685 (*has_bits)[0] |= 32u;
1686 }
set_has_jank_type(HasBits * has_bits)1687 static void set_has_jank_type(HasBits* has_bits) {
1688 (*has_bits)[0] |= 64u;
1689 }
set_has_prediction_type(HasBits * has_bits)1690 static void set_has_prediction_type(HasBits* has_bits) {
1691 (*has_bits)[0] |= 128u;
1692 }
set_has_jank_severity_type(HasBits * has_bits)1693 static void set_has_jank_severity_type(HasBits* has_bits) {
1694 (*has_bits)[0] |= 256u;
1695 }
1696 };
1697
FrameTimelineEvent_ActualDisplayFrameStart(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1698 FrameTimelineEvent_ActualDisplayFrameStart::FrameTimelineEvent_ActualDisplayFrameStart(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1699 bool is_message_owned)
1700 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1701 SharedCtor(arena, is_message_owned);
1702 // @@protoc_insertion_point(arena_constructor:perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart)
1703 }
FrameTimelineEvent_ActualDisplayFrameStart(const FrameTimelineEvent_ActualDisplayFrameStart & from)1704 FrameTimelineEvent_ActualDisplayFrameStart::FrameTimelineEvent_ActualDisplayFrameStart(const FrameTimelineEvent_ActualDisplayFrameStart& from)
1705 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1706 FrameTimelineEvent_ActualDisplayFrameStart* const _this = this; (void)_this;
1707 new (&_impl_) Impl_{
1708 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1709 , /*decltype(_impl_._cached_size_)*/{}
1710 , decltype(_impl_.cookie_){}
1711 , decltype(_impl_.token_){}
1712 , decltype(_impl_.pid_){}
1713 , decltype(_impl_.present_type_){}
1714 , decltype(_impl_.on_time_finish_){}
1715 , decltype(_impl_.gpu_composition_){}
1716 , decltype(_impl_.jank_type_){}
1717 , decltype(_impl_.prediction_type_){}
1718 , decltype(_impl_.jank_severity_type_){}};
1719
1720 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1721 ::memcpy(&_impl_.cookie_, &from._impl_.cookie_,
1722 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.jank_severity_type_) -
1723 reinterpret_cast<char*>(&_impl_.cookie_)) + sizeof(_impl_.jank_severity_type_));
1724 // @@protoc_insertion_point(copy_constructor:perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart)
1725 }
1726
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1727 inline void FrameTimelineEvent_ActualDisplayFrameStart::SharedCtor(
1728 ::_pb::Arena* arena, bool is_message_owned) {
1729 (void)arena;
1730 (void)is_message_owned;
1731 new (&_impl_) Impl_{
1732 decltype(_impl_._has_bits_){}
1733 , /*decltype(_impl_._cached_size_)*/{}
1734 , decltype(_impl_.cookie_){::int64_t{0}}
1735 , decltype(_impl_.token_){::int64_t{0}}
1736 , decltype(_impl_.pid_){0}
1737 , decltype(_impl_.present_type_){0}
1738 , decltype(_impl_.on_time_finish_){false}
1739 , decltype(_impl_.gpu_composition_){false}
1740 , decltype(_impl_.jank_type_){0}
1741 , decltype(_impl_.prediction_type_){0}
1742 , decltype(_impl_.jank_severity_type_){0}
1743 };
1744 }
1745
~FrameTimelineEvent_ActualDisplayFrameStart()1746 FrameTimelineEvent_ActualDisplayFrameStart::~FrameTimelineEvent_ActualDisplayFrameStart() {
1747 // @@protoc_insertion_point(destructor:perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart)
1748 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1749 (void)arena;
1750 return;
1751 }
1752 SharedDtor();
1753 }
1754
SharedDtor()1755 inline void FrameTimelineEvent_ActualDisplayFrameStart::SharedDtor() {
1756 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1757 }
1758
SetCachedSize(int size) const1759 void FrameTimelineEvent_ActualDisplayFrameStart::SetCachedSize(int size) const {
1760 _impl_._cached_size_.Set(size);
1761 }
1762
Clear()1763 void FrameTimelineEvent_ActualDisplayFrameStart::Clear() {
1764 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart)
1765 ::uint32_t cached_has_bits = 0;
1766 // Prevent compiler warnings about cached_has_bits being unused
1767 (void) cached_has_bits;
1768
1769 cached_has_bits = _impl_._has_bits_[0];
1770 if (cached_has_bits & 0x000000ffu) {
1771 ::memset(&_impl_.cookie_, 0, static_cast<size_t>(
1772 reinterpret_cast<char*>(&_impl_.prediction_type_) -
1773 reinterpret_cast<char*>(&_impl_.cookie_)) + sizeof(_impl_.prediction_type_));
1774 }
1775 _impl_.jank_severity_type_ = 0;
1776 _impl_._has_bits_.Clear();
1777 _internal_metadata_.Clear<std::string>();
1778 }
1779
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1780 const char* FrameTimelineEvent_ActualDisplayFrameStart::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1781 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1782 _Internal::HasBits has_bits{};
1783 while (!ctx->Done(&ptr)) {
1784 ::uint32_t tag;
1785 ptr = ::_pbi::ReadTag(ptr, &tag);
1786 switch (tag >> 3) {
1787 // optional int64 cookie = 1;
1788 case 1:
1789 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1790 _Internal::set_has_cookie(&has_bits);
1791 _impl_.cookie_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1792 CHK_(ptr);
1793 } else {
1794 goto handle_unusual;
1795 }
1796 continue;
1797 // optional int64 token = 2;
1798 case 2:
1799 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1800 _Internal::set_has_token(&has_bits);
1801 _impl_.token_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1802 CHK_(ptr);
1803 } else {
1804 goto handle_unusual;
1805 }
1806 continue;
1807 // optional int32 pid = 3;
1808 case 3:
1809 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1810 _Internal::set_has_pid(&has_bits);
1811 _impl_.pid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1812 CHK_(ptr);
1813 } else {
1814 goto handle_unusual;
1815 }
1816 continue;
1817 // optional .perfetto.protos.FrameTimelineEvent.PresentType present_type = 4;
1818 case 4:
1819 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
1820 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1821 CHK_(ptr);
1822 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::FrameTimelineEvent_PresentType_IsValid(val))) {
1823 _internal_set_present_type(static_cast<::perfetto::protos::FrameTimelineEvent_PresentType>(val));
1824 } else {
1825 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields());
1826 }
1827 } else {
1828 goto handle_unusual;
1829 }
1830 continue;
1831 // optional bool on_time_finish = 5;
1832 case 5:
1833 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
1834 _Internal::set_has_on_time_finish(&has_bits);
1835 _impl_.on_time_finish_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1836 CHK_(ptr);
1837 } else {
1838 goto handle_unusual;
1839 }
1840 continue;
1841 // optional bool gpu_composition = 6;
1842 case 6:
1843 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
1844 _Internal::set_has_gpu_composition(&has_bits);
1845 _impl_.gpu_composition_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1846 CHK_(ptr);
1847 } else {
1848 goto handle_unusual;
1849 }
1850 continue;
1851 // optional int32 jank_type = 7;
1852 case 7:
1853 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
1854 _Internal::set_has_jank_type(&has_bits);
1855 _impl_.jank_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1856 CHK_(ptr);
1857 } else {
1858 goto handle_unusual;
1859 }
1860 continue;
1861 // optional .perfetto.protos.FrameTimelineEvent.PredictionType prediction_type = 8;
1862 case 8:
1863 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
1864 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1865 CHK_(ptr);
1866 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::FrameTimelineEvent_PredictionType_IsValid(val))) {
1867 _internal_set_prediction_type(static_cast<::perfetto::protos::FrameTimelineEvent_PredictionType>(val));
1868 } else {
1869 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(8, val, mutable_unknown_fields());
1870 }
1871 } else {
1872 goto handle_unusual;
1873 }
1874 continue;
1875 // optional .perfetto.protos.FrameTimelineEvent.JankSeverityType jank_severity_type = 9;
1876 case 9:
1877 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
1878 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1879 CHK_(ptr);
1880 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::FrameTimelineEvent_JankSeverityType_IsValid(val))) {
1881 _internal_set_jank_severity_type(static_cast<::perfetto::protos::FrameTimelineEvent_JankSeverityType>(val));
1882 } else {
1883 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(9, val, mutable_unknown_fields());
1884 }
1885 } else {
1886 goto handle_unusual;
1887 }
1888 continue;
1889 default:
1890 goto handle_unusual;
1891 } // switch
1892 handle_unusual:
1893 if ((tag == 0) || ((tag & 7) == 4)) {
1894 CHK_(ptr);
1895 ctx->SetLastTag(tag);
1896 goto message_done;
1897 }
1898 ptr = UnknownFieldParse(
1899 tag,
1900 _internal_metadata_.mutable_unknown_fields<std::string>(),
1901 ptr, ctx);
1902 CHK_(ptr != nullptr);
1903 } // while
1904 message_done:
1905 _impl_._has_bits_.Or(has_bits);
1906 return ptr;
1907 failure:
1908 ptr = nullptr;
1909 goto message_done;
1910 #undef CHK_
1911 }
1912
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1913 ::uint8_t* FrameTimelineEvent_ActualDisplayFrameStart::_InternalSerialize(
1914 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1915 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart)
1916 ::uint32_t cached_has_bits = 0;
1917 (void) cached_has_bits;
1918
1919 cached_has_bits = _impl_._has_bits_[0];
1920 // optional int64 cookie = 1;
1921 if (cached_has_bits & 0x00000001u) {
1922 target = stream->EnsureSpace(target);
1923 target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_cookie(), target);
1924 }
1925
1926 // optional int64 token = 2;
1927 if (cached_has_bits & 0x00000002u) {
1928 target = stream->EnsureSpace(target);
1929 target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_token(), target);
1930 }
1931
1932 // optional int32 pid = 3;
1933 if (cached_has_bits & 0x00000004u) {
1934 target = stream->EnsureSpace(target);
1935 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_pid(), target);
1936 }
1937
1938 // optional .perfetto.protos.FrameTimelineEvent.PresentType present_type = 4;
1939 if (cached_has_bits & 0x00000008u) {
1940 target = stream->EnsureSpace(target);
1941 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1942 4, this->_internal_present_type(), target);
1943 }
1944
1945 // optional bool on_time_finish = 5;
1946 if (cached_has_bits & 0x00000010u) {
1947 target = stream->EnsureSpace(target);
1948 target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_on_time_finish(), target);
1949 }
1950
1951 // optional bool gpu_composition = 6;
1952 if (cached_has_bits & 0x00000020u) {
1953 target = stream->EnsureSpace(target);
1954 target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_gpu_composition(), target);
1955 }
1956
1957 // optional int32 jank_type = 7;
1958 if (cached_has_bits & 0x00000040u) {
1959 target = stream->EnsureSpace(target);
1960 target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_jank_type(), target);
1961 }
1962
1963 // optional .perfetto.protos.FrameTimelineEvent.PredictionType prediction_type = 8;
1964 if (cached_has_bits & 0x00000080u) {
1965 target = stream->EnsureSpace(target);
1966 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1967 8, this->_internal_prediction_type(), target);
1968 }
1969
1970 // optional .perfetto.protos.FrameTimelineEvent.JankSeverityType jank_severity_type = 9;
1971 if (cached_has_bits & 0x00000100u) {
1972 target = stream->EnsureSpace(target);
1973 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1974 9, this->_internal_jank_severity_type(), target);
1975 }
1976
1977 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1978 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1979 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1980 }
1981 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart)
1982 return target;
1983 }
1984
ByteSizeLong() const1985 size_t FrameTimelineEvent_ActualDisplayFrameStart::ByteSizeLong() const {
1986 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart)
1987 size_t total_size = 0;
1988
1989 ::uint32_t cached_has_bits = 0;
1990 // Prevent compiler warnings about cached_has_bits being unused
1991 (void) cached_has_bits;
1992
1993 cached_has_bits = _impl_._has_bits_[0];
1994 if (cached_has_bits & 0x000000ffu) {
1995 // optional int64 cookie = 1;
1996 if (cached_has_bits & 0x00000001u) {
1997 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_cookie());
1998 }
1999
2000 // optional int64 token = 2;
2001 if (cached_has_bits & 0x00000002u) {
2002 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_token());
2003 }
2004
2005 // optional int32 pid = 3;
2006 if (cached_has_bits & 0x00000004u) {
2007 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_pid());
2008 }
2009
2010 // optional .perfetto.protos.FrameTimelineEvent.PresentType present_type = 4;
2011 if (cached_has_bits & 0x00000008u) {
2012 total_size += 1 +
2013 ::_pbi::WireFormatLite::EnumSize(this->_internal_present_type());
2014 }
2015
2016 // optional bool on_time_finish = 5;
2017 if (cached_has_bits & 0x00000010u) {
2018 total_size += 1 + 1;
2019 }
2020
2021 // optional bool gpu_composition = 6;
2022 if (cached_has_bits & 0x00000020u) {
2023 total_size += 1 + 1;
2024 }
2025
2026 // optional int32 jank_type = 7;
2027 if (cached_has_bits & 0x00000040u) {
2028 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_jank_type());
2029 }
2030
2031 // optional .perfetto.protos.FrameTimelineEvent.PredictionType prediction_type = 8;
2032 if (cached_has_bits & 0x00000080u) {
2033 total_size += 1 +
2034 ::_pbi::WireFormatLite::EnumSize(this->_internal_prediction_type());
2035 }
2036
2037 }
2038 // optional .perfetto.protos.FrameTimelineEvent.JankSeverityType jank_severity_type = 9;
2039 if (cached_has_bits & 0x00000100u) {
2040 total_size += 1 +
2041 ::_pbi::WireFormatLite::EnumSize(this->_internal_jank_severity_type());
2042 }
2043
2044 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2045 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2046 }
2047 int cached_size = ::_pbi::ToCachedSize(total_size);
2048 SetCachedSize(cached_size);
2049 return total_size;
2050 }
2051
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2052 void FrameTimelineEvent_ActualDisplayFrameStart::CheckTypeAndMergeFrom(
2053 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2054 MergeFrom(*::_pbi::DownCast<const FrameTimelineEvent_ActualDisplayFrameStart*>(
2055 &from));
2056 }
2057
MergeFrom(const FrameTimelineEvent_ActualDisplayFrameStart & from)2058 void FrameTimelineEvent_ActualDisplayFrameStart::MergeFrom(const FrameTimelineEvent_ActualDisplayFrameStart& from) {
2059 FrameTimelineEvent_ActualDisplayFrameStart* const _this = this;
2060 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart)
2061 GOOGLE_DCHECK_NE(&from, _this);
2062 ::uint32_t cached_has_bits = 0;
2063 (void) cached_has_bits;
2064
2065 cached_has_bits = from._impl_._has_bits_[0];
2066 if (cached_has_bits & 0x000000ffu) {
2067 if (cached_has_bits & 0x00000001u) {
2068 _this->_impl_.cookie_ = from._impl_.cookie_;
2069 }
2070 if (cached_has_bits & 0x00000002u) {
2071 _this->_impl_.token_ = from._impl_.token_;
2072 }
2073 if (cached_has_bits & 0x00000004u) {
2074 _this->_impl_.pid_ = from._impl_.pid_;
2075 }
2076 if (cached_has_bits & 0x00000008u) {
2077 _this->_impl_.present_type_ = from._impl_.present_type_;
2078 }
2079 if (cached_has_bits & 0x00000010u) {
2080 _this->_impl_.on_time_finish_ = from._impl_.on_time_finish_;
2081 }
2082 if (cached_has_bits & 0x00000020u) {
2083 _this->_impl_.gpu_composition_ = from._impl_.gpu_composition_;
2084 }
2085 if (cached_has_bits & 0x00000040u) {
2086 _this->_impl_.jank_type_ = from._impl_.jank_type_;
2087 }
2088 if (cached_has_bits & 0x00000080u) {
2089 _this->_impl_.prediction_type_ = from._impl_.prediction_type_;
2090 }
2091 _this->_impl_._has_bits_[0] |= cached_has_bits;
2092 }
2093 if (cached_has_bits & 0x00000100u) {
2094 _this->_internal_set_jank_severity_type(from._internal_jank_severity_type());
2095 }
2096 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2097 }
2098
CopyFrom(const FrameTimelineEvent_ActualDisplayFrameStart & from)2099 void FrameTimelineEvent_ActualDisplayFrameStart::CopyFrom(const FrameTimelineEvent_ActualDisplayFrameStart& from) {
2100 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart)
2101 if (&from == this) return;
2102 Clear();
2103 MergeFrom(from);
2104 }
2105
IsInitialized() const2106 bool FrameTimelineEvent_ActualDisplayFrameStart::IsInitialized() const {
2107 return true;
2108 }
2109
InternalSwap(FrameTimelineEvent_ActualDisplayFrameStart * other)2110 void FrameTimelineEvent_ActualDisplayFrameStart::InternalSwap(FrameTimelineEvent_ActualDisplayFrameStart* other) {
2111 using std::swap;
2112 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2113 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2114 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2115 PROTOBUF_FIELD_OFFSET(FrameTimelineEvent_ActualDisplayFrameStart, _impl_.jank_severity_type_)
2116 + sizeof(FrameTimelineEvent_ActualDisplayFrameStart::_impl_.jank_severity_type_) // NOLINT
2117 - PROTOBUF_FIELD_OFFSET(FrameTimelineEvent_ActualDisplayFrameStart, _impl_.cookie_)>(
2118 reinterpret_cast<char*>(&_impl_.cookie_),
2119 reinterpret_cast<char*>(&other->_impl_.cookie_));
2120 }
2121
GetTypeName() const2122 std::string FrameTimelineEvent_ActualDisplayFrameStart::GetTypeName() const {
2123 return "perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart";
2124 }
2125
2126
2127 // ===================================================================
2128
2129 class FrameTimelineEvent_FrameEnd::_Internal {
2130 public:
2131 using HasBits = decltype(std::declval<FrameTimelineEvent_FrameEnd>()._impl_._has_bits_);
set_has_cookie(HasBits * has_bits)2132 static void set_has_cookie(HasBits* has_bits) {
2133 (*has_bits)[0] |= 1u;
2134 }
2135 };
2136
FrameTimelineEvent_FrameEnd(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2137 FrameTimelineEvent_FrameEnd::FrameTimelineEvent_FrameEnd(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2138 bool is_message_owned)
2139 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2140 SharedCtor(arena, is_message_owned);
2141 // @@protoc_insertion_point(arena_constructor:perfetto.protos.FrameTimelineEvent.FrameEnd)
2142 }
FrameTimelineEvent_FrameEnd(const FrameTimelineEvent_FrameEnd & from)2143 FrameTimelineEvent_FrameEnd::FrameTimelineEvent_FrameEnd(const FrameTimelineEvent_FrameEnd& from)
2144 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2145 FrameTimelineEvent_FrameEnd* const _this = this; (void)_this;
2146 new (&_impl_) Impl_{
2147 decltype(_impl_._has_bits_){from._impl_._has_bits_}
2148 , /*decltype(_impl_._cached_size_)*/{}
2149 , decltype(_impl_.cookie_){}};
2150
2151 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2152 _this->_impl_.cookie_ = from._impl_.cookie_;
2153 // @@protoc_insertion_point(copy_constructor:perfetto.protos.FrameTimelineEvent.FrameEnd)
2154 }
2155
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2156 inline void FrameTimelineEvent_FrameEnd::SharedCtor(
2157 ::_pb::Arena* arena, bool is_message_owned) {
2158 (void)arena;
2159 (void)is_message_owned;
2160 new (&_impl_) Impl_{
2161 decltype(_impl_._has_bits_){}
2162 , /*decltype(_impl_._cached_size_)*/{}
2163 , decltype(_impl_.cookie_){::int64_t{0}}
2164 };
2165 }
2166
~FrameTimelineEvent_FrameEnd()2167 FrameTimelineEvent_FrameEnd::~FrameTimelineEvent_FrameEnd() {
2168 // @@protoc_insertion_point(destructor:perfetto.protos.FrameTimelineEvent.FrameEnd)
2169 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2170 (void)arena;
2171 return;
2172 }
2173 SharedDtor();
2174 }
2175
SharedDtor()2176 inline void FrameTimelineEvent_FrameEnd::SharedDtor() {
2177 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2178 }
2179
SetCachedSize(int size) const2180 void FrameTimelineEvent_FrameEnd::SetCachedSize(int size) const {
2181 _impl_._cached_size_.Set(size);
2182 }
2183
Clear()2184 void FrameTimelineEvent_FrameEnd::Clear() {
2185 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FrameTimelineEvent.FrameEnd)
2186 ::uint32_t cached_has_bits = 0;
2187 // Prevent compiler warnings about cached_has_bits being unused
2188 (void) cached_has_bits;
2189
2190 _impl_.cookie_ = ::int64_t{0};
2191 _impl_._has_bits_.Clear();
2192 _internal_metadata_.Clear<std::string>();
2193 }
2194
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2195 const char* FrameTimelineEvent_FrameEnd::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2196 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2197 _Internal::HasBits has_bits{};
2198 while (!ctx->Done(&ptr)) {
2199 ::uint32_t tag;
2200 ptr = ::_pbi::ReadTag(ptr, &tag);
2201 switch (tag >> 3) {
2202 // optional int64 cookie = 1;
2203 case 1:
2204 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
2205 _Internal::set_has_cookie(&has_bits);
2206 _impl_.cookie_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2207 CHK_(ptr);
2208 } else {
2209 goto handle_unusual;
2210 }
2211 continue;
2212 default:
2213 goto handle_unusual;
2214 } // switch
2215 handle_unusual:
2216 if ((tag == 0) || ((tag & 7) == 4)) {
2217 CHK_(ptr);
2218 ctx->SetLastTag(tag);
2219 goto message_done;
2220 }
2221 ptr = UnknownFieldParse(
2222 tag,
2223 _internal_metadata_.mutable_unknown_fields<std::string>(),
2224 ptr, ctx);
2225 CHK_(ptr != nullptr);
2226 } // while
2227 message_done:
2228 _impl_._has_bits_.Or(has_bits);
2229 return ptr;
2230 failure:
2231 ptr = nullptr;
2232 goto message_done;
2233 #undef CHK_
2234 }
2235
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2236 ::uint8_t* FrameTimelineEvent_FrameEnd::_InternalSerialize(
2237 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2238 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FrameTimelineEvent.FrameEnd)
2239 ::uint32_t cached_has_bits = 0;
2240 (void) cached_has_bits;
2241
2242 cached_has_bits = _impl_._has_bits_[0];
2243 // optional int64 cookie = 1;
2244 if (cached_has_bits & 0x00000001u) {
2245 target = stream->EnsureSpace(target);
2246 target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_cookie(), target);
2247 }
2248
2249 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2250 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2251 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2252 }
2253 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FrameTimelineEvent.FrameEnd)
2254 return target;
2255 }
2256
ByteSizeLong() const2257 size_t FrameTimelineEvent_FrameEnd::ByteSizeLong() const {
2258 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FrameTimelineEvent.FrameEnd)
2259 size_t total_size = 0;
2260
2261 ::uint32_t cached_has_bits = 0;
2262 // Prevent compiler warnings about cached_has_bits being unused
2263 (void) cached_has_bits;
2264
2265 // optional int64 cookie = 1;
2266 cached_has_bits = _impl_._has_bits_[0];
2267 if (cached_has_bits & 0x00000001u) {
2268 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_cookie());
2269 }
2270
2271 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2272 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2273 }
2274 int cached_size = ::_pbi::ToCachedSize(total_size);
2275 SetCachedSize(cached_size);
2276 return total_size;
2277 }
2278
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2279 void FrameTimelineEvent_FrameEnd::CheckTypeAndMergeFrom(
2280 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2281 MergeFrom(*::_pbi::DownCast<const FrameTimelineEvent_FrameEnd*>(
2282 &from));
2283 }
2284
MergeFrom(const FrameTimelineEvent_FrameEnd & from)2285 void FrameTimelineEvent_FrameEnd::MergeFrom(const FrameTimelineEvent_FrameEnd& from) {
2286 FrameTimelineEvent_FrameEnd* const _this = this;
2287 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FrameTimelineEvent.FrameEnd)
2288 GOOGLE_DCHECK_NE(&from, _this);
2289 ::uint32_t cached_has_bits = 0;
2290 (void) cached_has_bits;
2291
2292 if (from._internal_has_cookie()) {
2293 _this->_internal_set_cookie(from._internal_cookie());
2294 }
2295 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2296 }
2297
CopyFrom(const FrameTimelineEvent_FrameEnd & from)2298 void FrameTimelineEvent_FrameEnd::CopyFrom(const FrameTimelineEvent_FrameEnd& from) {
2299 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FrameTimelineEvent.FrameEnd)
2300 if (&from == this) return;
2301 Clear();
2302 MergeFrom(from);
2303 }
2304
IsInitialized() const2305 bool FrameTimelineEvent_FrameEnd::IsInitialized() const {
2306 return true;
2307 }
2308
InternalSwap(FrameTimelineEvent_FrameEnd * other)2309 void FrameTimelineEvent_FrameEnd::InternalSwap(FrameTimelineEvent_FrameEnd* other) {
2310 using std::swap;
2311 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2312 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2313 swap(_impl_.cookie_, other->_impl_.cookie_);
2314 }
2315
GetTypeName() const2316 std::string FrameTimelineEvent_FrameEnd::GetTypeName() const {
2317 return "perfetto.protos.FrameTimelineEvent.FrameEnd";
2318 }
2319
2320
2321 // ===================================================================
2322
2323 class FrameTimelineEvent::_Internal {
2324 public:
2325 static const ::perfetto::protos::FrameTimelineEvent_ExpectedDisplayFrameStart& expected_display_frame_start(const FrameTimelineEvent* msg);
2326 static const ::perfetto::protos::FrameTimelineEvent_ActualDisplayFrameStart& actual_display_frame_start(const FrameTimelineEvent* msg);
2327 static const ::perfetto::protos::FrameTimelineEvent_ExpectedSurfaceFrameStart& expected_surface_frame_start(const FrameTimelineEvent* msg);
2328 static const ::perfetto::protos::FrameTimelineEvent_ActualSurfaceFrameStart& actual_surface_frame_start(const FrameTimelineEvent* msg);
2329 static const ::perfetto::protos::FrameTimelineEvent_FrameEnd& frame_end(const FrameTimelineEvent* msg);
2330 };
2331
2332 const ::perfetto::protos::FrameTimelineEvent_ExpectedDisplayFrameStart&
expected_display_frame_start(const FrameTimelineEvent * msg)2333 FrameTimelineEvent::_Internal::expected_display_frame_start(const FrameTimelineEvent* msg) {
2334 return *msg->_impl_.event_.expected_display_frame_start_;
2335 }
2336 const ::perfetto::protos::FrameTimelineEvent_ActualDisplayFrameStart&
actual_display_frame_start(const FrameTimelineEvent * msg)2337 FrameTimelineEvent::_Internal::actual_display_frame_start(const FrameTimelineEvent* msg) {
2338 return *msg->_impl_.event_.actual_display_frame_start_;
2339 }
2340 const ::perfetto::protos::FrameTimelineEvent_ExpectedSurfaceFrameStart&
expected_surface_frame_start(const FrameTimelineEvent * msg)2341 FrameTimelineEvent::_Internal::expected_surface_frame_start(const FrameTimelineEvent* msg) {
2342 return *msg->_impl_.event_.expected_surface_frame_start_;
2343 }
2344 const ::perfetto::protos::FrameTimelineEvent_ActualSurfaceFrameStart&
actual_surface_frame_start(const FrameTimelineEvent * msg)2345 FrameTimelineEvent::_Internal::actual_surface_frame_start(const FrameTimelineEvent* msg) {
2346 return *msg->_impl_.event_.actual_surface_frame_start_;
2347 }
2348 const ::perfetto::protos::FrameTimelineEvent_FrameEnd&
frame_end(const FrameTimelineEvent * msg)2349 FrameTimelineEvent::_Internal::frame_end(const FrameTimelineEvent* msg) {
2350 return *msg->_impl_.event_.frame_end_;
2351 }
set_allocated_expected_display_frame_start(::perfetto::protos::FrameTimelineEvent_ExpectedDisplayFrameStart * expected_display_frame_start)2352 void FrameTimelineEvent::set_allocated_expected_display_frame_start(::perfetto::protos::FrameTimelineEvent_ExpectedDisplayFrameStart* expected_display_frame_start) {
2353 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
2354 clear_event();
2355 if (expected_display_frame_start) {
2356 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
2357 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(expected_display_frame_start);
2358 if (message_arena != submessage_arena) {
2359 expected_display_frame_start = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
2360 message_arena, expected_display_frame_start, submessage_arena);
2361 }
2362 set_has_expected_display_frame_start();
2363 _impl_.event_.expected_display_frame_start_ = expected_display_frame_start;
2364 }
2365 // @@protoc_insertion_point(field_set_allocated:perfetto.protos.FrameTimelineEvent.expected_display_frame_start)
2366 }
set_allocated_actual_display_frame_start(::perfetto::protos::FrameTimelineEvent_ActualDisplayFrameStart * actual_display_frame_start)2367 void FrameTimelineEvent::set_allocated_actual_display_frame_start(::perfetto::protos::FrameTimelineEvent_ActualDisplayFrameStart* actual_display_frame_start) {
2368 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
2369 clear_event();
2370 if (actual_display_frame_start) {
2371 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
2372 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(actual_display_frame_start);
2373 if (message_arena != submessage_arena) {
2374 actual_display_frame_start = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
2375 message_arena, actual_display_frame_start, submessage_arena);
2376 }
2377 set_has_actual_display_frame_start();
2378 _impl_.event_.actual_display_frame_start_ = actual_display_frame_start;
2379 }
2380 // @@protoc_insertion_point(field_set_allocated:perfetto.protos.FrameTimelineEvent.actual_display_frame_start)
2381 }
set_allocated_expected_surface_frame_start(::perfetto::protos::FrameTimelineEvent_ExpectedSurfaceFrameStart * expected_surface_frame_start)2382 void FrameTimelineEvent::set_allocated_expected_surface_frame_start(::perfetto::protos::FrameTimelineEvent_ExpectedSurfaceFrameStart* expected_surface_frame_start) {
2383 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
2384 clear_event();
2385 if (expected_surface_frame_start) {
2386 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
2387 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(expected_surface_frame_start);
2388 if (message_arena != submessage_arena) {
2389 expected_surface_frame_start = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
2390 message_arena, expected_surface_frame_start, submessage_arena);
2391 }
2392 set_has_expected_surface_frame_start();
2393 _impl_.event_.expected_surface_frame_start_ = expected_surface_frame_start;
2394 }
2395 // @@protoc_insertion_point(field_set_allocated:perfetto.protos.FrameTimelineEvent.expected_surface_frame_start)
2396 }
set_allocated_actual_surface_frame_start(::perfetto::protos::FrameTimelineEvent_ActualSurfaceFrameStart * actual_surface_frame_start)2397 void FrameTimelineEvent::set_allocated_actual_surface_frame_start(::perfetto::protos::FrameTimelineEvent_ActualSurfaceFrameStart* actual_surface_frame_start) {
2398 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
2399 clear_event();
2400 if (actual_surface_frame_start) {
2401 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
2402 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(actual_surface_frame_start);
2403 if (message_arena != submessage_arena) {
2404 actual_surface_frame_start = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
2405 message_arena, actual_surface_frame_start, submessage_arena);
2406 }
2407 set_has_actual_surface_frame_start();
2408 _impl_.event_.actual_surface_frame_start_ = actual_surface_frame_start;
2409 }
2410 // @@protoc_insertion_point(field_set_allocated:perfetto.protos.FrameTimelineEvent.actual_surface_frame_start)
2411 }
set_allocated_frame_end(::perfetto::protos::FrameTimelineEvent_FrameEnd * frame_end)2412 void FrameTimelineEvent::set_allocated_frame_end(::perfetto::protos::FrameTimelineEvent_FrameEnd* frame_end) {
2413 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
2414 clear_event();
2415 if (frame_end) {
2416 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
2417 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(frame_end);
2418 if (message_arena != submessage_arena) {
2419 frame_end = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
2420 message_arena, frame_end, submessage_arena);
2421 }
2422 set_has_frame_end();
2423 _impl_.event_.frame_end_ = frame_end;
2424 }
2425 // @@protoc_insertion_point(field_set_allocated:perfetto.protos.FrameTimelineEvent.frame_end)
2426 }
FrameTimelineEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2427 FrameTimelineEvent::FrameTimelineEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2428 bool is_message_owned)
2429 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2430 SharedCtor(arena, is_message_owned);
2431 // @@protoc_insertion_point(arena_constructor:perfetto.protos.FrameTimelineEvent)
2432 }
FrameTimelineEvent(const FrameTimelineEvent & from)2433 FrameTimelineEvent::FrameTimelineEvent(const FrameTimelineEvent& from)
2434 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2435 FrameTimelineEvent* const _this = this; (void)_this;
2436 new (&_impl_) Impl_{
2437 decltype(_impl_.event_){}
2438 , /*decltype(_impl_._cached_size_)*/{}
2439 , /*decltype(_impl_._oneof_case_)*/{}};
2440
2441 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2442 clear_has_event();
2443 switch (from.event_case()) {
2444 case kExpectedDisplayFrameStart: {
2445 _this->_internal_mutable_expected_display_frame_start()->::perfetto::protos::FrameTimelineEvent_ExpectedDisplayFrameStart::MergeFrom(
2446 from._internal_expected_display_frame_start());
2447 break;
2448 }
2449 case kActualDisplayFrameStart: {
2450 _this->_internal_mutable_actual_display_frame_start()->::perfetto::protos::FrameTimelineEvent_ActualDisplayFrameStart::MergeFrom(
2451 from._internal_actual_display_frame_start());
2452 break;
2453 }
2454 case kExpectedSurfaceFrameStart: {
2455 _this->_internal_mutable_expected_surface_frame_start()->::perfetto::protos::FrameTimelineEvent_ExpectedSurfaceFrameStart::MergeFrom(
2456 from._internal_expected_surface_frame_start());
2457 break;
2458 }
2459 case kActualSurfaceFrameStart: {
2460 _this->_internal_mutable_actual_surface_frame_start()->::perfetto::protos::FrameTimelineEvent_ActualSurfaceFrameStart::MergeFrom(
2461 from._internal_actual_surface_frame_start());
2462 break;
2463 }
2464 case kFrameEnd: {
2465 _this->_internal_mutable_frame_end()->::perfetto::protos::FrameTimelineEvent_FrameEnd::MergeFrom(
2466 from._internal_frame_end());
2467 break;
2468 }
2469 case EVENT_NOT_SET: {
2470 break;
2471 }
2472 }
2473 // @@protoc_insertion_point(copy_constructor:perfetto.protos.FrameTimelineEvent)
2474 }
2475
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2476 inline void FrameTimelineEvent::SharedCtor(
2477 ::_pb::Arena* arena, bool is_message_owned) {
2478 (void)arena;
2479 (void)is_message_owned;
2480 new (&_impl_) Impl_{
2481 decltype(_impl_.event_){}
2482 , /*decltype(_impl_._cached_size_)*/{}
2483 , /*decltype(_impl_._oneof_case_)*/{}
2484 };
2485 clear_has_event();
2486 }
2487
~FrameTimelineEvent()2488 FrameTimelineEvent::~FrameTimelineEvent() {
2489 // @@protoc_insertion_point(destructor:perfetto.protos.FrameTimelineEvent)
2490 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2491 (void)arena;
2492 return;
2493 }
2494 SharedDtor();
2495 }
2496
SharedDtor()2497 inline void FrameTimelineEvent::SharedDtor() {
2498 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2499 if (has_event()) {
2500 clear_event();
2501 }
2502 }
2503
SetCachedSize(int size) const2504 void FrameTimelineEvent::SetCachedSize(int size) const {
2505 _impl_._cached_size_.Set(size);
2506 }
2507
clear_event()2508 void FrameTimelineEvent::clear_event() {
2509 // @@protoc_insertion_point(one_of_clear_start:perfetto.protos.FrameTimelineEvent)
2510 switch (event_case()) {
2511 case kExpectedDisplayFrameStart: {
2512 if (GetArenaForAllocation() == nullptr) {
2513 delete _impl_.event_.expected_display_frame_start_;
2514 }
2515 break;
2516 }
2517 case kActualDisplayFrameStart: {
2518 if (GetArenaForAllocation() == nullptr) {
2519 delete _impl_.event_.actual_display_frame_start_;
2520 }
2521 break;
2522 }
2523 case kExpectedSurfaceFrameStart: {
2524 if (GetArenaForAllocation() == nullptr) {
2525 delete _impl_.event_.expected_surface_frame_start_;
2526 }
2527 break;
2528 }
2529 case kActualSurfaceFrameStart: {
2530 if (GetArenaForAllocation() == nullptr) {
2531 delete _impl_.event_.actual_surface_frame_start_;
2532 }
2533 break;
2534 }
2535 case kFrameEnd: {
2536 if (GetArenaForAllocation() == nullptr) {
2537 delete _impl_.event_.frame_end_;
2538 }
2539 break;
2540 }
2541 case EVENT_NOT_SET: {
2542 break;
2543 }
2544 }
2545 _impl_._oneof_case_[0] = EVENT_NOT_SET;
2546 }
2547
2548
Clear()2549 void FrameTimelineEvent::Clear() {
2550 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FrameTimelineEvent)
2551 ::uint32_t cached_has_bits = 0;
2552 // Prevent compiler warnings about cached_has_bits being unused
2553 (void) cached_has_bits;
2554
2555 clear_event();
2556 _internal_metadata_.Clear<std::string>();
2557 }
2558
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2559 const char* FrameTimelineEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2560 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2561 while (!ctx->Done(&ptr)) {
2562 ::uint32_t tag;
2563 ptr = ::_pbi::ReadTag(ptr, &tag);
2564 switch (tag >> 3) {
2565 // .perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart expected_display_frame_start = 1;
2566 case 1:
2567 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2568 ptr = ctx->ParseMessage(_internal_mutable_expected_display_frame_start(), ptr);
2569 CHK_(ptr);
2570 } else {
2571 goto handle_unusual;
2572 }
2573 continue;
2574 // .perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart actual_display_frame_start = 2;
2575 case 2:
2576 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2577 ptr = ctx->ParseMessage(_internal_mutable_actual_display_frame_start(), ptr);
2578 CHK_(ptr);
2579 } else {
2580 goto handle_unusual;
2581 }
2582 continue;
2583 // .perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart expected_surface_frame_start = 3;
2584 case 3:
2585 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
2586 ptr = ctx->ParseMessage(_internal_mutable_expected_surface_frame_start(), ptr);
2587 CHK_(ptr);
2588 } else {
2589 goto handle_unusual;
2590 }
2591 continue;
2592 // .perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart actual_surface_frame_start = 4;
2593 case 4:
2594 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
2595 ptr = ctx->ParseMessage(_internal_mutable_actual_surface_frame_start(), ptr);
2596 CHK_(ptr);
2597 } else {
2598 goto handle_unusual;
2599 }
2600 continue;
2601 // .perfetto.protos.FrameTimelineEvent.FrameEnd frame_end = 5;
2602 case 5:
2603 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
2604 ptr = ctx->ParseMessage(_internal_mutable_frame_end(), ptr);
2605 CHK_(ptr);
2606 } else {
2607 goto handle_unusual;
2608 }
2609 continue;
2610 default:
2611 goto handle_unusual;
2612 } // switch
2613 handle_unusual:
2614 if ((tag == 0) || ((tag & 7) == 4)) {
2615 CHK_(ptr);
2616 ctx->SetLastTag(tag);
2617 goto message_done;
2618 }
2619 ptr = UnknownFieldParse(
2620 tag,
2621 _internal_metadata_.mutable_unknown_fields<std::string>(),
2622 ptr, ctx);
2623 CHK_(ptr != nullptr);
2624 } // while
2625 message_done:
2626 return ptr;
2627 failure:
2628 ptr = nullptr;
2629 goto message_done;
2630 #undef CHK_
2631 }
2632
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2633 ::uint8_t* FrameTimelineEvent::_InternalSerialize(
2634 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2635 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FrameTimelineEvent)
2636 ::uint32_t cached_has_bits = 0;
2637 (void) cached_has_bits;
2638
2639 switch (event_case()) {
2640 case kExpectedDisplayFrameStart: {
2641 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2642 InternalWriteMessage(1, _Internal::expected_display_frame_start(this),
2643 _Internal::expected_display_frame_start(this).GetCachedSize(), target, stream);
2644 break;
2645 }
2646 case kActualDisplayFrameStart: {
2647 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2648 InternalWriteMessage(2, _Internal::actual_display_frame_start(this),
2649 _Internal::actual_display_frame_start(this).GetCachedSize(), target, stream);
2650 break;
2651 }
2652 case kExpectedSurfaceFrameStart: {
2653 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2654 InternalWriteMessage(3, _Internal::expected_surface_frame_start(this),
2655 _Internal::expected_surface_frame_start(this).GetCachedSize(), target, stream);
2656 break;
2657 }
2658 case kActualSurfaceFrameStart: {
2659 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2660 InternalWriteMessage(4, _Internal::actual_surface_frame_start(this),
2661 _Internal::actual_surface_frame_start(this).GetCachedSize(), target, stream);
2662 break;
2663 }
2664 case kFrameEnd: {
2665 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2666 InternalWriteMessage(5, _Internal::frame_end(this),
2667 _Internal::frame_end(this).GetCachedSize(), target, stream);
2668 break;
2669 }
2670 default: ;
2671 }
2672 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2673 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2674 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2675 }
2676 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FrameTimelineEvent)
2677 return target;
2678 }
2679
ByteSizeLong() const2680 size_t FrameTimelineEvent::ByteSizeLong() const {
2681 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FrameTimelineEvent)
2682 size_t total_size = 0;
2683
2684 switch (event_case()) {
2685 // .perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart expected_display_frame_start = 1;
2686 case kExpectedDisplayFrameStart: {
2687 total_size += 1 +
2688 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2689 *_impl_.event_.expected_display_frame_start_);
2690 break;
2691 }
2692 // .perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart actual_display_frame_start = 2;
2693 case kActualDisplayFrameStart: {
2694 total_size += 1 +
2695 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2696 *_impl_.event_.actual_display_frame_start_);
2697 break;
2698 }
2699 // .perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart expected_surface_frame_start = 3;
2700 case kExpectedSurfaceFrameStart: {
2701 total_size += 1 +
2702 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2703 *_impl_.event_.expected_surface_frame_start_);
2704 break;
2705 }
2706 // .perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart actual_surface_frame_start = 4;
2707 case kActualSurfaceFrameStart: {
2708 total_size += 1 +
2709 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2710 *_impl_.event_.actual_surface_frame_start_);
2711 break;
2712 }
2713 // .perfetto.protos.FrameTimelineEvent.FrameEnd frame_end = 5;
2714 case kFrameEnd: {
2715 total_size += 1 +
2716 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2717 *_impl_.event_.frame_end_);
2718 break;
2719 }
2720 case EVENT_NOT_SET: {
2721 break;
2722 }
2723 }
2724 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2725 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2726 }
2727 int cached_size = ::_pbi::ToCachedSize(total_size);
2728 SetCachedSize(cached_size);
2729 return total_size;
2730 }
2731
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2732 void FrameTimelineEvent::CheckTypeAndMergeFrom(
2733 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2734 MergeFrom(*::_pbi::DownCast<const FrameTimelineEvent*>(
2735 &from));
2736 }
2737
MergeFrom(const FrameTimelineEvent & from)2738 void FrameTimelineEvent::MergeFrom(const FrameTimelineEvent& from) {
2739 FrameTimelineEvent* const _this = this;
2740 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FrameTimelineEvent)
2741 GOOGLE_DCHECK_NE(&from, _this);
2742 ::uint32_t cached_has_bits = 0;
2743 (void) cached_has_bits;
2744
2745 switch (from.event_case()) {
2746 case kExpectedDisplayFrameStart: {
2747 _this->_internal_mutable_expected_display_frame_start()->::perfetto::protos::FrameTimelineEvent_ExpectedDisplayFrameStart::MergeFrom(
2748 from._internal_expected_display_frame_start());
2749 break;
2750 }
2751 case kActualDisplayFrameStart: {
2752 _this->_internal_mutable_actual_display_frame_start()->::perfetto::protos::FrameTimelineEvent_ActualDisplayFrameStart::MergeFrom(
2753 from._internal_actual_display_frame_start());
2754 break;
2755 }
2756 case kExpectedSurfaceFrameStart: {
2757 _this->_internal_mutable_expected_surface_frame_start()->::perfetto::protos::FrameTimelineEvent_ExpectedSurfaceFrameStart::MergeFrom(
2758 from._internal_expected_surface_frame_start());
2759 break;
2760 }
2761 case kActualSurfaceFrameStart: {
2762 _this->_internal_mutable_actual_surface_frame_start()->::perfetto::protos::FrameTimelineEvent_ActualSurfaceFrameStart::MergeFrom(
2763 from._internal_actual_surface_frame_start());
2764 break;
2765 }
2766 case kFrameEnd: {
2767 _this->_internal_mutable_frame_end()->::perfetto::protos::FrameTimelineEvent_FrameEnd::MergeFrom(
2768 from._internal_frame_end());
2769 break;
2770 }
2771 case EVENT_NOT_SET: {
2772 break;
2773 }
2774 }
2775 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2776 }
2777
CopyFrom(const FrameTimelineEvent & from)2778 void FrameTimelineEvent::CopyFrom(const FrameTimelineEvent& from) {
2779 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FrameTimelineEvent)
2780 if (&from == this) return;
2781 Clear();
2782 MergeFrom(from);
2783 }
2784
IsInitialized() const2785 bool FrameTimelineEvent::IsInitialized() const {
2786 return true;
2787 }
2788
InternalSwap(FrameTimelineEvent * other)2789 void FrameTimelineEvent::InternalSwap(FrameTimelineEvent* other) {
2790 using std::swap;
2791 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2792 swap(_impl_.event_, other->_impl_.event_);
2793 swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
2794 }
2795
GetTypeName() const2796 std::string FrameTimelineEvent::GetTypeName() const {
2797 return "perfetto.protos.FrameTimelineEvent";
2798 }
2799
2800
2801 // @@protoc_insertion_point(namespace_scope)
2802 } // namespace protos
2803 } // namespace perfetto
2804 PROTOBUF_NAMESPACE_OPEN
2805 template<> PROTOBUF_NOINLINE ::perfetto::protos::FrameTimelineEvent_ExpectedSurfaceFrameStart*
CreateMaybeMessage(Arena * arena)2806 Arena::CreateMaybeMessage< ::perfetto::protos::FrameTimelineEvent_ExpectedSurfaceFrameStart >(Arena* arena) {
2807 return Arena::CreateMessageInternal< ::perfetto::protos::FrameTimelineEvent_ExpectedSurfaceFrameStart >(arena);
2808 }
2809 template<> PROTOBUF_NOINLINE ::perfetto::protos::FrameTimelineEvent_ActualSurfaceFrameStart*
CreateMaybeMessage(Arena * arena)2810 Arena::CreateMaybeMessage< ::perfetto::protos::FrameTimelineEvent_ActualSurfaceFrameStart >(Arena* arena) {
2811 return Arena::CreateMessageInternal< ::perfetto::protos::FrameTimelineEvent_ActualSurfaceFrameStart >(arena);
2812 }
2813 template<> PROTOBUF_NOINLINE ::perfetto::protos::FrameTimelineEvent_ExpectedDisplayFrameStart*
CreateMaybeMessage(Arena * arena)2814 Arena::CreateMaybeMessage< ::perfetto::protos::FrameTimelineEvent_ExpectedDisplayFrameStart >(Arena* arena) {
2815 return Arena::CreateMessageInternal< ::perfetto::protos::FrameTimelineEvent_ExpectedDisplayFrameStart >(arena);
2816 }
2817 template<> PROTOBUF_NOINLINE ::perfetto::protos::FrameTimelineEvent_ActualDisplayFrameStart*
CreateMaybeMessage(Arena * arena)2818 Arena::CreateMaybeMessage< ::perfetto::protos::FrameTimelineEvent_ActualDisplayFrameStart >(Arena* arena) {
2819 return Arena::CreateMessageInternal< ::perfetto::protos::FrameTimelineEvent_ActualDisplayFrameStart >(arena);
2820 }
2821 template<> PROTOBUF_NOINLINE ::perfetto::protos::FrameTimelineEvent_FrameEnd*
CreateMaybeMessage(Arena * arena)2822 Arena::CreateMaybeMessage< ::perfetto::protos::FrameTimelineEvent_FrameEnd >(Arena* arena) {
2823 return Arena::CreateMessageInternal< ::perfetto::protos::FrameTimelineEvent_FrameEnd >(arena);
2824 }
2825 template<> PROTOBUF_NOINLINE ::perfetto::protos::FrameTimelineEvent*
CreateMaybeMessage(Arena * arena)2826 Arena::CreateMaybeMessage< ::perfetto::protos::FrameTimelineEvent >(Arena* arena) {
2827 return Arena::CreateMessageInternal< ::perfetto::protos::FrameTimelineEvent >(arena);
2828 }
2829 PROTOBUF_NAMESPACE_CLOSE
2830
2831 // @@protoc_insertion_point(global_scope)
2832 #include <google/protobuf/port_undef.inc>
2833