1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/ftrace/drm.proto
3
4 #include "protos/perfetto/trace/ftrace/drm.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 {
DrmVblankEventFtraceEvent(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR DrmVblankEventFtraceEvent::DrmVblankEventFtraceEvent(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.crtc_)*/0
28 , /*decltype(_impl_.high_prec_)*/0u
29 , /*decltype(_impl_.time_)*/::int64_t{0}
30 , /*decltype(_impl_.seq_)*/0u} {}
31 struct DrmVblankEventFtraceEventDefaultTypeInternal {
DrmVblankEventFtraceEventDefaultTypeInternalperfetto::protos::DrmVblankEventFtraceEventDefaultTypeInternal32 PROTOBUF_CONSTEXPR DrmVblankEventFtraceEventDefaultTypeInternal()
33 : _instance(::_pbi::ConstantInitialized{}) {}
~DrmVblankEventFtraceEventDefaultTypeInternalperfetto::protos::DrmVblankEventFtraceEventDefaultTypeInternal34 ~DrmVblankEventFtraceEventDefaultTypeInternal() {}
35 union { // NOLINT(misc-non-private-member-variables-in-classes)
36 DrmVblankEventFtraceEvent _instance;
37 };
38 };
39 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DrmVblankEventFtraceEventDefaultTypeInternal _DrmVblankEventFtraceEvent_default_instance_;
DrmVblankEventDeliveredFtraceEvent(::_pbi::ConstantInitialized)40 PROTOBUF_CONSTEXPR DrmVblankEventDeliveredFtraceEvent::DrmVblankEventDeliveredFtraceEvent(
41 ::_pbi::ConstantInitialized): _impl_{
42 /*decltype(_impl_._has_bits_)*/{}
43 , /*decltype(_impl_._cached_size_)*/{}
44 , /*decltype(_impl_.file_)*/::uint64_t{0u}
45 , /*decltype(_impl_.crtc_)*/0
46 , /*decltype(_impl_.seq_)*/0u} {}
47 struct DrmVblankEventDeliveredFtraceEventDefaultTypeInternal {
DrmVblankEventDeliveredFtraceEventDefaultTypeInternalperfetto::protos::DrmVblankEventDeliveredFtraceEventDefaultTypeInternal48 PROTOBUF_CONSTEXPR DrmVblankEventDeliveredFtraceEventDefaultTypeInternal()
49 : _instance(::_pbi::ConstantInitialized{}) {}
~DrmVblankEventDeliveredFtraceEventDefaultTypeInternalperfetto::protos::DrmVblankEventDeliveredFtraceEventDefaultTypeInternal50 ~DrmVblankEventDeliveredFtraceEventDefaultTypeInternal() {}
51 union { // NOLINT(misc-non-private-member-variables-in-classes)
52 DrmVblankEventDeliveredFtraceEvent _instance;
53 };
54 };
55 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DrmVblankEventDeliveredFtraceEventDefaultTypeInternal _DrmVblankEventDeliveredFtraceEvent_default_instance_;
56 } // namespace protos
57 } // namespace perfetto
58 namespace perfetto {
59 namespace protos {
60
61 // ===================================================================
62
63 class DrmVblankEventFtraceEvent::_Internal {
64 public:
65 using HasBits = decltype(std::declval<DrmVblankEventFtraceEvent>()._impl_._has_bits_);
set_has_crtc(HasBits * has_bits)66 static void set_has_crtc(HasBits* has_bits) {
67 (*has_bits)[0] |= 1u;
68 }
set_has_high_prec(HasBits * has_bits)69 static void set_has_high_prec(HasBits* has_bits) {
70 (*has_bits)[0] |= 2u;
71 }
set_has_seq(HasBits * has_bits)72 static void set_has_seq(HasBits* has_bits) {
73 (*has_bits)[0] |= 8u;
74 }
set_has_time(HasBits * has_bits)75 static void set_has_time(HasBits* has_bits) {
76 (*has_bits)[0] |= 4u;
77 }
78 };
79
DrmVblankEventFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)80 DrmVblankEventFtraceEvent::DrmVblankEventFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
81 bool is_message_owned)
82 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
83 SharedCtor(arena, is_message_owned);
84 // @@protoc_insertion_point(arena_constructor:perfetto.protos.DrmVblankEventFtraceEvent)
85 }
DrmVblankEventFtraceEvent(const DrmVblankEventFtraceEvent & from)86 DrmVblankEventFtraceEvent::DrmVblankEventFtraceEvent(const DrmVblankEventFtraceEvent& from)
87 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
88 DrmVblankEventFtraceEvent* const _this = this; (void)_this;
89 new (&_impl_) Impl_{
90 decltype(_impl_._has_bits_){from._impl_._has_bits_}
91 , /*decltype(_impl_._cached_size_)*/{}
92 , decltype(_impl_.crtc_){}
93 , decltype(_impl_.high_prec_){}
94 , decltype(_impl_.time_){}
95 , decltype(_impl_.seq_){}};
96
97 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
98 ::memcpy(&_impl_.crtc_, &from._impl_.crtc_,
99 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.seq_) -
100 reinterpret_cast<char*>(&_impl_.crtc_)) + sizeof(_impl_.seq_));
101 // @@protoc_insertion_point(copy_constructor:perfetto.protos.DrmVblankEventFtraceEvent)
102 }
103
SharedCtor(::_pb::Arena * arena,bool is_message_owned)104 inline void DrmVblankEventFtraceEvent::SharedCtor(
105 ::_pb::Arena* arena, bool is_message_owned) {
106 (void)arena;
107 (void)is_message_owned;
108 new (&_impl_) Impl_{
109 decltype(_impl_._has_bits_){}
110 , /*decltype(_impl_._cached_size_)*/{}
111 , decltype(_impl_.crtc_){0}
112 , decltype(_impl_.high_prec_){0u}
113 , decltype(_impl_.time_){::int64_t{0}}
114 , decltype(_impl_.seq_){0u}
115 };
116 }
117
~DrmVblankEventFtraceEvent()118 DrmVblankEventFtraceEvent::~DrmVblankEventFtraceEvent() {
119 // @@protoc_insertion_point(destructor:perfetto.protos.DrmVblankEventFtraceEvent)
120 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
121 (void)arena;
122 return;
123 }
124 SharedDtor();
125 }
126
SharedDtor()127 inline void DrmVblankEventFtraceEvent::SharedDtor() {
128 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
129 }
130
SetCachedSize(int size) const131 void DrmVblankEventFtraceEvent::SetCachedSize(int size) const {
132 _impl_._cached_size_.Set(size);
133 }
134
Clear()135 void DrmVblankEventFtraceEvent::Clear() {
136 // @@protoc_insertion_point(message_clear_start:perfetto.protos.DrmVblankEventFtraceEvent)
137 ::uint32_t cached_has_bits = 0;
138 // Prevent compiler warnings about cached_has_bits being unused
139 (void) cached_has_bits;
140
141 cached_has_bits = _impl_._has_bits_[0];
142 if (cached_has_bits & 0x0000000fu) {
143 ::memset(&_impl_.crtc_, 0, static_cast<size_t>(
144 reinterpret_cast<char*>(&_impl_.seq_) -
145 reinterpret_cast<char*>(&_impl_.crtc_)) + sizeof(_impl_.seq_));
146 }
147 _impl_._has_bits_.Clear();
148 _internal_metadata_.Clear<std::string>();
149 }
150
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)151 const char* DrmVblankEventFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
152 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
153 _Internal::HasBits has_bits{};
154 while (!ctx->Done(&ptr)) {
155 ::uint32_t tag;
156 ptr = ::_pbi::ReadTag(ptr, &tag);
157 switch (tag >> 3) {
158 // optional int32 crtc = 1;
159 case 1:
160 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
161 _Internal::set_has_crtc(&has_bits);
162 _impl_.crtc_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
163 CHK_(ptr);
164 } else {
165 goto handle_unusual;
166 }
167 continue;
168 // optional uint32 high_prec = 2;
169 case 2:
170 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
171 _Internal::set_has_high_prec(&has_bits);
172 _impl_.high_prec_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
173 CHK_(ptr);
174 } else {
175 goto handle_unusual;
176 }
177 continue;
178 // optional uint32 seq = 3;
179 case 3:
180 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
181 _Internal::set_has_seq(&has_bits);
182 _impl_.seq_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
183 CHK_(ptr);
184 } else {
185 goto handle_unusual;
186 }
187 continue;
188 // optional int64 time = 4;
189 case 4:
190 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
191 _Internal::set_has_time(&has_bits);
192 _impl_.time_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
193 CHK_(ptr);
194 } else {
195 goto handle_unusual;
196 }
197 continue;
198 default:
199 goto handle_unusual;
200 } // switch
201 handle_unusual:
202 if ((tag == 0) || ((tag & 7) == 4)) {
203 CHK_(ptr);
204 ctx->SetLastTag(tag);
205 goto message_done;
206 }
207 ptr = UnknownFieldParse(
208 tag,
209 _internal_metadata_.mutable_unknown_fields<std::string>(),
210 ptr, ctx);
211 CHK_(ptr != nullptr);
212 } // while
213 message_done:
214 _impl_._has_bits_.Or(has_bits);
215 return ptr;
216 failure:
217 ptr = nullptr;
218 goto message_done;
219 #undef CHK_
220 }
221
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const222 ::uint8_t* DrmVblankEventFtraceEvent::_InternalSerialize(
223 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
224 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.DrmVblankEventFtraceEvent)
225 ::uint32_t cached_has_bits = 0;
226 (void) cached_has_bits;
227
228 cached_has_bits = _impl_._has_bits_[0];
229 // optional int32 crtc = 1;
230 if (cached_has_bits & 0x00000001u) {
231 target = stream->EnsureSpace(target);
232 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_crtc(), target);
233 }
234
235 // optional uint32 high_prec = 2;
236 if (cached_has_bits & 0x00000002u) {
237 target = stream->EnsureSpace(target);
238 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_high_prec(), target);
239 }
240
241 // optional uint32 seq = 3;
242 if (cached_has_bits & 0x00000008u) {
243 target = stream->EnsureSpace(target);
244 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_seq(), target);
245 }
246
247 // optional int64 time = 4;
248 if (cached_has_bits & 0x00000004u) {
249 target = stream->EnsureSpace(target);
250 target = ::_pbi::WireFormatLite::WriteInt64ToArray(4, this->_internal_time(), target);
251 }
252
253 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
254 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
255 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
256 }
257 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.DrmVblankEventFtraceEvent)
258 return target;
259 }
260
ByteSizeLong() const261 size_t DrmVblankEventFtraceEvent::ByteSizeLong() const {
262 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.DrmVblankEventFtraceEvent)
263 size_t total_size = 0;
264
265 ::uint32_t cached_has_bits = 0;
266 // Prevent compiler warnings about cached_has_bits being unused
267 (void) cached_has_bits;
268
269 cached_has_bits = _impl_._has_bits_[0];
270 if (cached_has_bits & 0x0000000fu) {
271 // optional int32 crtc = 1;
272 if (cached_has_bits & 0x00000001u) {
273 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_crtc());
274 }
275
276 // optional uint32 high_prec = 2;
277 if (cached_has_bits & 0x00000002u) {
278 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_high_prec());
279 }
280
281 // optional int64 time = 4;
282 if (cached_has_bits & 0x00000004u) {
283 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_time());
284 }
285
286 // optional uint32 seq = 3;
287 if (cached_has_bits & 0x00000008u) {
288 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_seq());
289 }
290
291 }
292 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
293 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
294 }
295 int cached_size = ::_pbi::ToCachedSize(total_size);
296 SetCachedSize(cached_size);
297 return total_size;
298 }
299
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)300 void DrmVblankEventFtraceEvent::CheckTypeAndMergeFrom(
301 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
302 MergeFrom(*::_pbi::DownCast<const DrmVblankEventFtraceEvent*>(
303 &from));
304 }
305
MergeFrom(const DrmVblankEventFtraceEvent & from)306 void DrmVblankEventFtraceEvent::MergeFrom(const DrmVblankEventFtraceEvent& from) {
307 DrmVblankEventFtraceEvent* const _this = this;
308 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.DrmVblankEventFtraceEvent)
309 GOOGLE_DCHECK_NE(&from, _this);
310 ::uint32_t cached_has_bits = 0;
311 (void) cached_has_bits;
312
313 cached_has_bits = from._impl_._has_bits_[0];
314 if (cached_has_bits & 0x0000000fu) {
315 if (cached_has_bits & 0x00000001u) {
316 _this->_impl_.crtc_ = from._impl_.crtc_;
317 }
318 if (cached_has_bits & 0x00000002u) {
319 _this->_impl_.high_prec_ = from._impl_.high_prec_;
320 }
321 if (cached_has_bits & 0x00000004u) {
322 _this->_impl_.time_ = from._impl_.time_;
323 }
324 if (cached_has_bits & 0x00000008u) {
325 _this->_impl_.seq_ = from._impl_.seq_;
326 }
327 _this->_impl_._has_bits_[0] |= cached_has_bits;
328 }
329 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
330 }
331
CopyFrom(const DrmVblankEventFtraceEvent & from)332 void DrmVblankEventFtraceEvent::CopyFrom(const DrmVblankEventFtraceEvent& from) {
333 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.DrmVblankEventFtraceEvent)
334 if (&from == this) return;
335 Clear();
336 MergeFrom(from);
337 }
338
IsInitialized() const339 bool DrmVblankEventFtraceEvent::IsInitialized() const {
340 return true;
341 }
342
InternalSwap(DrmVblankEventFtraceEvent * other)343 void DrmVblankEventFtraceEvent::InternalSwap(DrmVblankEventFtraceEvent* other) {
344 using std::swap;
345 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
346 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
347 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
348 PROTOBUF_FIELD_OFFSET(DrmVblankEventFtraceEvent, _impl_.seq_)
349 + sizeof(DrmVblankEventFtraceEvent::_impl_.seq_) // NOLINT
350 - PROTOBUF_FIELD_OFFSET(DrmVblankEventFtraceEvent, _impl_.crtc_)>(
351 reinterpret_cast<char*>(&_impl_.crtc_),
352 reinterpret_cast<char*>(&other->_impl_.crtc_));
353 }
354
GetTypeName() const355 std::string DrmVblankEventFtraceEvent::GetTypeName() const {
356 return "perfetto.protos.DrmVblankEventFtraceEvent";
357 }
358
359
360 // ===================================================================
361
362 class DrmVblankEventDeliveredFtraceEvent::_Internal {
363 public:
364 using HasBits = decltype(std::declval<DrmVblankEventDeliveredFtraceEvent>()._impl_._has_bits_);
set_has_crtc(HasBits * has_bits)365 static void set_has_crtc(HasBits* has_bits) {
366 (*has_bits)[0] |= 2u;
367 }
set_has_file(HasBits * has_bits)368 static void set_has_file(HasBits* has_bits) {
369 (*has_bits)[0] |= 1u;
370 }
set_has_seq(HasBits * has_bits)371 static void set_has_seq(HasBits* has_bits) {
372 (*has_bits)[0] |= 4u;
373 }
374 };
375
DrmVblankEventDeliveredFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)376 DrmVblankEventDeliveredFtraceEvent::DrmVblankEventDeliveredFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
377 bool is_message_owned)
378 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
379 SharedCtor(arena, is_message_owned);
380 // @@protoc_insertion_point(arena_constructor:perfetto.protos.DrmVblankEventDeliveredFtraceEvent)
381 }
DrmVblankEventDeliveredFtraceEvent(const DrmVblankEventDeliveredFtraceEvent & from)382 DrmVblankEventDeliveredFtraceEvent::DrmVblankEventDeliveredFtraceEvent(const DrmVblankEventDeliveredFtraceEvent& from)
383 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
384 DrmVblankEventDeliveredFtraceEvent* const _this = this; (void)_this;
385 new (&_impl_) Impl_{
386 decltype(_impl_._has_bits_){from._impl_._has_bits_}
387 , /*decltype(_impl_._cached_size_)*/{}
388 , decltype(_impl_.file_){}
389 , decltype(_impl_.crtc_){}
390 , decltype(_impl_.seq_){}};
391
392 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
393 ::memcpy(&_impl_.file_, &from._impl_.file_,
394 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.seq_) -
395 reinterpret_cast<char*>(&_impl_.file_)) + sizeof(_impl_.seq_));
396 // @@protoc_insertion_point(copy_constructor:perfetto.protos.DrmVblankEventDeliveredFtraceEvent)
397 }
398
SharedCtor(::_pb::Arena * arena,bool is_message_owned)399 inline void DrmVblankEventDeliveredFtraceEvent::SharedCtor(
400 ::_pb::Arena* arena, bool is_message_owned) {
401 (void)arena;
402 (void)is_message_owned;
403 new (&_impl_) Impl_{
404 decltype(_impl_._has_bits_){}
405 , /*decltype(_impl_._cached_size_)*/{}
406 , decltype(_impl_.file_){::uint64_t{0u}}
407 , decltype(_impl_.crtc_){0}
408 , decltype(_impl_.seq_){0u}
409 };
410 }
411
~DrmVblankEventDeliveredFtraceEvent()412 DrmVblankEventDeliveredFtraceEvent::~DrmVblankEventDeliveredFtraceEvent() {
413 // @@protoc_insertion_point(destructor:perfetto.protos.DrmVblankEventDeliveredFtraceEvent)
414 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
415 (void)arena;
416 return;
417 }
418 SharedDtor();
419 }
420
SharedDtor()421 inline void DrmVblankEventDeliveredFtraceEvent::SharedDtor() {
422 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
423 }
424
SetCachedSize(int size) const425 void DrmVblankEventDeliveredFtraceEvent::SetCachedSize(int size) const {
426 _impl_._cached_size_.Set(size);
427 }
428
Clear()429 void DrmVblankEventDeliveredFtraceEvent::Clear() {
430 // @@protoc_insertion_point(message_clear_start:perfetto.protos.DrmVblankEventDeliveredFtraceEvent)
431 ::uint32_t cached_has_bits = 0;
432 // Prevent compiler warnings about cached_has_bits being unused
433 (void) cached_has_bits;
434
435 cached_has_bits = _impl_._has_bits_[0];
436 if (cached_has_bits & 0x00000007u) {
437 ::memset(&_impl_.file_, 0, static_cast<size_t>(
438 reinterpret_cast<char*>(&_impl_.seq_) -
439 reinterpret_cast<char*>(&_impl_.file_)) + sizeof(_impl_.seq_));
440 }
441 _impl_._has_bits_.Clear();
442 _internal_metadata_.Clear<std::string>();
443 }
444
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)445 const char* DrmVblankEventDeliveredFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
446 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
447 _Internal::HasBits has_bits{};
448 while (!ctx->Done(&ptr)) {
449 ::uint32_t tag;
450 ptr = ::_pbi::ReadTag(ptr, &tag);
451 switch (tag >> 3) {
452 // optional int32 crtc = 1;
453 case 1:
454 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
455 _Internal::set_has_crtc(&has_bits);
456 _impl_.crtc_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
457 CHK_(ptr);
458 } else {
459 goto handle_unusual;
460 }
461 continue;
462 // optional uint64 file = 2;
463 case 2:
464 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
465 _Internal::set_has_file(&has_bits);
466 _impl_.file_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
467 CHK_(ptr);
468 } else {
469 goto handle_unusual;
470 }
471 continue;
472 // optional uint32 seq = 3;
473 case 3:
474 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
475 _Internal::set_has_seq(&has_bits);
476 _impl_.seq_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
477 CHK_(ptr);
478 } else {
479 goto handle_unusual;
480 }
481 continue;
482 default:
483 goto handle_unusual;
484 } // switch
485 handle_unusual:
486 if ((tag == 0) || ((tag & 7) == 4)) {
487 CHK_(ptr);
488 ctx->SetLastTag(tag);
489 goto message_done;
490 }
491 ptr = UnknownFieldParse(
492 tag,
493 _internal_metadata_.mutable_unknown_fields<std::string>(),
494 ptr, ctx);
495 CHK_(ptr != nullptr);
496 } // while
497 message_done:
498 _impl_._has_bits_.Or(has_bits);
499 return ptr;
500 failure:
501 ptr = nullptr;
502 goto message_done;
503 #undef CHK_
504 }
505
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const506 ::uint8_t* DrmVblankEventDeliveredFtraceEvent::_InternalSerialize(
507 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
508 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.DrmVblankEventDeliveredFtraceEvent)
509 ::uint32_t cached_has_bits = 0;
510 (void) cached_has_bits;
511
512 cached_has_bits = _impl_._has_bits_[0];
513 // optional int32 crtc = 1;
514 if (cached_has_bits & 0x00000002u) {
515 target = stream->EnsureSpace(target);
516 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_crtc(), target);
517 }
518
519 // optional uint64 file = 2;
520 if (cached_has_bits & 0x00000001u) {
521 target = stream->EnsureSpace(target);
522 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_file(), target);
523 }
524
525 // optional uint32 seq = 3;
526 if (cached_has_bits & 0x00000004u) {
527 target = stream->EnsureSpace(target);
528 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_seq(), target);
529 }
530
531 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
532 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
533 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
534 }
535 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.DrmVblankEventDeliveredFtraceEvent)
536 return target;
537 }
538
ByteSizeLong() const539 size_t DrmVblankEventDeliveredFtraceEvent::ByteSizeLong() const {
540 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.DrmVblankEventDeliveredFtraceEvent)
541 size_t total_size = 0;
542
543 ::uint32_t cached_has_bits = 0;
544 // Prevent compiler warnings about cached_has_bits being unused
545 (void) cached_has_bits;
546
547 cached_has_bits = _impl_._has_bits_[0];
548 if (cached_has_bits & 0x00000007u) {
549 // optional uint64 file = 2;
550 if (cached_has_bits & 0x00000001u) {
551 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_file());
552 }
553
554 // optional int32 crtc = 1;
555 if (cached_has_bits & 0x00000002u) {
556 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_crtc());
557 }
558
559 // optional uint32 seq = 3;
560 if (cached_has_bits & 0x00000004u) {
561 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_seq());
562 }
563
564 }
565 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
566 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
567 }
568 int cached_size = ::_pbi::ToCachedSize(total_size);
569 SetCachedSize(cached_size);
570 return total_size;
571 }
572
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)573 void DrmVblankEventDeliveredFtraceEvent::CheckTypeAndMergeFrom(
574 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
575 MergeFrom(*::_pbi::DownCast<const DrmVblankEventDeliveredFtraceEvent*>(
576 &from));
577 }
578
MergeFrom(const DrmVblankEventDeliveredFtraceEvent & from)579 void DrmVblankEventDeliveredFtraceEvent::MergeFrom(const DrmVblankEventDeliveredFtraceEvent& from) {
580 DrmVblankEventDeliveredFtraceEvent* const _this = this;
581 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.DrmVblankEventDeliveredFtraceEvent)
582 GOOGLE_DCHECK_NE(&from, _this);
583 ::uint32_t cached_has_bits = 0;
584 (void) cached_has_bits;
585
586 cached_has_bits = from._impl_._has_bits_[0];
587 if (cached_has_bits & 0x00000007u) {
588 if (cached_has_bits & 0x00000001u) {
589 _this->_impl_.file_ = from._impl_.file_;
590 }
591 if (cached_has_bits & 0x00000002u) {
592 _this->_impl_.crtc_ = from._impl_.crtc_;
593 }
594 if (cached_has_bits & 0x00000004u) {
595 _this->_impl_.seq_ = from._impl_.seq_;
596 }
597 _this->_impl_._has_bits_[0] |= cached_has_bits;
598 }
599 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
600 }
601
CopyFrom(const DrmVblankEventDeliveredFtraceEvent & from)602 void DrmVblankEventDeliveredFtraceEvent::CopyFrom(const DrmVblankEventDeliveredFtraceEvent& from) {
603 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.DrmVblankEventDeliveredFtraceEvent)
604 if (&from == this) return;
605 Clear();
606 MergeFrom(from);
607 }
608
IsInitialized() const609 bool DrmVblankEventDeliveredFtraceEvent::IsInitialized() const {
610 return true;
611 }
612
InternalSwap(DrmVblankEventDeliveredFtraceEvent * other)613 void DrmVblankEventDeliveredFtraceEvent::InternalSwap(DrmVblankEventDeliveredFtraceEvent* other) {
614 using std::swap;
615 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
616 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
617 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
618 PROTOBUF_FIELD_OFFSET(DrmVblankEventDeliveredFtraceEvent, _impl_.seq_)
619 + sizeof(DrmVblankEventDeliveredFtraceEvent::_impl_.seq_) // NOLINT
620 - PROTOBUF_FIELD_OFFSET(DrmVblankEventDeliveredFtraceEvent, _impl_.file_)>(
621 reinterpret_cast<char*>(&_impl_.file_),
622 reinterpret_cast<char*>(&other->_impl_.file_));
623 }
624
GetTypeName() const625 std::string DrmVblankEventDeliveredFtraceEvent::GetTypeName() const {
626 return "perfetto.protos.DrmVblankEventDeliveredFtraceEvent";
627 }
628
629
630 // @@protoc_insertion_point(namespace_scope)
631 } // namespace protos
632 } // namespace perfetto
633 PROTOBUF_NAMESPACE_OPEN
634 template<> PROTOBUF_NOINLINE ::perfetto::protos::DrmVblankEventFtraceEvent*
CreateMaybeMessage(Arena * arena)635 Arena::CreateMaybeMessage< ::perfetto::protos::DrmVblankEventFtraceEvent >(Arena* arena) {
636 return Arena::CreateMessageInternal< ::perfetto::protos::DrmVblankEventFtraceEvent >(arena);
637 }
638 template<> PROTOBUF_NOINLINE ::perfetto::protos::DrmVblankEventDeliveredFtraceEvent*
CreateMaybeMessage(Arena * arena)639 Arena::CreateMaybeMessage< ::perfetto::protos::DrmVblankEventDeliveredFtraceEvent >(Arena* arena) {
640 return Arena::CreateMessageInternal< ::perfetto::protos::DrmVblankEventDeliveredFtraceEvent >(arena);
641 }
642 PROTOBUF_NAMESPACE_CLOSE
643
644 // @@protoc_insertion_point(global_scope)
645 #include <google/protobuf/port_undef.inc>
646