1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/track_event/chrome_latency_info.proto
3
4 #include "protos/perfetto/trace/track_event/chrome_latency_info.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 {
ChromeLatencyInfo_ComponentInfo(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR ChromeLatencyInfo_ComponentInfo::ChromeLatencyInfo_ComponentInfo(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.time_us_)*/::uint64_t{0u}
28 , /*decltype(_impl_.component_type_)*/0} {}
29 struct ChromeLatencyInfo_ComponentInfoDefaultTypeInternal {
ChromeLatencyInfo_ComponentInfoDefaultTypeInternalperfetto::protos::ChromeLatencyInfo_ComponentInfoDefaultTypeInternal30 PROTOBUF_CONSTEXPR ChromeLatencyInfo_ComponentInfoDefaultTypeInternal()
31 : _instance(::_pbi::ConstantInitialized{}) {}
~ChromeLatencyInfo_ComponentInfoDefaultTypeInternalperfetto::protos::ChromeLatencyInfo_ComponentInfoDefaultTypeInternal32 ~ChromeLatencyInfo_ComponentInfoDefaultTypeInternal() {}
33 union { // NOLINT(misc-non-private-member-variables-in-classes)
34 ChromeLatencyInfo_ComponentInfo _instance;
35 };
36 };
37 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ChromeLatencyInfo_ComponentInfoDefaultTypeInternal _ChromeLatencyInfo_ComponentInfo_default_instance_;
ChromeLatencyInfo(::_pbi::ConstantInitialized)38 PROTOBUF_CONSTEXPR ChromeLatencyInfo::ChromeLatencyInfo(
39 ::_pbi::ConstantInitialized): _impl_{
40 /*decltype(_impl_._has_bits_)*/{}
41 , /*decltype(_impl_._cached_size_)*/{}
42 , /*decltype(_impl_.component_info_)*/{}
43 , /*decltype(_impl_.trace_id_)*/::int64_t{0}
44 , /*decltype(_impl_.step_)*/0
45 , /*decltype(_impl_.frame_tree_node_id_)*/0
46 , /*decltype(_impl_.gesture_scroll_id_)*/::int64_t{0}
47 , /*decltype(_impl_.is_coalesced_)*/false
48 , /*decltype(_impl_.input_type_)*/0
49 , /*decltype(_impl_.touch_id_)*/::int64_t{0}} {}
50 struct ChromeLatencyInfoDefaultTypeInternal {
ChromeLatencyInfoDefaultTypeInternalperfetto::protos::ChromeLatencyInfoDefaultTypeInternal51 PROTOBUF_CONSTEXPR ChromeLatencyInfoDefaultTypeInternal()
52 : _instance(::_pbi::ConstantInitialized{}) {}
~ChromeLatencyInfoDefaultTypeInternalperfetto::protos::ChromeLatencyInfoDefaultTypeInternal53 ~ChromeLatencyInfoDefaultTypeInternal() {}
54 union { // NOLINT(misc-non-private-member-variables-in-classes)
55 ChromeLatencyInfo _instance;
56 };
57 };
58 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ChromeLatencyInfoDefaultTypeInternal _ChromeLatencyInfo_default_instance_;
59 } // namespace protos
60 } // namespace perfetto
61 namespace perfetto {
62 namespace protos {
ChromeLatencyInfo_Step_IsValid(int value)63 bool ChromeLatencyInfo_Step_IsValid(int value) {
64 switch (value) {
65 case 0:
66 case 1:
67 case 2:
68 case 3:
69 case 4:
70 case 5:
71 case 6:
72 case 7:
73 case 8:
74 case 9:
75 case 10:
76 case 11:
77 return true;
78 default:
79 return false;
80 }
81 }
82
83 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> ChromeLatencyInfo_Step_strings[12] = {};
84
85 static const char ChromeLatencyInfo_Step_names[] =
86 "STEP_DID_HANDLE_INPUT_AND_OVERSCROLL"
87 "STEP_DRAW_AND_SWAP"
88 "STEP_FINISHED_SWAP_BUFFERS"
89 "STEP_HANDLED_INPUT_EVENT_IMPL"
90 "STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL"
91 "STEP_HANDLE_INPUT_EVENT_IMPL"
92 "STEP_HANDLE_INPUT_EVENT_MAIN"
93 "STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT"
94 "STEP_MAIN_THREAD_SCROLL_UPDATE"
95 "STEP_SEND_INPUT_EVENT_UI"
96 "STEP_SWAP_BUFFERS"
97 "STEP_UNSPECIFIED";
98
99 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ChromeLatencyInfo_Step_entries[] = {
100 { {ChromeLatencyInfo_Step_names + 0, 36}, 8 },
101 { {ChromeLatencyInfo_Step_names + 36, 18}, 7 },
102 { {ChromeLatencyInfo_Step_names + 54, 26}, 11 },
103 { {ChromeLatencyInfo_Step_names + 80, 29}, 10 },
104 { {ChromeLatencyInfo_Step_names + 109, 37}, 9 },
105 { {ChromeLatencyInfo_Step_names + 146, 28}, 5 },
106 { {ChromeLatencyInfo_Step_names + 174, 28}, 4 },
107 { {ChromeLatencyInfo_Step_names + 202, 35}, 1 },
108 { {ChromeLatencyInfo_Step_names + 237, 30}, 2 },
109 { {ChromeLatencyInfo_Step_names + 267, 24}, 3 },
110 { {ChromeLatencyInfo_Step_names + 291, 17}, 6 },
111 { {ChromeLatencyInfo_Step_names + 308, 16}, 0 },
112 };
113
114 static const int ChromeLatencyInfo_Step_entries_by_number[] = {
115 11, // 0 -> STEP_UNSPECIFIED
116 7, // 1 -> STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT
117 8, // 2 -> STEP_MAIN_THREAD_SCROLL_UPDATE
118 9, // 3 -> STEP_SEND_INPUT_EVENT_UI
119 6, // 4 -> STEP_HANDLE_INPUT_EVENT_MAIN
120 5, // 5 -> STEP_HANDLE_INPUT_EVENT_IMPL
121 10, // 6 -> STEP_SWAP_BUFFERS
122 1, // 7 -> STEP_DRAW_AND_SWAP
123 0, // 8 -> STEP_DID_HANDLE_INPUT_AND_OVERSCROLL
124 4, // 9 -> STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL
125 3, // 10 -> STEP_HANDLED_INPUT_EVENT_IMPL
126 2, // 11 -> STEP_FINISHED_SWAP_BUFFERS
127 };
128
ChromeLatencyInfo_Step_Name(ChromeLatencyInfo_Step value)129 const std::string& ChromeLatencyInfo_Step_Name(
130 ChromeLatencyInfo_Step value) {
131 static const bool dummy =
132 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
133 ChromeLatencyInfo_Step_entries,
134 ChromeLatencyInfo_Step_entries_by_number,
135 12, ChromeLatencyInfo_Step_strings);
136 (void) dummy;
137 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
138 ChromeLatencyInfo_Step_entries,
139 ChromeLatencyInfo_Step_entries_by_number,
140 12, value);
141 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
142 ChromeLatencyInfo_Step_strings[idx].get();
143 }
ChromeLatencyInfo_Step_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,ChromeLatencyInfo_Step * value)144 bool ChromeLatencyInfo_Step_Parse(
145 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ChromeLatencyInfo_Step* value) {
146 int int_value;
147 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
148 ChromeLatencyInfo_Step_entries, 12, name, &int_value);
149 if (success) {
150 *value = static_cast<ChromeLatencyInfo_Step>(int_value);
151 }
152 return success;
153 }
154 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
155 constexpr ChromeLatencyInfo_Step ChromeLatencyInfo::STEP_UNSPECIFIED;
156 constexpr ChromeLatencyInfo_Step ChromeLatencyInfo::STEP_SEND_INPUT_EVENT_UI;
157 constexpr ChromeLatencyInfo_Step ChromeLatencyInfo::STEP_HANDLE_INPUT_EVENT_IMPL;
158 constexpr ChromeLatencyInfo_Step ChromeLatencyInfo::STEP_DID_HANDLE_INPUT_AND_OVERSCROLL;
159 constexpr ChromeLatencyInfo_Step ChromeLatencyInfo::STEP_HANDLE_INPUT_EVENT_MAIN;
160 constexpr ChromeLatencyInfo_Step ChromeLatencyInfo::STEP_MAIN_THREAD_SCROLL_UPDATE;
161 constexpr ChromeLatencyInfo_Step ChromeLatencyInfo::STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT;
162 constexpr ChromeLatencyInfo_Step ChromeLatencyInfo::STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL;
163 constexpr ChromeLatencyInfo_Step ChromeLatencyInfo::STEP_HANDLED_INPUT_EVENT_IMPL;
164 constexpr ChromeLatencyInfo_Step ChromeLatencyInfo::STEP_SWAP_BUFFERS;
165 constexpr ChromeLatencyInfo_Step ChromeLatencyInfo::STEP_DRAW_AND_SWAP;
166 constexpr ChromeLatencyInfo_Step ChromeLatencyInfo::STEP_FINISHED_SWAP_BUFFERS;
167 constexpr ChromeLatencyInfo_Step ChromeLatencyInfo::Step_MIN;
168 constexpr ChromeLatencyInfo_Step ChromeLatencyInfo::Step_MAX;
169 constexpr int ChromeLatencyInfo::Step_ARRAYSIZE;
170 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
ChromeLatencyInfo_LatencyComponentType_IsValid(int value)171 bool ChromeLatencyInfo_LatencyComponentType_IsValid(int value) {
172 switch (value) {
173 case 0:
174 case 1:
175 case 2:
176 case 3:
177 case 4:
178 case 5:
179 case 6:
180 case 7:
181 case 8:
182 case 9:
183 case 10:
184 case 11:
185 case 12:
186 case 13:
187 case 14:
188 return true;
189 default:
190 return false;
191 }
192 }
193
194 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> ChromeLatencyInfo_LatencyComponentType_strings[15] = {};
195
196 static const char ChromeLatencyInfo_LatencyComponentType_names[] =
197 "COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME"
198 "COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER"
199 "COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH"
200 "COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH"
201 "COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL"
202 "COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP"
203 "COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL"
204 "COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN"
205 "COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP"
206 "COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL"
207 "COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN"
208 "COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT"
209 "COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL"
210 "COMPONENT_INPUT_EVENT_LATENCY_UI"
211 "COMPONENT_UNSPECIFIED";
212
213 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ChromeLatencyInfo_LatencyComponentType_entries[] = {
214 { {ChromeLatencyInfo_LatencyComponentType_names + 0, 43}, 12 },
215 { {ChromeLatencyInfo_LatencyComponentType_names + 43, 37}, 13 },
216 { {ChromeLatencyInfo_LatencyComponentType_names + 80, 37}, 10 },
217 { {ChromeLatencyInfo_LatencyComponentType_names + 117, 39}, 1 },
218 { {ChromeLatencyInfo_LatencyComponentType_names + 156, 58}, 3 },
219 { {ChromeLatencyInfo_LatencyComponentType_names + 214, 40}, 14 },
220 { {ChromeLatencyInfo_LatencyComponentType_names + 254, 38}, 4 },
221 { {ChromeLatencyInfo_LatencyComponentType_names + 292, 43}, 6 },
222 { {ChromeLatencyInfo_LatencyComponentType_names + 335, 43}, 11 },
223 { {ChromeLatencyInfo_LatencyComponentType_names + 378, 54}, 8 },
224 { {ChromeLatencyInfo_LatencyComponentType_names + 432, 54}, 7 },
225 { {ChromeLatencyInfo_LatencyComponentType_names + 486, 54}, 9 },
226 { {ChromeLatencyInfo_LatencyComponentType_names + 540, 52}, 2 },
227 { {ChromeLatencyInfo_LatencyComponentType_names + 592, 32}, 5 },
228 { {ChromeLatencyInfo_LatencyComponentType_names + 624, 21}, 0 },
229 };
230
231 static const int ChromeLatencyInfo_LatencyComponentType_entries_by_number[] = {
232 14, // 0 -> COMPONENT_UNSPECIFIED
233 3, // 1 -> COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH
234 12, // 2 -> COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL
235 4, // 3 -> COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL
236 6, // 4 -> COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL
237 13, // 5 -> COMPONENT_INPUT_EVENT_LATENCY_UI
238 7, // 6 -> COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN
239 10, // 7 -> COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN
240 9, // 8 -> COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL
241 11, // 9 -> COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT
242 2, // 10 -> COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH
243 8, // 11 -> COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP
244 0, // 12 -> COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME
245 1, // 13 -> COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER
246 5, // 14 -> COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP
247 };
248
ChromeLatencyInfo_LatencyComponentType_Name(ChromeLatencyInfo_LatencyComponentType value)249 const std::string& ChromeLatencyInfo_LatencyComponentType_Name(
250 ChromeLatencyInfo_LatencyComponentType value) {
251 static const bool dummy =
252 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
253 ChromeLatencyInfo_LatencyComponentType_entries,
254 ChromeLatencyInfo_LatencyComponentType_entries_by_number,
255 15, ChromeLatencyInfo_LatencyComponentType_strings);
256 (void) dummy;
257 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
258 ChromeLatencyInfo_LatencyComponentType_entries,
259 ChromeLatencyInfo_LatencyComponentType_entries_by_number,
260 15, value);
261 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
262 ChromeLatencyInfo_LatencyComponentType_strings[idx].get();
263 }
ChromeLatencyInfo_LatencyComponentType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,ChromeLatencyInfo_LatencyComponentType * value)264 bool ChromeLatencyInfo_LatencyComponentType_Parse(
265 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ChromeLatencyInfo_LatencyComponentType* value) {
266 int int_value;
267 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
268 ChromeLatencyInfo_LatencyComponentType_entries, 15, name, &int_value);
269 if (success) {
270 *value = static_cast<ChromeLatencyInfo_LatencyComponentType>(int_value);
271 }
272 return success;
273 }
274 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
275 constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo::COMPONENT_UNSPECIFIED;
276 constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo::COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH;
277 constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo::COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL;
278 constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo::COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL;
279 constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo::COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL;
280 constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo::COMPONENT_INPUT_EVENT_LATENCY_UI;
281 constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo::COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN;
282 constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo::COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN;
283 constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo::COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL;
284 constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo::COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT;
285 constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo::COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH;
286 constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo::COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP;
287 constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo::COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME;
288 constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo::COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER;
289 constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo::COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP;
290 constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo::LatencyComponentType_MIN;
291 constexpr ChromeLatencyInfo_LatencyComponentType ChromeLatencyInfo::LatencyComponentType_MAX;
292 constexpr int ChromeLatencyInfo::LatencyComponentType_ARRAYSIZE;
293 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
ChromeLatencyInfo_InputType_IsValid(int value)294 bool ChromeLatencyInfo_InputType_IsValid(int value) {
295 switch (value) {
296 case 0:
297 case 1:
298 case 2:
299 case 3:
300 case 4:
301 case 5:
302 case 6:
303 return true;
304 default:
305 return false;
306 }
307 }
308
309 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> ChromeLatencyInfo_InputType_strings[7] = {};
310
311 static const char ChromeLatencyInfo_InputType_names[] =
312 "GESTURE_SCROLL_BEGIN"
313 "GESTURE_SCROLL_END"
314 "GESTURE_SCROLL_UPDATE"
315 "GESTURE_TAP"
316 "GESTURE_TAP_CANCEL"
317 "TOUCH_MOVED"
318 "UNSPECIFIED_OR_OTHER";
319
320 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ChromeLatencyInfo_InputType_entries[] = {
321 { {ChromeLatencyInfo_InputType_names + 0, 20}, 2 },
322 { {ChromeLatencyInfo_InputType_names + 20, 18}, 4 },
323 { {ChromeLatencyInfo_InputType_names + 38, 21}, 3 },
324 { {ChromeLatencyInfo_InputType_names + 59, 11}, 5 },
325 { {ChromeLatencyInfo_InputType_names + 70, 18}, 6 },
326 { {ChromeLatencyInfo_InputType_names + 88, 11}, 1 },
327 { {ChromeLatencyInfo_InputType_names + 99, 20}, 0 },
328 };
329
330 static const int ChromeLatencyInfo_InputType_entries_by_number[] = {
331 6, // 0 -> UNSPECIFIED_OR_OTHER
332 5, // 1 -> TOUCH_MOVED
333 0, // 2 -> GESTURE_SCROLL_BEGIN
334 2, // 3 -> GESTURE_SCROLL_UPDATE
335 1, // 4 -> GESTURE_SCROLL_END
336 3, // 5 -> GESTURE_TAP
337 4, // 6 -> GESTURE_TAP_CANCEL
338 };
339
ChromeLatencyInfo_InputType_Name(ChromeLatencyInfo_InputType value)340 const std::string& ChromeLatencyInfo_InputType_Name(
341 ChromeLatencyInfo_InputType value) {
342 static const bool dummy =
343 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
344 ChromeLatencyInfo_InputType_entries,
345 ChromeLatencyInfo_InputType_entries_by_number,
346 7, ChromeLatencyInfo_InputType_strings);
347 (void) dummy;
348 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
349 ChromeLatencyInfo_InputType_entries,
350 ChromeLatencyInfo_InputType_entries_by_number,
351 7, value);
352 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
353 ChromeLatencyInfo_InputType_strings[idx].get();
354 }
ChromeLatencyInfo_InputType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,ChromeLatencyInfo_InputType * value)355 bool ChromeLatencyInfo_InputType_Parse(
356 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ChromeLatencyInfo_InputType* value) {
357 int int_value;
358 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
359 ChromeLatencyInfo_InputType_entries, 7, name, &int_value);
360 if (success) {
361 *value = static_cast<ChromeLatencyInfo_InputType>(int_value);
362 }
363 return success;
364 }
365 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
366 constexpr ChromeLatencyInfo_InputType ChromeLatencyInfo::UNSPECIFIED_OR_OTHER;
367 constexpr ChromeLatencyInfo_InputType ChromeLatencyInfo::TOUCH_MOVED;
368 constexpr ChromeLatencyInfo_InputType ChromeLatencyInfo::GESTURE_SCROLL_BEGIN;
369 constexpr ChromeLatencyInfo_InputType ChromeLatencyInfo::GESTURE_SCROLL_UPDATE;
370 constexpr ChromeLatencyInfo_InputType ChromeLatencyInfo::GESTURE_SCROLL_END;
371 constexpr ChromeLatencyInfo_InputType ChromeLatencyInfo::GESTURE_TAP;
372 constexpr ChromeLatencyInfo_InputType ChromeLatencyInfo::GESTURE_TAP_CANCEL;
373 constexpr ChromeLatencyInfo_InputType ChromeLatencyInfo::InputType_MIN;
374 constexpr ChromeLatencyInfo_InputType ChromeLatencyInfo::InputType_MAX;
375 constexpr int ChromeLatencyInfo::InputType_ARRAYSIZE;
376 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
377
378 // ===================================================================
379
380 class ChromeLatencyInfo_ComponentInfo::_Internal {
381 public:
382 using HasBits = decltype(std::declval<ChromeLatencyInfo_ComponentInfo>()._impl_._has_bits_);
set_has_component_type(HasBits * has_bits)383 static void set_has_component_type(HasBits* has_bits) {
384 (*has_bits)[0] |= 2u;
385 }
set_has_time_us(HasBits * has_bits)386 static void set_has_time_us(HasBits* has_bits) {
387 (*has_bits)[0] |= 1u;
388 }
389 };
390
ChromeLatencyInfo_ComponentInfo(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)391 ChromeLatencyInfo_ComponentInfo::ChromeLatencyInfo_ComponentInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
392 bool is_message_owned)
393 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
394 SharedCtor(arena, is_message_owned);
395 // @@protoc_insertion_point(arena_constructor:perfetto.protos.ChromeLatencyInfo.ComponentInfo)
396 }
ChromeLatencyInfo_ComponentInfo(const ChromeLatencyInfo_ComponentInfo & from)397 ChromeLatencyInfo_ComponentInfo::ChromeLatencyInfo_ComponentInfo(const ChromeLatencyInfo_ComponentInfo& from)
398 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
399 ChromeLatencyInfo_ComponentInfo* const _this = this; (void)_this;
400 new (&_impl_) Impl_{
401 decltype(_impl_._has_bits_){from._impl_._has_bits_}
402 , /*decltype(_impl_._cached_size_)*/{}
403 , decltype(_impl_.time_us_){}
404 , decltype(_impl_.component_type_){}};
405
406 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
407 ::memcpy(&_impl_.time_us_, &from._impl_.time_us_,
408 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.component_type_) -
409 reinterpret_cast<char*>(&_impl_.time_us_)) + sizeof(_impl_.component_type_));
410 // @@protoc_insertion_point(copy_constructor:perfetto.protos.ChromeLatencyInfo.ComponentInfo)
411 }
412
SharedCtor(::_pb::Arena * arena,bool is_message_owned)413 inline void ChromeLatencyInfo_ComponentInfo::SharedCtor(
414 ::_pb::Arena* arena, bool is_message_owned) {
415 (void)arena;
416 (void)is_message_owned;
417 new (&_impl_) Impl_{
418 decltype(_impl_._has_bits_){}
419 , /*decltype(_impl_._cached_size_)*/{}
420 , decltype(_impl_.time_us_){::uint64_t{0u}}
421 , decltype(_impl_.component_type_){0}
422 };
423 }
424
~ChromeLatencyInfo_ComponentInfo()425 ChromeLatencyInfo_ComponentInfo::~ChromeLatencyInfo_ComponentInfo() {
426 // @@protoc_insertion_point(destructor:perfetto.protos.ChromeLatencyInfo.ComponentInfo)
427 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
428 (void)arena;
429 return;
430 }
431 SharedDtor();
432 }
433
SharedDtor()434 inline void ChromeLatencyInfo_ComponentInfo::SharedDtor() {
435 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
436 }
437
SetCachedSize(int size) const438 void ChromeLatencyInfo_ComponentInfo::SetCachedSize(int size) const {
439 _impl_._cached_size_.Set(size);
440 }
441
Clear()442 void ChromeLatencyInfo_ComponentInfo::Clear() {
443 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ChromeLatencyInfo.ComponentInfo)
444 ::uint32_t cached_has_bits = 0;
445 // Prevent compiler warnings about cached_has_bits being unused
446 (void) cached_has_bits;
447
448 cached_has_bits = _impl_._has_bits_[0];
449 if (cached_has_bits & 0x00000003u) {
450 ::memset(&_impl_.time_us_, 0, static_cast<size_t>(
451 reinterpret_cast<char*>(&_impl_.component_type_) -
452 reinterpret_cast<char*>(&_impl_.time_us_)) + sizeof(_impl_.component_type_));
453 }
454 _impl_._has_bits_.Clear();
455 _internal_metadata_.Clear<std::string>();
456 }
457
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)458 const char* ChromeLatencyInfo_ComponentInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
459 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
460 _Internal::HasBits has_bits{};
461 while (!ctx->Done(&ptr)) {
462 ::uint32_t tag;
463 ptr = ::_pbi::ReadTag(ptr, &tag);
464 switch (tag >> 3) {
465 // optional .perfetto.protos.ChromeLatencyInfo.LatencyComponentType component_type = 1;
466 case 1:
467 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
468 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
469 CHK_(ptr);
470 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::ChromeLatencyInfo_LatencyComponentType_IsValid(val))) {
471 _internal_set_component_type(static_cast<::perfetto::protos::ChromeLatencyInfo_LatencyComponentType>(val));
472 } else {
473 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
474 }
475 } else {
476 goto handle_unusual;
477 }
478 continue;
479 // optional uint64 time_us = 2;
480 case 2:
481 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
482 _Internal::set_has_time_us(&has_bits);
483 _impl_.time_us_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
484 CHK_(ptr);
485 } else {
486 goto handle_unusual;
487 }
488 continue;
489 default:
490 goto handle_unusual;
491 } // switch
492 handle_unusual:
493 if ((tag == 0) || ((tag & 7) == 4)) {
494 CHK_(ptr);
495 ctx->SetLastTag(tag);
496 goto message_done;
497 }
498 ptr = UnknownFieldParse(
499 tag,
500 _internal_metadata_.mutable_unknown_fields<std::string>(),
501 ptr, ctx);
502 CHK_(ptr != nullptr);
503 } // while
504 message_done:
505 _impl_._has_bits_.Or(has_bits);
506 return ptr;
507 failure:
508 ptr = nullptr;
509 goto message_done;
510 #undef CHK_
511 }
512
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const513 ::uint8_t* ChromeLatencyInfo_ComponentInfo::_InternalSerialize(
514 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
515 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ChromeLatencyInfo.ComponentInfo)
516 ::uint32_t cached_has_bits = 0;
517 (void) cached_has_bits;
518
519 cached_has_bits = _impl_._has_bits_[0];
520 // optional .perfetto.protos.ChromeLatencyInfo.LatencyComponentType component_type = 1;
521 if (cached_has_bits & 0x00000002u) {
522 target = stream->EnsureSpace(target);
523 target = ::_pbi::WireFormatLite::WriteEnumToArray(
524 1, this->_internal_component_type(), target);
525 }
526
527 // optional uint64 time_us = 2;
528 if (cached_has_bits & 0x00000001u) {
529 target = stream->EnsureSpace(target);
530 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_time_us(), target);
531 }
532
533 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
534 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
535 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
536 }
537 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ChromeLatencyInfo.ComponentInfo)
538 return target;
539 }
540
ByteSizeLong() const541 size_t ChromeLatencyInfo_ComponentInfo::ByteSizeLong() const {
542 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ChromeLatencyInfo.ComponentInfo)
543 size_t total_size = 0;
544
545 ::uint32_t cached_has_bits = 0;
546 // Prevent compiler warnings about cached_has_bits being unused
547 (void) cached_has_bits;
548
549 cached_has_bits = _impl_._has_bits_[0];
550 if (cached_has_bits & 0x00000003u) {
551 // optional uint64 time_us = 2;
552 if (cached_has_bits & 0x00000001u) {
553 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_time_us());
554 }
555
556 // optional .perfetto.protos.ChromeLatencyInfo.LatencyComponentType component_type = 1;
557 if (cached_has_bits & 0x00000002u) {
558 total_size += 1 +
559 ::_pbi::WireFormatLite::EnumSize(this->_internal_component_type());
560 }
561
562 }
563 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
564 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
565 }
566 int cached_size = ::_pbi::ToCachedSize(total_size);
567 SetCachedSize(cached_size);
568 return total_size;
569 }
570
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)571 void ChromeLatencyInfo_ComponentInfo::CheckTypeAndMergeFrom(
572 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
573 MergeFrom(*::_pbi::DownCast<const ChromeLatencyInfo_ComponentInfo*>(
574 &from));
575 }
576
MergeFrom(const ChromeLatencyInfo_ComponentInfo & from)577 void ChromeLatencyInfo_ComponentInfo::MergeFrom(const ChromeLatencyInfo_ComponentInfo& from) {
578 ChromeLatencyInfo_ComponentInfo* const _this = this;
579 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ChromeLatencyInfo.ComponentInfo)
580 GOOGLE_DCHECK_NE(&from, _this);
581 ::uint32_t cached_has_bits = 0;
582 (void) cached_has_bits;
583
584 cached_has_bits = from._impl_._has_bits_[0];
585 if (cached_has_bits & 0x00000003u) {
586 if (cached_has_bits & 0x00000001u) {
587 _this->_impl_.time_us_ = from._impl_.time_us_;
588 }
589 if (cached_has_bits & 0x00000002u) {
590 _this->_impl_.component_type_ = from._impl_.component_type_;
591 }
592 _this->_impl_._has_bits_[0] |= cached_has_bits;
593 }
594 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
595 }
596
CopyFrom(const ChromeLatencyInfo_ComponentInfo & from)597 void ChromeLatencyInfo_ComponentInfo::CopyFrom(const ChromeLatencyInfo_ComponentInfo& from) {
598 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ChromeLatencyInfo.ComponentInfo)
599 if (&from == this) return;
600 Clear();
601 MergeFrom(from);
602 }
603
IsInitialized() const604 bool ChromeLatencyInfo_ComponentInfo::IsInitialized() const {
605 return true;
606 }
607
InternalSwap(ChromeLatencyInfo_ComponentInfo * other)608 void ChromeLatencyInfo_ComponentInfo::InternalSwap(ChromeLatencyInfo_ComponentInfo* other) {
609 using std::swap;
610 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
611 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
612 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
613 PROTOBUF_FIELD_OFFSET(ChromeLatencyInfo_ComponentInfo, _impl_.component_type_)
614 + sizeof(ChromeLatencyInfo_ComponentInfo::_impl_.component_type_) // NOLINT
615 - PROTOBUF_FIELD_OFFSET(ChromeLatencyInfo_ComponentInfo, _impl_.time_us_)>(
616 reinterpret_cast<char*>(&_impl_.time_us_),
617 reinterpret_cast<char*>(&other->_impl_.time_us_));
618 }
619
GetTypeName() const620 std::string ChromeLatencyInfo_ComponentInfo::GetTypeName() const {
621 return "perfetto.protos.ChromeLatencyInfo.ComponentInfo";
622 }
623
624
625 // ===================================================================
626
627 class ChromeLatencyInfo::_Internal {
628 public:
629 using HasBits = decltype(std::declval<ChromeLatencyInfo>()._impl_._has_bits_);
set_has_trace_id(HasBits * has_bits)630 static void set_has_trace_id(HasBits* has_bits) {
631 (*has_bits)[0] |= 1u;
632 }
set_has_step(HasBits * has_bits)633 static void set_has_step(HasBits* has_bits) {
634 (*has_bits)[0] |= 2u;
635 }
set_has_frame_tree_node_id(HasBits * has_bits)636 static void set_has_frame_tree_node_id(HasBits* has_bits) {
637 (*has_bits)[0] |= 4u;
638 }
set_has_is_coalesced(HasBits * has_bits)639 static void set_has_is_coalesced(HasBits* has_bits) {
640 (*has_bits)[0] |= 16u;
641 }
set_has_gesture_scroll_id(HasBits * has_bits)642 static void set_has_gesture_scroll_id(HasBits* has_bits) {
643 (*has_bits)[0] |= 8u;
644 }
set_has_touch_id(HasBits * has_bits)645 static void set_has_touch_id(HasBits* has_bits) {
646 (*has_bits)[0] |= 64u;
647 }
set_has_input_type(HasBits * has_bits)648 static void set_has_input_type(HasBits* has_bits) {
649 (*has_bits)[0] |= 32u;
650 }
651 };
652
ChromeLatencyInfo(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)653 ChromeLatencyInfo::ChromeLatencyInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
654 bool is_message_owned)
655 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
656 SharedCtor(arena, is_message_owned);
657 // @@protoc_insertion_point(arena_constructor:perfetto.protos.ChromeLatencyInfo)
658 }
ChromeLatencyInfo(const ChromeLatencyInfo & from)659 ChromeLatencyInfo::ChromeLatencyInfo(const ChromeLatencyInfo& from)
660 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
661 ChromeLatencyInfo* const _this = this; (void)_this;
662 new (&_impl_) Impl_{
663 decltype(_impl_._has_bits_){from._impl_._has_bits_}
664 , /*decltype(_impl_._cached_size_)*/{}
665 , decltype(_impl_.component_info_){from._impl_.component_info_}
666 , decltype(_impl_.trace_id_){}
667 , decltype(_impl_.step_){}
668 , decltype(_impl_.frame_tree_node_id_){}
669 , decltype(_impl_.gesture_scroll_id_){}
670 , decltype(_impl_.is_coalesced_){}
671 , decltype(_impl_.input_type_){}
672 , decltype(_impl_.touch_id_){}};
673
674 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
675 ::memcpy(&_impl_.trace_id_, &from._impl_.trace_id_,
676 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.touch_id_) -
677 reinterpret_cast<char*>(&_impl_.trace_id_)) + sizeof(_impl_.touch_id_));
678 // @@protoc_insertion_point(copy_constructor:perfetto.protos.ChromeLatencyInfo)
679 }
680
SharedCtor(::_pb::Arena * arena,bool is_message_owned)681 inline void ChromeLatencyInfo::SharedCtor(
682 ::_pb::Arena* arena, bool is_message_owned) {
683 (void)arena;
684 (void)is_message_owned;
685 new (&_impl_) Impl_{
686 decltype(_impl_._has_bits_){}
687 , /*decltype(_impl_._cached_size_)*/{}
688 , decltype(_impl_.component_info_){arena}
689 , decltype(_impl_.trace_id_){::int64_t{0}}
690 , decltype(_impl_.step_){0}
691 , decltype(_impl_.frame_tree_node_id_){0}
692 , decltype(_impl_.gesture_scroll_id_){::int64_t{0}}
693 , decltype(_impl_.is_coalesced_){false}
694 , decltype(_impl_.input_type_){0}
695 , decltype(_impl_.touch_id_){::int64_t{0}}
696 };
697 }
698
~ChromeLatencyInfo()699 ChromeLatencyInfo::~ChromeLatencyInfo() {
700 // @@protoc_insertion_point(destructor:perfetto.protos.ChromeLatencyInfo)
701 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
702 (void)arena;
703 return;
704 }
705 SharedDtor();
706 }
707
SharedDtor()708 inline void ChromeLatencyInfo::SharedDtor() {
709 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
710 _impl_.component_info_.~RepeatedPtrField();
711 }
712
SetCachedSize(int size) const713 void ChromeLatencyInfo::SetCachedSize(int size) const {
714 _impl_._cached_size_.Set(size);
715 }
716
Clear()717 void ChromeLatencyInfo::Clear() {
718 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ChromeLatencyInfo)
719 ::uint32_t cached_has_bits = 0;
720 // Prevent compiler warnings about cached_has_bits being unused
721 (void) cached_has_bits;
722
723 _impl_.component_info_.Clear();
724 cached_has_bits = _impl_._has_bits_[0];
725 if (cached_has_bits & 0x0000007fu) {
726 ::memset(&_impl_.trace_id_, 0, static_cast<size_t>(
727 reinterpret_cast<char*>(&_impl_.touch_id_) -
728 reinterpret_cast<char*>(&_impl_.trace_id_)) + sizeof(_impl_.touch_id_));
729 }
730 _impl_._has_bits_.Clear();
731 _internal_metadata_.Clear<std::string>();
732 }
733
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)734 const char* ChromeLatencyInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
735 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
736 _Internal::HasBits has_bits{};
737 while (!ctx->Done(&ptr)) {
738 ::uint32_t tag;
739 ptr = ::_pbi::ReadTag(ptr, &tag);
740 switch (tag >> 3) {
741 // optional int64 trace_id = 1;
742 case 1:
743 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
744 _Internal::set_has_trace_id(&has_bits);
745 _impl_.trace_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
746 CHK_(ptr);
747 } else {
748 goto handle_unusual;
749 }
750 continue;
751 // optional .perfetto.protos.ChromeLatencyInfo.Step step = 2;
752 case 2:
753 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
754 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
755 CHK_(ptr);
756 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::ChromeLatencyInfo_Step_IsValid(val))) {
757 _internal_set_step(static_cast<::perfetto::protos::ChromeLatencyInfo_Step>(val));
758 } else {
759 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
760 }
761 } else {
762 goto handle_unusual;
763 }
764 continue;
765 // optional int32 frame_tree_node_id = 3;
766 case 3:
767 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
768 _Internal::set_has_frame_tree_node_id(&has_bits);
769 _impl_.frame_tree_node_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
770 CHK_(ptr);
771 } else {
772 goto handle_unusual;
773 }
774 continue;
775 // repeated .perfetto.protos.ChromeLatencyInfo.ComponentInfo component_info = 4;
776 case 4:
777 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
778 ptr -= 1;
779 do {
780 ptr += 1;
781 ptr = ctx->ParseMessage(_internal_add_component_info(), ptr);
782 CHK_(ptr);
783 if (!ctx->DataAvailable(ptr)) break;
784 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
785 } else {
786 goto handle_unusual;
787 }
788 continue;
789 // optional bool is_coalesced = 5;
790 case 5:
791 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
792 _Internal::set_has_is_coalesced(&has_bits);
793 _impl_.is_coalesced_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
794 CHK_(ptr);
795 } else {
796 goto handle_unusual;
797 }
798 continue;
799 // optional int64 gesture_scroll_id = 6;
800 case 6:
801 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
802 _Internal::set_has_gesture_scroll_id(&has_bits);
803 _impl_.gesture_scroll_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
804 CHK_(ptr);
805 } else {
806 goto handle_unusual;
807 }
808 continue;
809 // optional int64 touch_id = 7;
810 case 7:
811 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
812 _Internal::set_has_touch_id(&has_bits);
813 _impl_.touch_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
814 CHK_(ptr);
815 } else {
816 goto handle_unusual;
817 }
818 continue;
819 // optional .perfetto.protos.ChromeLatencyInfo.InputType input_type = 8;
820 case 8:
821 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
822 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
823 CHK_(ptr);
824 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::ChromeLatencyInfo_InputType_IsValid(val))) {
825 _internal_set_input_type(static_cast<::perfetto::protos::ChromeLatencyInfo_InputType>(val));
826 } else {
827 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(8, val, mutable_unknown_fields());
828 }
829 } else {
830 goto handle_unusual;
831 }
832 continue;
833 default:
834 goto handle_unusual;
835 } // switch
836 handle_unusual:
837 if ((tag == 0) || ((tag & 7) == 4)) {
838 CHK_(ptr);
839 ctx->SetLastTag(tag);
840 goto message_done;
841 }
842 ptr = UnknownFieldParse(
843 tag,
844 _internal_metadata_.mutable_unknown_fields<std::string>(),
845 ptr, ctx);
846 CHK_(ptr != nullptr);
847 } // while
848 message_done:
849 _impl_._has_bits_.Or(has_bits);
850 return ptr;
851 failure:
852 ptr = nullptr;
853 goto message_done;
854 #undef CHK_
855 }
856
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const857 ::uint8_t* ChromeLatencyInfo::_InternalSerialize(
858 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
859 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ChromeLatencyInfo)
860 ::uint32_t cached_has_bits = 0;
861 (void) cached_has_bits;
862
863 cached_has_bits = _impl_._has_bits_[0];
864 // optional int64 trace_id = 1;
865 if (cached_has_bits & 0x00000001u) {
866 target = stream->EnsureSpace(target);
867 target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_trace_id(), target);
868 }
869
870 // optional .perfetto.protos.ChromeLatencyInfo.Step step = 2;
871 if (cached_has_bits & 0x00000002u) {
872 target = stream->EnsureSpace(target);
873 target = ::_pbi::WireFormatLite::WriteEnumToArray(
874 2, this->_internal_step(), target);
875 }
876
877 // optional int32 frame_tree_node_id = 3;
878 if (cached_has_bits & 0x00000004u) {
879 target = stream->EnsureSpace(target);
880 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_frame_tree_node_id(), target);
881 }
882
883 // repeated .perfetto.protos.ChromeLatencyInfo.ComponentInfo component_info = 4;
884 for (unsigned i = 0,
885 n = static_cast<unsigned>(this->_internal_component_info_size()); i < n; i++) {
886 const auto& repfield = this->_internal_component_info(i);
887 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
888 InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream);
889 }
890
891 // optional bool is_coalesced = 5;
892 if (cached_has_bits & 0x00000010u) {
893 target = stream->EnsureSpace(target);
894 target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_is_coalesced(), target);
895 }
896
897 // optional int64 gesture_scroll_id = 6;
898 if (cached_has_bits & 0x00000008u) {
899 target = stream->EnsureSpace(target);
900 target = ::_pbi::WireFormatLite::WriteInt64ToArray(6, this->_internal_gesture_scroll_id(), target);
901 }
902
903 // optional int64 touch_id = 7;
904 if (cached_has_bits & 0x00000040u) {
905 target = stream->EnsureSpace(target);
906 target = ::_pbi::WireFormatLite::WriteInt64ToArray(7, this->_internal_touch_id(), target);
907 }
908
909 // optional .perfetto.protos.ChromeLatencyInfo.InputType input_type = 8;
910 if (cached_has_bits & 0x00000020u) {
911 target = stream->EnsureSpace(target);
912 target = ::_pbi::WireFormatLite::WriteEnumToArray(
913 8, this->_internal_input_type(), target);
914 }
915
916 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
917 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
918 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
919 }
920 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ChromeLatencyInfo)
921 return target;
922 }
923
ByteSizeLong() const924 size_t ChromeLatencyInfo::ByteSizeLong() const {
925 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ChromeLatencyInfo)
926 size_t total_size = 0;
927
928 ::uint32_t cached_has_bits = 0;
929 // Prevent compiler warnings about cached_has_bits being unused
930 (void) cached_has_bits;
931
932 // repeated .perfetto.protos.ChromeLatencyInfo.ComponentInfo component_info = 4;
933 total_size += 1UL * this->_internal_component_info_size();
934 for (const auto& msg : this->_impl_.component_info_) {
935 total_size +=
936 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
937 }
938
939 cached_has_bits = _impl_._has_bits_[0];
940 if (cached_has_bits & 0x0000007fu) {
941 // optional int64 trace_id = 1;
942 if (cached_has_bits & 0x00000001u) {
943 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_trace_id());
944 }
945
946 // optional .perfetto.protos.ChromeLatencyInfo.Step step = 2;
947 if (cached_has_bits & 0x00000002u) {
948 total_size += 1 +
949 ::_pbi::WireFormatLite::EnumSize(this->_internal_step());
950 }
951
952 // optional int32 frame_tree_node_id = 3;
953 if (cached_has_bits & 0x00000004u) {
954 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_frame_tree_node_id());
955 }
956
957 // optional int64 gesture_scroll_id = 6;
958 if (cached_has_bits & 0x00000008u) {
959 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_gesture_scroll_id());
960 }
961
962 // optional bool is_coalesced = 5;
963 if (cached_has_bits & 0x00000010u) {
964 total_size += 1 + 1;
965 }
966
967 // optional .perfetto.protos.ChromeLatencyInfo.InputType input_type = 8;
968 if (cached_has_bits & 0x00000020u) {
969 total_size += 1 +
970 ::_pbi::WireFormatLite::EnumSize(this->_internal_input_type());
971 }
972
973 // optional int64 touch_id = 7;
974 if (cached_has_bits & 0x00000040u) {
975 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_touch_id());
976 }
977
978 }
979 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
980 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
981 }
982 int cached_size = ::_pbi::ToCachedSize(total_size);
983 SetCachedSize(cached_size);
984 return total_size;
985 }
986
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)987 void ChromeLatencyInfo::CheckTypeAndMergeFrom(
988 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
989 MergeFrom(*::_pbi::DownCast<const ChromeLatencyInfo*>(
990 &from));
991 }
992
MergeFrom(const ChromeLatencyInfo & from)993 void ChromeLatencyInfo::MergeFrom(const ChromeLatencyInfo& from) {
994 ChromeLatencyInfo* const _this = this;
995 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ChromeLatencyInfo)
996 GOOGLE_DCHECK_NE(&from, _this);
997 ::uint32_t cached_has_bits = 0;
998 (void) cached_has_bits;
999
1000 _this->_impl_.component_info_.MergeFrom(from._impl_.component_info_);
1001 cached_has_bits = from._impl_._has_bits_[0];
1002 if (cached_has_bits & 0x0000007fu) {
1003 if (cached_has_bits & 0x00000001u) {
1004 _this->_impl_.trace_id_ = from._impl_.trace_id_;
1005 }
1006 if (cached_has_bits & 0x00000002u) {
1007 _this->_impl_.step_ = from._impl_.step_;
1008 }
1009 if (cached_has_bits & 0x00000004u) {
1010 _this->_impl_.frame_tree_node_id_ = from._impl_.frame_tree_node_id_;
1011 }
1012 if (cached_has_bits & 0x00000008u) {
1013 _this->_impl_.gesture_scroll_id_ = from._impl_.gesture_scroll_id_;
1014 }
1015 if (cached_has_bits & 0x00000010u) {
1016 _this->_impl_.is_coalesced_ = from._impl_.is_coalesced_;
1017 }
1018 if (cached_has_bits & 0x00000020u) {
1019 _this->_impl_.input_type_ = from._impl_.input_type_;
1020 }
1021 if (cached_has_bits & 0x00000040u) {
1022 _this->_impl_.touch_id_ = from._impl_.touch_id_;
1023 }
1024 _this->_impl_._has_bits_[0] |= cached_has_bits;
1025 }
1026 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1027 }
1028
CopyFrom(const ChromeLatencyInfo & from)1029 void ChromeLatencyInfo::CopyFrom(const ChromeLatencyInfo& from) {
1030 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ChromeLatencyInfo)
1031 if (&from == this) return;
1032 Clear();
1033 MergeFrom(from);
1034 }
1035
IsInitialized() const1036 bool ChromeLatencyInfo::IsInitialized() const {
1037 return true;
1038 }
1039
InternalSwap(ChromeLatencyInfo * other)1040 void ChromeLatencyInfo::InternalSwap(ChromeLatencyInfo* other) {
1041 using std::swap;
1042 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1043 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1044 _impl_.component_info_.InternalSwap(&other->_impl_.component_info_);
1045 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1046 PROTOBUF_FIELD_OFFSET(ChromeLatencyInfo, _impl_.touch_id_)
1047 + sizeof(ChromeLatencyInfo::_impl_.touch_id_) // NOLINT
1048 - PROTOBUF_FIELD_OFFSET(ChromeLatencyInfo, _impl_.trace_id_)>(
1049 reinterpret_cast<char*>(&_impl_.trace_id_),
1050 reinterpret_cast<char*>(&other->_impl_.trace_id_));
1051 }
1052
GetTypeName() const1053 std::string ChromeLatencyInfo::GetTypeName() const {
1054 return "perfetto.protos.ChromeLatencyInfo";
1055 }
1056
1057
1058 // @@protoc_insertion_point(namespace_scope)
1059 } // namespace protos
1060 } // namespace perfetto
1061 PROTOBUF_NAMESPACE_OPEN
1062 template<> PROTOBUF_NOINLINE ::perfetto::protos::ChromeLatencyInfo_ComponentInfo*
CreateMaybeMessage(Arena * arena)1063 Arena::CreateMaybeMessage< ::perfetto::protos::ChromeLatencyInfo_ComponentInfo >(Arena* arena) {
1064 return Arena::CreateMessageInternal< ::perfetto::protos::ChromeLatencyInfo_ComponentInfo >(arena);
1065 }
1066 template<> PROTOBUF_NOINLINE ::perfetto::protos::ChromeLatencyInfo*
CreateMaybeMessage(Arena * arena)1067 Arena::CreateMaybeMessage< ::perfetto::protos::ChromeLatencyInfo >(Arena* arena) {
1068 return Arena::CreateMessageInternal< ::perfetto::protos::ChromeLatencyInfo >(arena);
1069 }
1070 PROTOBUF_NAMESPACE_CLOSE
1071
1072 // @@protoc_insertion_point(global_scope)
1073 #include <google/protobuf/port_undef.inc>
1074