1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/ftrace/virtio_video.proto
3
4 #include "protos/perfetto/trace/ftrace/virtio_video.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 {
VirtioVideoCmdFtraceEvent(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR VirtioVideoCmdFtraceEvent::VirtioVideoCmdFtraceEvent(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.stream_id_)*/0u
28 , /*decltype(_impl_.type_)*/0u} {}
29 struct VirtioVideoCmdFtraceEventDefaultTypeInternal {
VirtioVideoCmdFtraceEventDefaultTypeInternalperfetto::protos::VirtioVideoCmdFtraceEventDefaultTypeInternal30 PROTOBUF_CONSTEXPR VirtioVideoCmdFtraceEventDefaultTypeInternal()
31 : _instance(::_pbi::ConstantInitialized{}) {}
~VirtioVideoCmdFtraceEventDefaultTypeInternalperfetto::protos::VirtioVideoCmdFtraceEventDefaultTypeInternal32 ~VirtioVideoCmdFtraceEventDefaultTypeInternal() {}
33 union { // NOLINT(misc-non-private-member-variables-in-classes)
34 VirtioVideoCmdFtraceEvent _instance;
35 };
36 };
37 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VirtioVideoCmdFtraceEventDefaultTypeInternal _VirtioVideoCmdFtraceEvent_default_instance_;
VirtioVideoCmdDoneFtraceEvent(::_pbi::ConstantInitialized)38 PROTOBUF_CONSTEXPR VirtioVideoCmdDoneFtraceEvent::VirtioVideoCmdDoneFtraceEvent(
39 ::_pbi::ConstantInitialized): _impl_{
40 /*decltype(_impl_._has_bits_)*/{}
41 , /*decltype(_impl_._cached_size_)*/{}
42 , /*decltype(_impl_.stream_id_)*/0u
43 , /*decltype(_impl_.type_)*/0u} {}
44 struct VirtioVideoCmdDoneFtraceEventDefaultTypeInternal {
VirtioVideoCmdDoneFtraceEventDefaultTypeInternalperfetto::protos::VirtioVideoCmdDoneFtraceEventDefaultTypeInternal45 PROTOBUF_CONSTEXPR VirtioVideoCmdDoneFtraceEventDefaultTypeInternal()
46 : _instance(::_pbi::ConstantInitialized{}) {}
~VirtioVideoCmdDoneFtraceEventDefaultTypeInternalperfetto::protos::VirtioVideoCmdDoneFtraceEventDefaultTypeInternal47 ~VirtioVideoCmdDoneFtraceEventDefaultTypeInternal() {}
48 union { // NOLINT(misc-non-private-member-variables-in-classes)
49 VirtioVideoCmdDoneFtraceEvent _instance;
50 };
51 };
52 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VirtioVideoCmdDoneFtraceEventDefaultTypeInternal _VirtioVideoCmdDoneFtraceEvent_default_instance_;
VirtioVideoResourceQueueFtraceEvent(::_pbi::ConstantInitialized)53 PROTOBUF_CONSTEXPR VirtioVideoResourceQueueFtraceEvent::VirtioVideoResourceQueueFtraceEvent(
54 ::_pbi::ConstantInitialized): _impl_{
55 /*decltype(_impl_._has_bits_)*/{}
56 , /*decltype(_impl_._cached_size_)*/{}
57 , /*decltype(_impl_.data_size0_)*/0u
58 , /*decltype(_impl_.data_size1_)*/0u
59 , /*decltype(_impl_.data_size2_)*/0u
60 , /*decltype(_impl_.data_size3_)*/0u
61 , /*decltype(_impl_.queue_type_)*/0u
62 , /*decltype(_impl_.resource_id_)*/0
63 , /*decltype(_impl_.timestamp_)*/::uint64_t{0u}
64 , /*decltype(_impl_.stream_id_)*/0} {}
65 struct VirtioVideoResourceQueueFtraceEventDefaultTypeInternal {
VirtioVideoResourceQueueFtraceEventDefaultTypeInternalperfetto::protos::VirtioVideoResourceQueueFtraceEventDefaultTypeInternal66 PROTOBUF_CONSTEXPR VirtioVideoResourceQueueFtraceEventDefaultTypeInternal()
67 : _instance(::_pbi::ConstantInitialized{}) {}
~VirtioVideoResourceQueueFtraceEventDefaultTypeInternalperfetto::protos::VirtioVideoResourceQueueFtraceEventDefaultTypeInternal68 ~VirtioVideoResourceQueueFtraceEventDefaultTypeInternal() {}
69 union { // NOLINT(misc-non-private-member-variables-in-classes)
70 VirtioVideoResourceQueueFtraceEvent _instance;
71 };
72 };
73 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VirtioVideoResourceQueueFtraceEventDefaultTypeInternal _VirtioVideoResourceQueueFtraceEvent_default_instance_;
VirtioVideoResourceQueueDoneFtraceEvent(::_pbi::ConstantInitialized)74 PROTOBUF_CONSTEXPR VirtioVideoResourceQueueDoneFtraceEvent::VirtioVideoResourceQueueDoneFtraceEvent(
75 ::_pbi::ConstantInitialized): _impl_{
76 /*decltype(_impl_._has_bits_)*/{}
77 , /*decltype(_impl_._cached_size_)*/{}
78 , /*decltype(_impl_.data_size0_)*/0u
79 , /*decltype(_impl_.data_size1_)*/0u
80 , /*decltype(_impl_.data_size2_)*/0u
81 , /*decltype(_impl_.data_size3_)*/0u
82 , /*decltype(_impl_.queue_type_)*/0u
83 , /*decltype(_impl_.resource_id_)*/0
84 , /*decltype(_impl_.timestamp_)*/::uint64_t{0u}
85 , /*decltype(_impl_.stream_id_)*/0} {}
86 struct VirtioVideoResourceQueueDoneFtraceEventDefaultTypeInternal {
VirtioVideoResourceQueueDoneFtraceEventDefaultTypeInternalperfetto::protos::VirtioVideoResourceQueueDoneFtraceEventDefaultTypeInternal87 PROTOBUF_CONSTEXPR VirtioVideoResourceQueueDoneFtraceEventDefaultTypeInternal()
88 : _instance(::_pbi::ConstantInitialized{}) {}
~VirtioVideoResourceQueueDoneFtraceEventDefaultTypeInternalperfetto::protos::VirtioVideoResourceQueueDoneFtraceEventDefaultTypeInternal89 ~VirtioVideoResourceQueueDoneFtraceEventDefaultTypeInternal() {}
90 union { // NOLINT(misc-non-private-member-variables-in-classes)
91 VirtioVideoResourceQueueDoneFtraceEvent _instance;
92 };
93 };
94 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VirtioVideoResourceQueueDoneFtraceEventDefaultTypeInternal _VirtioVideoResourceQueueDoneFtraceEvent_default_instance_;
95 } // namespace protos
96 } // namespace perfetto
97 namespace perfetto {
98 namespace protos {
99
100 // ===================================================================
101
102 class VirtioVideoCmdFtraceEvent::_Internal {
103 public:
104 using HasBits = decltype(std::declval<VirtioVideoCmdFtraceEvent>()._impl_._has_bits_);
set_has_stream_id(HasBits * has_bits)105 static void set_has_stream_id(HasBits* has_bits) {
106 (*has_bits)[0] |= 1u;
107 }
set_has_type(HasBits * has_bits)108 static void set_has_type(HasBits* has_bits) {
109 (*has_bits)[0] |= 2u;
110 }
111 };
112
VirtioVideoCmdFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)113 VirtioVideoCmdFtraceEvent::VirtioVideoCmdFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
114 bool is_message_owned)
115 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
116 SharedCtor(arena, is_message_owned);
117 // @@protoc_insertion_point(arena_constructor:perfetto.protos.VirtioVideoCmdFtraceEvent)
118 }
VirtioVideoCmdFtraceEvent(const VirtioVideoCmdFtraceEvent & from)119 VirtioVideoCmdFtraceEvent::VirtioVideoCmdFtraceEvent(const VirtioVideoCmdFtraceEvent& from)
120 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
121 VirtioVideoCmdFtraceEvent* const _this = this; (void)_this;
122 new (&_impl_) Impl_{
123 decltype(_impl_._has_bits_){from._impl_._has_bits_}
124 , /*decltype(_impl_._cached_size_)*/{}
125 , decltype(_impl_.stream_id_){}
126 , decltype(_impl_.type_){}};
127
128 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
129 ::memcpy(&_impl_.stream_id_, &from._impl_.stream_id_,
130 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.type_) -
131 reinterpret_cast<char*>(&_impl_.stream_id_)) + sizeof(_impl_.type_));
132 // @@protoc_insertion_point(copy_constructor:perfetto.protos.VirtioVideoCmdFtraceEvent)
133 }
134
SharedCtor(::_pb::Arena * arena,bool is_message_owned)135 inline void VirtioVideoCmdFtraceEvent::SharedCtor(
136 ::_pb::Arena* arena, bool is_message_owned) {
137 (void)arena;
138 (void)is_message_owned;
139 new (&_impl_) Impl_{
140 decltype(_impl_._has_bits_){}
141 , /*decltype(_impl_._cached_size_)*/{}
142 , decltype(_impl_.stream_id_){0u}
143 , decltype(_impl_.type_){0u}
144 };
145 }
146
~VirtioVideoCmdFtraceEvent()147 VirtioVideoCmdFtraceEvent::~VirtioVideoCmdFtraceEvent() {
148 // @@protoc_insertion_point(destructor:perfetto.protos.VirtioVideoCmdFtraceEvent)
149 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
150 (void)arena;
151 return;
152 }
153 SharedDtor();
154 }
155
SharedDtor()156 inline void VirtioVideoCmdFtraceEvent::SharedDtor() {
157 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
158 }
159
SetCachedSize(int size) const160 void VirtioVideoCmdFtraceEvent::SetCachedSize(int size) const {
161 _impl_._cached_size_.Set(size);
162 }
163
Clear()164 void VirtioVideoCmdFtraceEvent::Clear() {
165 // @@protoc_insertion_point(message_clear_start:perfetto.protos.VirtioVideoCmdFtraceEvent)
166 ::uint32_t cached_has_bits = 0;
167 // Prevent compiler warnings about cached_has_bits being unused
168 (void) cached_has_bits;
169
170 cached_has_bits = _impl_._has_bits_[0];
171 if (cached_has_bits & 0x00000003u) {
172 ::memset(&_impl_.stream_id_, 0, static_cast<size_t>(
173 reinterpret_cast<char*>(&_impl_.type_) -
174 reinterpret_cast<char*>(&_impl_.stream_id_)) + sizeof(_impl_.type_));
175 }
176 _impl_._has_bits_.Clear();
177 _internal_metadata_.Clear<std::string>();
178 }
179
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)180 const char* VirtioVideoCmdFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
181 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
182 _Internal::HasBits has_bits{};
183 while (!ctx->Done(&ptr)) {
184 ::uint32_t tag;
185 ptr = ::_pbi::ReadTag(ptr, &tag);
186 switch (tag >> 3) {
187 // optional uint32 stream_id = 1;
188 case 1:
189 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
190 _Internal::set_has_stream_id(&has_bits);
191 _impl_.stream_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
192 CHK_(ptr);
193 } else {
194 goto handle_unusual;
195 }
196 continue;
197 // optional uint32 type = 2;
198 case 2:
199 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
200 _Internal::set_has_type(&has_bits);
201 _impl_.type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
202 CHK_(ptr);
203 } else {
204 goto handle_unusual;
205 }
206 continue;
207 default:
208 goto handle_unusual;
209 } // switch
210 handle_unusual:
211 if ((tag == 0) || ((tag & 7) == 4)) {
212 CHK_(ptr);
213 ctx->SetLastTag(tag);
214 goto message_done;
215 }
216 ptr = UnknownFieldParse(
217 tag,
218 _internal_metadata_.mutable_unknown_fields<std::string>(),
219 ptr, ctx);
220 CHK_(ptr != nullptr);
221 } // while
222 message_done:
223 _impl_._has_bits_.Or(has_bits);
224 return ptr;
225 failure:
226 ptr = nullptr;
227 goto message_done;
228 #undef CHK_
229 }
230
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const231 ::uint8_t* VirtioVideoCmdFtraceEvent::_InternalSerialize(
232 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
233 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.VirtioVideoCmdFtraceEvent)
234 ::uint32_t cached_has_bits = 0;
235 (void) cached_has_bits;
236
237 cached_has_bits = _impl_._has_bits_[0];
238 // optional uint32 stream_id = 1;
239 if (cached_has_bits & 0x00000001u) {
240 target = stream->EnsureSpace(target);
241 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_stream_id(), target);
242 }
243
244 // optional uint32 type = 2;
245 if (cached_has_bits & 0x00000002u) {
246 target = stream->EnsureSpace(target);
247 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_type(), target);
248 }
249
250 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
251 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
252 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
253 }
254 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.VirtioVideoCmdFtraceEvent)
255 return target;
256 }
257
ByteSizeLong() const258 size_t VirtioVideoCmdFtraceEvent::ByteSizeLong() const {
259 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.VirtioVideoCmdFtraceEvent)
260 size_t total_size = 0;
261
262 ::uint32_t cached_has_bits = 0;
263 // Prevent compiler warnings about cached_has_bits being unused
264 (void) cached_has_bits;
265
266 cached_has_bits = _impl_._has_bits_[0];
267 if (cached_has_bits & 0x00000003u) {
268 // optional uint32 stream_id = 1;
269 if (cached_has_bits & 0x00000001u) {
270 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_stream_id());
271 }
272
273 // optional uint32 type = 2;
274 if (cached_has_bits & 0x00000002u) {
275 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_type());
276 }
277
278 }
279 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
280 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
281 }
282 int cached_size = ::_pbi::ToCachedSize(total_size);
283 SetCachedSize(cached_size);
284 return total_size;
285 }
286
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)287 void VirtioVideoCmdFtraceEvent::CheckTypeAndMergeFrom(
288 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
289 MergeFrom(*::_pbi::DownCast<const VirtioVideoCmdFtraceEvent*>(
290 &from));
291 }
292
MergeFrom(const VirtioVideoCmdFtraceEvent & from)293 void VirtioVideoCmdFtraceEvent::MergeFrom(const VirtioVideoCmdFtraceEvent& from) {
294 VirtioVideoCmdFtraceEvent* const _this = this;
295 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.VirtioVideoCmdFtraceEvent)
296 GOOGLE_DCHECK_NE(&from, _this);
297 ::uint32_t cached_has_bits = 0;
298 (void) cached_has_bits;
299
300 cached_has_bits = from._impl_._has_bits_[0];
301 if (cached_has_bits & 0x00000003u) {
302 if (cached_has_bits & 0x00000001u) {
303 _this->_impl_.stream_id_ = from._impl_.stream_id_;
304 }
305 if (cached_has_bits & 0x00000002u) {
306 _this->_impl_.type_ = from._impl_.type_;
307 }
308 _this->_impl_._has_bits_[0] |= cached_has_bits;
309 }
310 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
311 }
312
CopyFrom(const VirtioVideoCmdFtraceEvent & from)313 void VirtioVideoCmdFtraceEvent::CopyFrom(const VirtioVideoCmdFtraceEvent& from) {
314 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.VirtioVideoCmdFtraceEvent)
315 if (&from == this) return;
316 Clear();
317 MergeFrom(from);
318 }
319
IsInitialized() const320 bool VirtioVideoCmdFtraceEvent::IsInitialized() const {
321 return true;
322 }
323
InternalSwap(VirtioVideoCmdFtraceEvent * other)324 void VirtioVideoCmdFtraceEvent::InternalSwap(VirtioVideoCmdFtraceEvent* other) {
325 using std::swap;
326 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
327 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
328 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
329 PROTOBUF_FIELD_OFFSET(VirtioVideoCmdFtraceEvent, _impl_.type_)
330 + sizeof(VirtioVideoCmdFtraceEvent::_impl_.type_) // NOLINT
331 - PROTOBUF_FIELD_OFFSET(VirtioVideoCmdFtraceEvent, _impl_.stream_id_)>(
332 reinterpret_cast<char*>(&_impl_.stream_id_),
333 reinterpret_cast<char*>(&other->_impl_.stream_id_));
334 }
335
GetTypeName() const336 std::string VirtioVideoCmdFtraceEvent::GetTypeName() const {
337 return "perfetto.protos.VirtioVideoCmdFtraceEvent";
338 }
339
340
341 // ===================================================================
342
343 class VirtioVideoCmdDoneFtraceEvent::_Internal {
344 public:
345 using HasBits = decltype(std::declval<VirtioVideoCmdDoneFtraceEvent>()._impl_._has_bits_);
set_has_stream_id(HasBits * has_bits)346 static void set_has_stream_id(HasBits* has_bits) {
347 (*has_bits)[0] |= 1u;
348 }
set_has_type(HasBits * has_bits)349 static void set_has_type(HasBits* has_bits) {
350 (*has_bits)[0] |= 2u;
351 }
352 };
353
VirtioVideoCmdDoneFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)354 VirtioVideoCmdDoneFtraceEvent::VirtioVideoCmdDoneFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
355 bool is_message_owned)
356 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
357 SharedCtor(arena, is_message_owned);
358 // @@protoc_insertion_point(arena_constructor:perfetto.protos.VirtioVideoCmdDoneFtraceEvent)
359 }
VirtioVideoCmdDoneFtraceEvent(const VirtioVideoCmdDoneFtraceEvent & from)360 VirtioVideoCmdDoneFtraceEvent::VirtioVideoCmdDoneFtraceEvent(const VirtioVideoCmdDoneFtraceEvent& from)
361 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
362 VirtioVideoCmdDoneFtraceEvent* const _this = this; (void)_this;
363 new (&_impl_) Impl_{
364 decltype(_impl_._has_bits_){from._impl_._has_bits_}
365 , /*decltype(_impl_._cached_size_)*/{}
366 , decltype(_impl_.stream_id_){}
367 , decltype(_impl_.type_){}};
368
369 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
370 ::memcpy(&_impl_.stream_id_, &from._impl_.stream_id_,
371 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.type_) -
372 reinterpret_cast<char*>(&_impl_.stream_id_)) + sizeof(_impl_.type_));
373 // @@protoc_insertion_point(copy_constructor:perfetto.protos.VirtioVideoCmdDoneFtraceEvent)
374 }
375
SharedCtor(::_pb::Arena * arena,bool is_message_owned)376 inline void VirtioVideoCmdDoneFtraceEvent::SharedCtor(
377 ::_pb::Arena* arena, bool is_message_owned) {
378 (void)arena;
379 (void)is_message_owned;
380 new (&_impl_) Impl_{
381 decltype(_impl_._has_bits_){}
382 , /*decltype(_impl_._cached_size_)*/{}
383 , decltype(_impl_.stream_id_){0u}
384 , decltype(_impl_.type_){0u}
385 };
386 }
387
~VirtioVideoCmdDoneFtraceEvent()388 VirtioVideoCmdDoneFtraceEvent::~VirtioVideoCmdDoneFtraceEvent() {
389 // @@protoc_insertion_point(destructor:perfetto.protos.VirtioVideoCmdDoneFtraceEvent)
390 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
391 (void)arena;
392 return;
393 }
394 SharedDtor();
395 }
396
SharedDtor()397 inline void VirtioVideoCmdDoneFtraceEvent::SharedDtor() {
398 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
399 }
400
SetCachedSize(int size) const401 void VirtioVideoCmdDoneFtraceEvent::SetCachedSize(int size) const {
402 _impl_._cached_size_.Set(size);
403 }
404
Clear()405 void VirtioVideoCmdDoneFtraceEvent::Clear() {
406 // @@protoc_insertion_point(message_clear_start:perfetto.protos.VirtioVideoCmdDoneFtraceEvent)
407 ::uint32_t cached_has_bits = 0;
408 // Prevent compiler warnings about cached_has_bits being unused
409 (void) cached_has_bits;
410
411 cached_has_bits = _impl_._has_bits_[0];
412 if (cached_has_bits & 0x00000003u) {
413 ::memset(&_impl_.stream_id_, 0, static_cast<size_t>(
414 reinterpret_cast<char*>(&_impl_.type_) -
415 reinterpret_cast<char*>(&_impl_.stream_id_)) + sizeof(_impl_.type_));
416 }
417 _impl_._has_bits_.Clear();
418 _internal_metadata_.Clear<std::string>();
419 }
420
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)421 const char* VirtioVideoCmdDoneFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
422 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
423 _Internal::HasBits has_bits{};
424 while (!ctx->Done(&ptr)) {
425 ::uint32_t tag;
426 ptr = ::_pbi::ReadTag(ptr, &tag);
427 switch (tag >> 3) {
428 // optional uint32 stream_id = 1;
429 case 1:
430 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
431 _Internal::set_has_stream_id(&has_bits);
432 _impl_.stream_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
433 CHK_(ptr);
434 } else {
435 goto handle_unusual;
436 }
437 continue;
438 // optional uint32 type = 2;
439 case 2:
440 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
441 _Internal::set_has_type(&has_bits);
442 _impl_.type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
443 CHK_(ptr);
444 } else {
445 goto handle_unusual;
446 }
447 continue;
448 default:
449 goto handle_unusual;
450 } // switch
451 handle_unusual:
452 if ((tag == 0) || ((tag & 7) == 4)) {
453 CHK_(ptr);
454 ctx->SetLastTag(tag);
455 goto message_done;
456 }
457 ptr = UnknownFieldParse(
458 tag,
459 _internal_metadata_.mutable_unknown_fields<std::string>(),
460 ptr, ctx);
461 CHK_(ptr != nullptr);
462 } // while
463 message_done:
464 _impl_._has_bits_.Or(has_bits);
465 return ptr;
466 failure:
467 ptr = nullptr;
468 goto message_done;
469 #undef CHK_
470 }
471
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const472 ::uint8_t* VirtioVideoCmdDoneFtraceEvent::_InternalSerialize(
473 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
474 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.VirtioVideoCmdDoneFtraceEvent)
475 ::uint32_t cached_has_bits = 0;
476 (void) cached_has_bits;
477
478 cached_has_bits = _impl_._has_bits_[0];
479 // optional uint32 stream_id = 1;
480 if (cached_has_bits & 0x00000001u) {
481 target = stream->EnsureSpace(target);
482 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_stream_id(), target);
483 }
484
485 // optional uint32 type = 2;
486 if (cached_has_bits & 0x00000002u) {
487 target = stream->EnsureSpace(target);
488 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_type(), target);
489 }
490
491 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
492 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
493 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
494 }
495 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.VirtioVideoCmdDoneFtraceEvent)
496 return target;
497 }
498
ByteSizeLong() const499 size_t VirtioVideoCmdDoneFtraceEvent::ByteSizeLong() const {
500 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.VirtioVideoCmdDoneFtraceEvent)
501 size_t total_size = 0;
502
503 ::uint32_t cached_has_bits = 0;
504 // Prevent compiler warnings about cached_has_bits being unused
505 (void) cached_has_bits;
506
507 cached_has_bits = _impl_._has_bits_[0];
508 if (cached_has_bits & 0x00000003u) {
509 // optional uint32 stream_id = 1;
510 if (cached_has_bits & 0x00000001u) {
511 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_stream_id());
512 }
513
514 // optional uint32 type = 2;
515 if (cached_has_bits & 0x00000002u) {
516 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_type());
517 }
518
519 }
520 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
521 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
522 }
523 int cached_size = ::_pbi::ToCachedSize(total_size);
524 SetCachedSize(cached_size);
525 return total_size;
526 }
527
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)528 void VirtioVideoCmdDoneFtraceEvent::CheckTypeAndMergeFrom(
529 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
530 MergeFrom(*::_pbi::DownCast<const VirtioVideoCmdDoneFtraceEvent*>(
531 &from));
532 }
533
MergeFrom(const VirtioVideoCmdDoneFtraceEvent & from)534 void VirtioVideoCmdDoneFtraceEvent::MergeFrom(const VirtioVideoCmdDoneFtraceEvent& from) {
535 VirtioVideoCmdDoneFtraceEvent* const _this = this;
536 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.VirtioVideoCmdDoneFtraceEvent)
537 GOOGLE_DCHECK_NE(&from, _this);
538 ::uint32_t cached_has_bits = 0;
539 (void) cached_has_bits;
540
541 cached_has_bits = from._impl_._has_bits_[0];
542 if (cached_has_bits & 0x00000003u) {
543 if (cached_has_bits & 0x00000001u) {
544 _this->_impl_.stream_id_ = from._impl_.stream_id_;
545 }
546 if (cached_has_bits & 0x00000002u) {
547 _this->_impl_.type_ = from._impl_.type_;
548 }
549 _this->_impl_._has_bits_[0] |= cached_has_bits;
550 }
551 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
552 }
553
CopyFrom(const VirtioVideoCmdDoneFtraceEvent & from)554 void VirtioVideoCmdDoneFtraceEvent::CopyFrom(const VirtioVideoCmdDoneFtraceEvent& from) {
555 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.VirtioVideoCmdDoneFtraceEvent)
556 if (&from == this) return;
557 Clear();
558 MergeFrom(from);
559 }
560
IsInitialized() const561 bool VirtioVideoCmdDoneFtraceEvent::IsInitialized() const {
562 return true;
563 }
564
InternalSwap(VirtioVideoCmdDoneFtraceEvent * other)565 void VirtioVideoCmdDoneFtraceEvent::InternalSwap(VirtioVideoCmdDoneFtraceEvent* other) {
566 using std::swap;
567 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
568 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
569 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
570 PROTOBUF_FIELD_OFFSET(VirtioVideoCmdDoneFtraceEvent, _impl_.type_)
571 + sizeof(VirtioVideoCmdDoneFtraceEvent::_impl_.type_) // NOLINT
572 - PROTOBUF_FIELD_OFFSET(VirtioVideoCmdDoneFtraceEvent, _impl_.stream_id_)>(
573 reinterpret_cast<char*>(&_impl_.stream_id_),
574 reinterpret_cast<char*>(&other->_impl_.stream_id_));
575 }
576
GetTypeName() const577 std::string VirtioVideoCmdDoneFtraceEvent::GetTypeName() const {
578 return "perfetto.protos.VirtioVideoCmdDoneFtraceEvent";
579 }
580
581
582 // ===================================================================
583
584 class VirtioVideoResourceQueueFtraceEvent::_Internal {
585 public:
586 using HasBits = decltype(std::declval<VirtioVideoResourceQueueFtraceEvent>()._impl_._has_bits_);
set_has_data_size0(HasBits * has_bits)587 static void set_has_data_size0(HasBits* has_bits) {
588 (*has_bits)[0] |= 1u;
589 }
set_has_data_size1(HasBits * has_bits)590 static void set_has_data_size1(HasBits* has_bits) {
591 (*has_bits)[0] |= 2u;
592 }
set_has_data_size2(HasBits * has_bits)593 static void set_has_data_size2(HasBits* has_bits) {
594 (*has_bits)[0] |= 4u;
595 }
set_has_data_size3(HasBits * has_bits)596 static void set_has_data_size3(HasBits* has_bits) {
597 (*has_bits)[0] |= 8u;
598 }
set_has_queue_type(HasBits * has_bits)599 static void set_has_queue_type(HasBits* has_bits) {
600 (*has_bits)[0] |= 16u;
601 }
set_has_resource_id(HasBits * has_bits)602 static void set_has_resource_id(HasBits* has_bits) {
603 (*has_bits)[0] |= 32u;
604 }
set_has_stream_id(HasBits * has_bits)605 static void set_has_stream_id(HasBits* has_bits) {
606 (*has_bits)[0] |= 128u;
607 }
set_has_timestamp(HasBits * has_bits)608 static void set_has_timestamp(HasBits* has_bits) {
609 (*has_bits)[0] |= 64u;
610 }
611 };
612
VirtioVideoResourceQueueFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)613 VirtioVideoResourceQueueFtraceEvent::VirtioVideoResourceQueueFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
614 bool is_message_owned)
615 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
616 SharedCtor(arena, is_message_owned);
617 // @@protoc_insertion_point(arena_constructor:perfetto.protos.VirtioVideoResourceQueueFtraceEvent)
618 }
VirtioVideoResourceQueueFtraceEvent(const VirtioVideoResourceQueueFtraceEvent & from)619 VirtioVideoResourceQueueFtraceEvent::VirtioVideoResourceQueueFtraceEvent(const VirtioVideoResourceQueueFtraceEvent& from)
620 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
621 VirtioVideoResourceQueueFtraceEvent* const _this = this; (void)_this;
622 new (&_impl_) Impl_{
623 decltype(_impl_._has_bits_){from._impl_._has_bits_}
624 , /*decltype(_impl_._cached_size_)*/{}
625 , decltype(_impl_.data_size0_){}
626 , decltype(_impl_.data_size1_){}
627 , decltype(_impl_.data_size2_){}
628 , decltype(_impl_.data_size3_){}
629 , decltype(_impl_.queue_type_){}
630 , decltype(_impl_.resource_id_){}
631 , decltype(_impl_.timestamp_){}
632 , decltype(_impl_.stream_id_){}};
633
634 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
635 ::memcpy(&_impl_.data_size0_, &from._impl_.data_size0_,
636 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.stream_id_) -
637 reinterpret_cast<char*>(&_impl_.data_size0_)) + sizeof(_impl_.stream_id_));
638 // @@protoc_insertion_point(copy_constructor:perfetto.protos.VirtioVideoResourceQueueFtraceEvent)
639 }
640
SharedCtor(::_pb::Arena * arena,bool is_message_owned)641 inline void VirtioVideoResourceQueueFtraceEvent::SharedCtor(
642 ::_pb::Arena* arena, bool is_message_owned) {
643 (void)arena;
644 (void)is_message_owned;
645 new (&_impl_) Impl_{
646 decltype(_impl_._has_bits_){}
647 , /*decltype(_impl_._cached_size_)*/{}
648 , decltype(_impl_.data_size0_){0u}
649 , decltype(_impl_.data_size1_){0u}
650 , decltype(_impl_.data_size2_){0u}
651 , decltype(_impl_.data_size3_){0u}
652 , decltype(_impl_.queue_type_){0u}
653 , decltype(_impl_.resource_id_){0}
654 , decltype(_impl_.timestamp_){::uint64_t{0u}}
655 , decltype(_impl_.stream_id_){0}
656 };
657 }
658
~VirtioVideoResourceQueueFtraceEvent()659 VirtioVideoResourceQueueFtraceEvent::~VirtioVideoResourceQueueFtraceEvent() {
660 // @@protoc_insertion_point(destructor:perfetto.protos.VirtioVideoResourceQueueFtraceEvent)
661 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
662 (void)arena;
663 return;
664 }
665 SharedDtor();
666 }
667
SharedDtor()668 inline void VirtioVideoResourceQueueFtraceEvent::SharedDtor() {
669 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
670 }
671
SetCachedSize(int size) const672 void VirtioVideoResourceQueueFtraceEvent::SetCachedSize(int size) const {
673 _impl_._cached_size_.Set(size);
674 }
675
Clear()676 void VirtioVideoResourceQueueFtraceEvent::Clear() {
677 // @@protoc_insertion_point(message_clear_start:perfetto.protos.VirtioVideoResourceQueueFtraceEvent)
678 ::uint32_t cached_has_bits = 0;
679 // Prevent compiler warnings about cached_has_bits being unused
680 (void) cached_has_bits;
681
682 cached_has_bits = _impl_._has_bits_[0];
683 if (cached_has_bits & 0x000000ffu) {
684 ::memset(&_impl_.data_size0_, 0, static_cast<size_t>(
685 reinterpret_cast<char*>(&_impl_.stream_id_) -
686 reinterpret_cast<char*>(&_impl_.data_size0_)) + sizeof(_impl_.stream_id_));
687 }
688 _impl_._has_bits_.Clear();
689 _internal_metadata_.Clear<std::string>();
690 }
691
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)692 const char* VirtioVideoResourceQueueFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
693 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
694 _Internal::HasBits has_bits{};
695 while (!ctx->Done(&ptr)) {
696 ::uint32_t tag;
697 ptr = ::_pbi::ReadTag(ptr, &tag);
698 switch (tag >> 3) {
699 // optional uint32 data_size0 = 1;
700 case 1:
701 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
702 _Internal::set_has_data_size0(&has_bits);
703 _impl_.data_size0_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
704 CHK_(ptr);
705 } else {
706 goto handle_unusual;
707 }
708 continue;
709 // optional uint32 data_size1 = 2;
710 case 2:
711 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
712 _Internal::set_has_data_size1(&has_bits);
713 _impl_.data_size1_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
714 CHK_(ptr);
715 } else {
716 goto handle_unusual;
717 }
718 continue;
719 // optional uint32 data_size2 = 3;
720 case 3:
721 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
722 _Internal::set_has_data_size2(&has_bits);
723 _impl_.data_size2_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
724 CHK_(ptr);
725 } else {
726 goto handle_unusual;
727 }
728 continue;
729 // optional uint32 data_size3 = 4;
730 case 4:
731 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
732 _Internal::set_has_data_size3(&has_bits);
733 _impl_.data_size3_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
734 CHK_(ptr);
735 } else {
736 goto handle_unusual;
737 }
738 continue;
739 // optional uint32 queue_type = 5;
740 case 5:
741 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
742 _Internal::set_has_queue_type(&has_bits);
743 _impl_.queue_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
744 CHK_(ptr);
745 } else {
746 goto handle_unusual;
747 }
748 continue;
749 // optional int32 resource_id = 6;
750 case 6:
751 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
752 _Internal::set_has_resource_id(&has_bits);
753 _impl_.resource_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
754 CHK_(ptr);
755 } else {
756 goto handle_unusual;
757 }
758 continue;
759 // optional int32 stream_id = 7;
760 case 7:
761 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
762 _Internal::set_has_stream_id(&has_bits);
763 _impl_.stream_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
764 CHK_(ptr);
765 } else {
766 goto handle_unusual;
767 }
768 continue;
769 // optional uint64 timestamp = 8;
770 case 8:
771 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
772 _Internal::set_has_timestamp(&has_bits);
773 _impl_.timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
774 CHK_(ptr);
775 } else {
776 goto handle_unusual;
777 }
778 continue;
779 default:
780 goto handle_unusual;
781 } // switch
782 handle_unusual:
783 if ((tag == 0) || ((tag & 7) == 4)) {
784 CHK_(ptr);
785 ctx->SetLastTag(tag);
786 goto message_done;
787 }
788 ptr = UnknownFieldParse(
789 tag,
790 _internal_metadata_.mutable_unknown_fields<std::string>(),
791 ptr, ctx);
792 CHK_(ptr != nullptr);
793 } // while
794 message_done:
795 _impl_._has_bits_.Or(has_bits);
796 return ptr;
797 failure:
798 ptr = nullptr;
799 goto message_done;
800 #undef CHK_
801 }
802
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const803 ::uint8_t* VirtioVideoResourceQueueFtraceEvent::_InternalSerialize(
804 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
805 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.VirtioVideoResourceQueueFtraceEvent)
806 ::uint32_t cached_has_bits = 0;
807 (void) cached_has_bits;
808
809 cached_has_bits = _impl_._has_bits_[0];
810 // optional uint32 data_size0 = 1;
811 if (cached_has_bits & 0x00000001u) {
812 target = stream->EnsureSpace(target);
813 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_data_size0(), target);
814 }
815
816 // optional uint32 data_size1 = 2;
817 if (cached_has_bits & 0x00000002u) {
818 target = stream->EnsureSpace(target);
819 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_data_size1(), target);
820 }
821
822 // optional uint32 data_size2 = 3;
823 if (cached_has_bits & 0x00000004u) {
824 target = stream->EnsureSpace(target);
825 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_data_size2(), target);
826 }
827
828 // optional uint32 data_size3 = 4;
829 if (cached_has_bits & 0x00000008u) {
830 target = stream->EnsureSpace(target);
831 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_data_size3(), target);
832 }
833
834 // optional uint32 queue_type = 5;
835 if (cached_has_bits & 0x00000010u) {
836 target = stream->EnsureSpace(target);
837 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_queue_type(), target);
838 }
839
840 // optional int32 resource_id = 6;
841 if (cached_has_bits & 0x00000020u) {
842 target = stream->EnsureSpace(target);
843 target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_resource_id(), target);
844 }
845
846 // optional int32 stream_id = 7;
847 if (cached_has_bits & 0x00000080u) {
848 target = stream->EnsureSpace(target);
849 target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_stream_id(), target);
850 }
851
852 // optional uint64 timestamp = 8;
853 if (cached_has_bits & 0x00000040u) {
854 target = stream->EnsureSpace(target);
855 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(8, this->_internal_timestamp(), target);
856 }
857
858 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
859 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
860 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
861 }
862 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.VirtioVideoResourceQueueFtraceEvent)
863 return target;
864 }
865
ByteSizeLong() const866 size_t VirtioVideoResourceQueueFtraceEvent::ByteSizeLong() const {
867 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.VirtioVideoResourceQueueFtraceEvent)
868 size_t total_size = 0;
869
870 ::uint32_t cached_has_bits = 0;
871 // Prevent compiler warnings about cached_has_bits being unused
872 (void) cached_has_bits;
873
874 cached_has_bits = _impl_._has_bits_[0];
875 if (cached_has_bits & 0x000000ffu) {
876 // optional uint32 data_size0 = 1;
877 if (cached_has_bits & 0x00000001u) {
878 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_data_size0());
879 }
880
881 // optional uint32 data_size1 = 2;
882 if (cached_has_bits & 0x00000002u) {
883 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_data_size1());
884 }
885
886 // optional uint32 data_size2 = 3;
887 if (cached_has_bits & 0x00000004u) {
888 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_data_size2());
889 }
890
891 // optional uint32 data_size3 = 4;
892 if (cached_has_bits & 0x00000008u) {
893 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_data_size3());
894 }
895
896 // optional uint32 queue_type = 5;
897 if (cached_has_bits & 0x00000010u) {
898 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_queue_type());
899 }
900
901 // optional int32 resource_id = 6;
902 if (cached_has_bits & 0x00000020u) {
903 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_resource_id());
904 }
905
906 // optional uint64 timestamp = 8;
907 if (cached_has_bits & 0x00000040u) {
908 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_timestamp());
909 }
910
911 // optional int32 stream_id = 7;
912 if (cached_has_bits & 0x00000080u) {
913 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_stream_id());
914 }
915
916 }
917 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
918 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
919 }
920 int cached_size = ::_pbi::ToCachedSize(total_size);
921 SetCachedSize(cached_size);
922 return total_size;
923 }
924
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)925 void VirtioVideoResourceQueueFtraceEvent::CheckTypeAndMergeFrom(
926 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
927 MergeFrom(*::_pbi::DownCast<const VirtioVideoResourceQueueFtraceEvent*>(
928 &from));
929 }
930
MergeFrom(const VirtioVideoResourceQueueFtraceEvent & from)931 void VirtioVideoResourceQueueFtraceEvent::MergeFrom(const VirtioVideoResourceQueueFtraceEvent& from) {
932 VirtioVideoResourceQueueFtraceEvent* const _this = this;
933 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.VirtioVideoResourceQueueFtraceEvent)
934 GOOGLE_DCHECK_NE(&from, _this);
935 ::uint32_t cached_has_bits = 0;
936 (void) cached_has_bits;
937
938 cached_has_bits = from._impl_._has_bits_[0];
939 if (cached_has_bits & 0x000000ffu) {
940 if (cached_has_bits & 0x00000001u) {
941 _this->_impl_.data_size0_ = from._impl_.data_size0_;
942 }
943 if (cached_has_bits & 0x00000002u) {
944 _this->_impl_.data_size1_ = from._impl_.data_size1_;
945 }
946 if (cached_has_bits & 0x00000004u) {
947 _this->_impl_.data_size2_ = from._impl_.data_size2_;
948 }
949 if (cached_has_bits & 0x00000008u) {
950 _this->_impl_.data_size3_ = from._impl_.data_size3_;
951 }
952 if (cached_has_bits & 0x00000010u) {
953 _this->_impl_.queue_type_ = from._impl_.queue_type_;
954 }
955 if (cached_has_bits & 0x00000020u) {
956 _this->_impl_.resource_id_ = from._impl_.resource_id_;
957 }
958 if (cached_has_bits & 0x00000040u) {
959 _this->_impl_.timestamp_ = from._impl_.timestamp_;
960 }
961 if (cached_has_bits & 0x00000080u) {
962 _this->_impl_.stream_id_ = from._impl_.stream_id_;
963 }
964 _this->_impl_._has_bits_[0] |= cached_has_bits;
965 }
966 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
967 }
968
CopyFrom(const VirtioVideoResourceQueueFtraceEvent & from)969 void VirtioVideoResourceQueueFtraceEvent::CopyFrom(const VirtioVideoResourceQueueFtraceEvent& from) {
970 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.VirtioVideoResourceQueueFtraceEvent)
971 if (&from == this) return;
972 Clear();
973 MergeFrom(from);
974 }
975
IsInitialized() const976 bool VirtioVideoResourceQueueFtraceEvent::IsInitialized() const {
977 return true;
978 }
979
InternalSwap(VirtioVideoResourceQueueFtraceEvent * other)980 void VirtioVideoResourceQueueFtraceEvent::InternalSwap(VirtioVideoResourceQueueFtraceEvent* other) {
981 using std::swap;
982 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
983 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
984 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
985 PROTOBUF_FIELD_OFFSET(VirtioVideoResourceQueueFtraceEvent, _impl_.stream_id_)
986 + sizeof(VirtioVideoResourceQueueFtraceEvent::_impl_.stream_id_) // NOLINT
987 - PROTOBUF_FIELD_OFFSET(VirtioVideoResourceQueueFtraceEvent, _impl_.data_size0_)>(
988 reinterpret_cast<char*>(&_impl_.data_size0_),
989 reinterpret_cast<char*>(&other->_impl_.data_size0_));
990 }
991
GetTypeName() const992 std::string VirtioVideoResourceQueueFtraceEvent::GetTypeName() const {
993 return "perfetto.protos.VirtioVideoResourceQueueFtraceEvent";
994 }
995
996
997 // ===================================================================
998
999 class VirtioVideoResourceQueueDoneFtraceEvent::_Internal {
1000 public:
1001 using HasBits = decltype(std::declval<VirtioVideoResourceQueueDoneFtraceEvent>()._impl_._has_bits_);
set_has_data_size0(HasBits * has_bits)1002 static void set_has_data_size0(HasBits* has_bits) {
1003 (*has_bits)[0] |= 1u;
1004 }
set_has_data_size1(HasBits * has_bits)1005 static void set_has_data_size1(HasBits* has_bits) {
1006 (*has_bits)[0] |= 2u;
1007 }
set_has_data_size2(HasBits * has_bits)1008 static void set_has_data_size2(HasBits* has_bits) {
1009 (*has_bits)[0] |= 4u;
1010 }
set_has_data_size3(HasBits * has_bits)1011 static void set_has_data_size3(HasBits* has_bits) {
1012 (*has_bits)[0] |= 8u;
1013 }
set_has_queue_type(HasBits * has_bits)1014 static void set_has_queue_type(HasBits* has_bits) {
1015 (*has_bits)[0] |= 16u;
1016 }
set_has_resource_id(HasBits * has_bits)1017 static void set_has_resource_id(HasBits* has_bits) {
1018 (*has_bits)[0] |= 32u;
1019 }
set_has_stream_id(HasBits * has_bits)1020 static void set_has_stream_id(HasBits* has_bits) {
1021 (*has_bits)[0] |= 128u;
1022 }
set_has_timestamp(HasBits * has_bits)1023 static void set_has_timestamp(HasBits* has_bits) {
1024 (*has_bits)[0] |= 64u;
1025 }
1026 };
1027
VirtioVideoResourceQueueDoneFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1028 VirtioVideoResourceQueueDoneFtraceEvent::VirtioVideoResourceQueueDoneFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1029 bool is_message_owned)
1030 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1031 SharedCtor(arena, is_message_owned);
1032 // @@protoc_insertion_point(arena_constructor:perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent)
1033 }
VirtioVideoResourceQueueDoneFtraceEvent(const VirtioVideoResourceQueueDoneFtraceEvent & from)1034 VirtioVideoResourceQueueDoneFtraceEvent::VirtioVideoResourceQueueDoneFtraceEvent(const VirtioVideoResourceQueueDoneFtraceEvent& from)
1035 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1036 VirtioVideoResourceQueueDoneFtraceEvent* const _this = this; (void)_this;
1037 new (&_impl_) Impl_{
1038 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1039 , /*decltype(_impl_._cached_size_)*/{}
1040 , decltype(_impl_.data_size0_){}
1041 , decltype(_impl_.data_size1_){}
1042 , decltype(_impl_.data_size2_){}
1043 , decltype(_impl_.data_size3_){}
1044 , decltype(_impl_.queue_type_){}
1045 , decltype(_impl_.resource_id_){}
1046 , decltype(_impl_.timestamp_){}
1047 , decltype(_impl_.stream_id_){}};
1048
1049 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1050 ::memcpy(&_impl_.data_size0_, &from._impl_.data_size0_,
1051 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.stream_id_) -
1052 reinterpret_cast<char*>(&_impl_.data_size0_)) + sizeof(_impl_.stream_id_));
1053 // @@protoc_insertion_point(copy_constructor:perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent)
1054 }
1055
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1056 inline void VirtioVideoResourceQueueDoneFtraceEvent::SharedCtor(
1057 ::_pb::Arena* arena, bool is_message_owned) {
1058 (void)arena;
1059 (void)is_message_owned;
1060 new (&_impl_) Impl_{
1061 decltype(_impl_._has_bits_){}
1062 , /*decltype(_impl_._cached_size_)*/{}
1063 , decltype(_impl_.data_size0_){0u}
1064 , decltype(_impl_.data_size1_){0u}
1065 , decltype(_impl_.data_size2_){0u}
1066 , decltype(_impl_.data_size3_){0u}
1067 , decltype(_impl_.queue_type_){0u}
1068 , decltype(_impl_.resource_id_){0}
1069 , decltype(_impl_.timestamp_){::uint64_t{0u}}
1070 , decltype(_impl_.stream_id_){0}
1071 };
1072 }
1073
~VirtioVideoResourceQueueDoneFtraceEvent()1074 VirtioVideoResourceQueueDoneFtraceEvent::~VirtioVideoResourceQueueDoneFtraceEvent() {
1075 // @@protoc_insertion_point(destructor:perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent)
1076 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1077 (void)arena;
1078 return;
1079 }
1080 SharedDtor();
1081 }
1082
SharedDtor()1083 inline void VirtioVideoResourceQueueDoneFtraceEvent::SharedDtor() {
1084 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1085 }
1086
SetCachedSize(int size) const1087 void VirtioVideoResourceQueueDoneFtraceEvent::SetCachedSize(int size) const {
1088 _impl_._cached_size_.Set(size);
1089 }
1090
Clear()1091 void VirtioVideoResourceQueueDoneFtraceEvent::Clear() {
1092 // @@protoc_insertion_point(message_clear_start:perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent)
1093 ::uint32_t cached_has_bits = 0;
1094 // Prevent compiler warnings about cached_has_bits being unused
1095 (void) cached_has_bits;
1096
1097 cached_has_bits = _impl_._has_bits_[0];
1098 if (cached_has_bits & 0x000000ffu) {
1099 ::memset(&_impl_.data_size0_, 0, static_cast<size_t>(
1100 reinterpret_cast<char*>(&_impl_.stream_id_) -
1101 reinterpret_cast<char*>(&_impl_.data_size0_)) + sizeof(_impl_.stream_id_));
1102 }
1103 _impl_._has_bits_.Clear();
1104 _internal_metadata_.Clear<std::string>();
1105 }
1106
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1107 const char* VirtioVideoResourceQueueDoneFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1108 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1109 _Internal::HasBits has_bits{};
1110 while (!ctx->Done(&ptr)) {
1111 ::uint32_t tag;
1112 ptr = ::_pbi::ReadTag(ptr, &tag);
1113 switch (tag >> 3) {
1114 // optional uint32 data_size0 = 1;
1115 case 1:
1116 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1117 _Internal::set_has_data_size0(&has_bits);
1118 _impl_.data_size0_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1119 CHK_(ptr);
1120 } else {
1121 goto handle_unusual;
1122 }
1123 continue;
1124 // optional uint32 data_size1 = 2;
1125 case 2:
1126 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1127 _Internal::set_has_data_size1(&has_bits);
1128 _impl_.data_size1_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1129 CHK_(ptr);
1130 } else {
1131 goto handle_unusual;
1132 }
1133 continue;
1134 // optional uint32 data_size2 = 3;
1135 case 3:
1136 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1137 _Internal::set_has_data_size2(&has_bits);
1138 _impl_.data_size2_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1139 CHK_(ptr);
1140 } else {
1141 goto handle_unusual;
1142 }
1143 continue;
1144 // optional uint32 data_size3 = 4;
1145 case 4:
1146 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
1147 _Internal::set_has_data_size3(&has_bits);
1148 _impl_.data_size3_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1149 CHK_(ptr);
1150 } else {
1151 goto handle_unusual;
1152 }
1153 continue;
1154 // optional uint32 queue_type = 5;
1155 case 5:
1156 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
1157 _Internal::set_has_queue_type(&has_bits);
1158 _impl_.queue_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1159 CHK_(ptr);
1160 } else {
1161 goto handle_unusual;
1162 }
1163 continue;
1164 // optional int32 resource_id = 6;
1165 case 6:
1166 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
1167 _Internal::set_has_resource_id(&has_bits);
1168 _impl_.resource_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1169 CHK_(ptr);
1170 } else {
1171 goto handle_unusual;
1172 }
1173 continue;
1174 // optional int32 stream_id = 7;
1175 case 7:
1176 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
1177 _Internal::set_has_stream_id(&has_bits);
1178 _impl_.stream_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1179 CHK_(ptr);
1180 } else {
1181 goto handle_unusual;
1182 }
1183 continue;
1184 // optional uint64 timestamp = 8;
1185 case 8:
1186 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
1187 _Internal::set_has_timestamp(&has_bits);
1188 _impl_.timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1189 CHK_(ptr);
1190 } else {
1191 goto handle_unusual;
1192 }
1193 continue;
1194 default:
1195 goto handle_unusual;
1196 } // switch
1197 handle_unusual:
1198 if ((tag == 0) || ((tag & 7) == 4)) {
1199 CHK_(ptr);
1200 ctx->SetLastTag(tag);
1201 goto message_done;
1202 }
1203 ptr = UnknownFieldParse(
1204 tag,
1205 _internal_metadata_.mutable_unknown_fields<std::string>(),
1206 ptr, ctx);
1207 CHK_(ptr != nullptr);
1208 } // while
1209 message_done:
1210 _impl_._has_bits_.Or(has_bits);
1211 return ptr;
1212 failure:
1213 ptr = nullptr;
1214 goto message_done;
1215 #undef CHK_
1216 }
1217
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1218 ::uint8_t* VirtioVideoResourceQueueDoneFtraceEvent::_InternalSerialize(
1219 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1220 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent)
1221 ::uint32_t cached_has_bits = 0;
1222 (void) cached_has_bits;
1223
1224 cached_has_bits = _impl_._has_bits_[0];
1225 // optional uint32 data_size0 = 1;
1226 if (cached_has_bits & 0x00000001u) {
1227 target = stream->EnsureSpace(target);
1228 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_data_size0(), target);
1229 }
1230
1231 // optional uint32 data_size1 = 2;
1232 if (cached_has_bits & 0x00000002u) {
1233 target = stream->EnsureSpace(target);
1234 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_data_size1(), target);
1235 }
1236
1237 // optional uint32 data_size2 = 3;
1238 if (cached_has_bits & 0x00000004u) {
1239 target = stream->EnsureSpace(target);
1240 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_data_size2(), target);
1241 }
1242
1243 // optional uint32 data_size3 = 4;
1244 if (cached_has_bits & 0x00000008u) {
1245 target = stream->EnsureSpace(target);
1246 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_data_size3(), target);
1247 }
1248
1249 // optional uint32 queue_type = 5;
1250 if (cached_has_bits & 0x00000010u) {
1251 target = stream->EnsureSpace(target);
1252 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_queue_type(), target);
1253 }
1254
1255 // optional int32 resource_id = 6;
1256 if (cached_has_bits & 0x00000020u) {
1257 target = stream->EnsureSpace(target);
1258 target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_resource_id(), target);
1259 }
1260
1261 // optional int32 stream_id = 7;
1262 if (cached_has_bits & 0x00000080u) {
1263 target = stream->EnsureSpace(target);
1264 target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_stream_id(), target);
1265 }
1266
1267 // optional uint64 timestamp = 8;
1268 if (cached_has_bits & 0x00000040u) {
1269 target = stream->EnsureSpace(target);
1270 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(8, this->_internal_timestamp(), target);
1271 }
1272
1273 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1274 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1275 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1276 }
1277 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent)
1278 return target;
1279 }
1280
ByteSizeLong() const1281 size_t VirtioVideoResourceQueueDoneFtraceEvent::ByteSizeLong() const {
1282 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent)
1283 size_t total_size = 0;
1284
1285 ::uint32_t cached_has_bits = 0;
1286 // Prevent compiler warnings about cached_has_bits being unused
1287 (void) cached_has_bits;
1288
1289 cached_has_bits = _impl_._has_bits_[0];
1290 if (cached_has_bits & 0x000000ffu) {
1291 // optional uint32 data_size0 = 1;
1292 if (cached_has_bits & 0x00000001u) {
1293 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_data_size0());
1294 }
1295
1296 // optional uint32 data_size1 = 2;
1297 if (cached_has_bits & 0x00000002u) {
1298 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_data_size1());
1299 }
1300
1301 // optional uint32 data_size2 = 3;
1302 if (cached_has_bits & 0x00000004u) {
1303 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_data_size2());
1304 }
1305
1306 // optional uint32 data_size3 = 4;
1307 if (cached_has_bits & 0x00000008u) {
1308 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_data_size3());
1309 }
1310
1311 // optional uint32 queue_type = 5;
1312 if (cached_has_bits & 0x00000010u) {
1313 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_queue_type());
1314 }
1315
1316 // optional int32 resource_id = 6;
1317 if (cached_has_bits & 0x00000020u) {
1318 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_resource_id());
1319 }
1320
1321 // optional uint64 timestamp = 8;
1322 if (cached_has_bits & 0x00000040u) {
1323 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_timestamp());
1324 }
1325
1326 // optional int32 stream_id = 7;
1327 if (cached_has_bits & 0x00000080u) {
1328 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_stream_id());
1329 }
1330
1331 }
1332 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1333 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1334 }
1335 int cached_size = ::_pbi::ToCachedSize(total_size);
1336 SetCachedSize(cached_size);
1337 return total_size;
1338 }
1339
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1340 void VirtioVideoResourceQueueDoneFtraceEvent::CheckTypeAndMergeFrom(
1341 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1342 MergeFrom(*::_pbi::DownCast<const VirtioVideoResourceQueueDoneFtraceEvent*>(
1343 &from));
1344 }
1345
MergeFrom(const VirtioVideoResourceQueueDoneFtraceEvent & from)1346 void VirtioVideoResourceQueueDoneFtraceEvent::MergeFrom(const VirtioVideoResourceQueueDoneFtraceEvent& from) {
1347 VirtioVideoResourceQueueDoneFtraceEvent* const _this = this;
1348 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent)
1349 GOOGLE_DCHECK_NE(&from, _this);
1350 ::uint32_t cached_has_bits = 0;
1351 (void) cached_has_bits;
1352
1353 cached_has_bits = from._impl_._has_bits_[0];
1354 if (cached_has_bits & 0x000000ffu) {
1355 if (cached_has_bits & 0x00000001u) {
1356 _this->_impl_.data_size0_ = from._impl_.data_size0_;
1357 }
1358 if (cached_has_bits & 0x00000002u) {
1359 _this->_impl_.data_size1_ = from._impl_.data_size1_;
1360 }
1361 if (cached_has_bits & 0x00000004u) {
1362 _this->_impl_.data_size2_ = from._impl_.data_size2_;
1363 }
1364 if (cached_has_bits & 0x00000008u) {
1365 _this->_impl_.data_size3_ = from._impl_.data_size3_;
1366 }
1367 if (cached_has_bits & 0x00000010u) {
1368 _this->_impl_.queue_type_ = from._impl_.queue_type_;
1369 }
1370 if (cached_has_bits & 0x00000020u) {
1371 _this->_impl_.resource_id_ = from._impl_.resource_id_;
1372 }
1373 if (cached_has_bits & 0x00000040u) {
1374 _this->_impl_.timestamp_ = from._impl_.timestamp_;
1375 }
1376 if (cached_has_bits & 0x00000080u) {
1377 _this->_impl_.stream_id_ = from._impl_.stream_id_;
1378 }
1379 _this->_impl_._has_bits_[0] |= cached_has_bits;
1380 }
1381 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1382 }
1383
CopyFrom(const VirtioVideoResourceQueueDoneFtraceEvent & from)1384 void VirtioVideoResourceQueueDoneFtraceEvent::CopyFrom(const VirtioVideoResourceQueueDoneFtraceEvent& from) {
1385 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent)
1386 if (&from == this) return;
1387 Clear();
1388 MergeFrom(from);
1389 }
1390
IsInitialized() const1391 bool VirtioVideoResourceQueueDoneFtraceEvent::IsInitialized() const {
1392 return true;
1393 }
1394
InternalSwap(VirtioVideoResourceQueueDoneFtraceEvent * other)1395 void VirtioVideoResourceQueueDoneFtraceEvent::InternalSwap(VirtioVideoResourceQueueDoneFtraceEvent* other) {
1396 using std::swap;
1397 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1398 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1399 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1400 PROTOBUF_FIELD_OFFSET(VirtioVideoResourceQueueDoneFtraceEvent, _impl_.stream_id_)
1401 + sizeof(VirtioVideoResourceQueueDoneFtraceEvent::_impl_.stream_id_) // NOLINT
1402 - PROTOBUF_FIELD_OFFSET(VirtioVideoResourceQueueDoneFtraceEvent, _impl_.data_size0_)>(
1403 reinterpret_cast<char*>(&_impl_.data_size0_),
1404 reinterpret_cast<char*>(&other->_impl_.data_size0_));
1405 }
1406
GetTypeName() const1407 std::string VirtioVideoResourceQueueDoneFtraceEvent::GetTypeName() const {
1408 return "perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent";
1409 }
1410
1411
1412 // @@protoc_insertion_point(namespace_scope)
1413 } // namespace protos
1414 } // namespace perfetto
1415 PROTOBUF_NAMESPACE_OPEN
1416 template<> PROTOBUF_NOINLINE ::perfetto::protos::VirtioVideoCmdFtraceEvent*
CreateMaybeMessage(Arena * arena)1417 Arena::CreateMaybeMessage< ::perfetto::protos::VirtioVideoCmdFtraceEvent >(Arena* arena) {
1418 return Arena::CreateMessageInternal< ::perfetto::protos::VirtioVideoCmdFtraceEvent >(arena);
1419 }
1420 template<> PROTOBUF_NOINLINE ::perfetto::protos::VirtioVideoCmdDoneFtraceEvent*
CreateMaybeMessage(Arena * arena)1421 Arena::CreateMaybeMessage< ::perfetto::protos::VirtioVideoCmdDoneFtraceEvent >(Arena* arena) {
1422 return Arena::CreateMessageInternal< ::perfetto::protos::VirtioVideoCmdDoneFtraceEvent >(arena);
1423 }
1424 template<> PROTOBUF_NOINLINE ::perfetto::protos::VirtioVideoResourceQueueFtraceEvent*
CreateMaybeMessage(Arena * arena)1425 Arena::CreateMaybeMessage< ::perfetto::protos::VirtioVideoResourceQueueFtraceEvent >(Arena* arena) {
1426 return Arena::CreateMessageInternal< ::perfetto::protos::VirtioVideoResourceQueueFtraceEvent >(arena);
1427 }
1428 template<> PROTOBUF_NOINLINE ::perfetto::protos::VirtioVideoResourceQueueDoneFtraceEvent*
CreateMaybeMessage(Arena * arena)1429 Arena::CreateMaybeMessage< ::perfetto::protos::VirtioVideoResourceQueueDoneFtraceEvent >(Arena* arena) {
1430 return Arena::CreateMessageInternal< ::perfetto::protos::VirtioVideoResourceQueueDoneFtraceEvent >(arena);
1431 }
1432 PROTOBUF_NAMESPACE_CLOSE
1433
1434 // @@protoc_insertion_point(global_scope)
1435 #include <google/protobuf/port_undef.inc>
1436