1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/android/surfaceflinger_common.proto
3
4 #include "protos/perfetto/trace/android/surfaceflinger_common.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 {
RegionProto(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR RegionProto::RegionProto(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_.rect_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}} {}
27 struct RegionProtoDefaultTypeInternal {
RegionProtoDefaultTypeInternalperfetto::protos::RegionProtoDefaultTypeInternal28 PROTOBUF_CONSTEXPR RegionProtoDefaultTypeInternal()
29 : _instance(::_pbi::ConstantInitialized{}) {}
~RegionProtoDefaultTypeInternalperfetto::protos::RegionProtoDefaultTypeInternal30 ~RegionProtoDefaultTypeInternal() {}
31 union { // NOLINT(misc-non-private-member-variables-in-classes)
32 RegionProto _instance;
33 };
34 };
35 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegionProtoDefaultTypeInternal _RegionProto_default_instance_;
SizeProto(::_pbi::ConstantInitialized)36 PROTOBUF_CONSTEXPR SizeProto::SizeProto(
37 ::_pbi::ConstantInitialized): _impl_{
38 /*decltype(_impl_._has_bits_)*/{}
39 , /*decltype(_impl_._cached_size_)*/{}
40 , /*decltype(_impl_.w_)*/0
41 , /*decltype(_impl_.h_)*/0} {}
42 struct SizeProtoDefaultTypeInternal {
SizeProtoDefaultTypeInternalperfetto::protos::SizeProtoDefaultTypeInternal43 PROTOBUF_CONSTEXPR SizeProtoDefaultTypeInternal()
44 : _instance(::_pbi::ConstantInitialized{}) {}
~SizeProtoDefaultTypeInternalperfetto::protos::SizeProtoDefaultTypeInternal45 ~SizeProtoDefaultTypeInternal() {}
46 union { // NOLINT(misc-non-private-member-variables-in-classes)
47 SizeProto _instance;
48 };
49 };
50 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SizeProtoDefaultTypeInternal _SizeProto_default_instance_;
TransformProto(::_pbi::ConstantInitialized)51 PROTOBUF_CONSTEXPR TransformProto::TransformProto(
52 ::_pbi::ConstantInitialized): _impl_{
53 /*decltype(_impl_._has_bits_)*/{}
54 , /*decltype(_impl_._cached_size_)*/{}
55 , /*decltype(_impl_.dsdx_)*/0
56 , /*decltype(_impl_.dtdx_)*/0
57 , /*decltype(_impl_.dsdy_)*/0
58 , /*decltype(_impl_.dtdy_)*/0
59 , /*decltype(_impl_.type_)*/0} {}
60 struct TransformProtoDefaultTypeInternal {
TransformProtoDefaultTypeInternalperfetto::protos::TransformProtoDefaultTypeInternal61 PROTOBUF_CONSTEXPR TransformProtoDefaultTypeInternal()
62 : _instance(::_pbi::ConstantInitialized{}) {}
~TransformProtoDefaultTypeInternalperfetto::protos::TransformProtoDefaultTypeInternal63 ~TransformProtoDefaultTypeInternal() {}
64 union { // NOLINT(misc-non-private-member-variables-in-classes)
65 TransformProto _instance;
66 };
67 };
68 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TransformProtoDefaultTypeInternal _TransformProto_default_instance_;
ColorProto(::_pbi::ConstantInitialized)69 PROTOBUF_CONSTEXPR ColorProto::ColorProto(
70 ::_pbi::ConstantInitialized): _impl_{
71 /*decltype(_impl_._has_bits_)*/{}
72 , /*decltype(_impl_._cached_size_)*/{}
73 , /*decltype(_impl_.r_)*/0
74 , /*decltype(_impl_.g_)*/0
75 , /*decltype(_impl_.b_)*/0
76 , /*decltype(_impl_.a_)*/0} {}
77 struct ColorProtoDefaultTypeInternal {
ColorProtoDefaultTypeInternalperfetto::protos::ColorProtoDefaultTypeInternal78 PROTOBUF_CONSTEXPR ColorProtoDefaultTypeInternal()
79 : _instance(::_pbi::ConstantInitialized{}) {}
~ColorProtoDefaultTypeInternalperfetto::protos::ColorProtoDefaultTypeInternal80 ~ColorProtoDefaultTypeInternal() {}
81 union { // NOLINT(misc-non-private-member-variables-in-classes)
82 ColorProto _instance;
83 };
84 };
85 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ColorProtoDefaultTypeInternal _ColorProto_default_instance_;
InputWindowInfoProto(::_pbi::ConstantInitialized)86 PROTOBUF_CONSTEXPR InputWindowInfoProto::InputWindowInfoProto(
87 ::_pbi::ConstantInitialized): _impl_{
88 /*decltype(_impl_._has_bits_)*/{}
89 , /*decltype(_impl_._cached_size_)*/{}
90 , /*decltype(_impl_.frame_)*/nullptr
91 , /*decltype(_impl_.touchable_region_)*/nullptr
92 , /*decltype(_impl_.touchable_region_crop_)*/nullptr
93 , /*decltype(_impl_.transform_)*/nullptr
94 , /*decltype(_impl_.layout_params_flags_)*/0u
95 , /*decltype(_impl_.layout_params_type_)*/0
96 , /*decltype(_impl_.surface_inset_)*/0
97 , /*decltype(_impl_.visible_)*/false
98 , /*decltype(_impl_.can_receive_keys_)*/false
99 , /*decltype(_impl_.focusable_)*/false
100 , /*decltype(_impl_.has_wallpaper_)*/false
101 , /*decltype(_impl_.global_scale_factor_)*/0
102 , /*decltype(_impl_.window_x_scale_)*/0
103 , /*decltype(_impl_.window_y_scale_)*/0
104 , /*decltype(_impl_.crop_layer_id_)*/0
105 , /*decltype(_impl_.replace_touchable_region_with_crop_)*/false
106 , /*decltype(_impl_.input_config_)*/0u} {}
107 struct InputWindowInfoProtoDefaultTypeInternal {
InputWindowInfoProtoDefaultTypeInternalperfetto::protos::InputWindowInfoProtoDefaultTypeInternal108 PROTOBUF_CONSTEXPR InputWindowInfoProtoDefaultTypeInternal()
109 : _instance(::_pbi::ConstantInitialized{}) {}
~InputWindowInfoProtoDefaultTypeInternalperfetto::protos::InputWindowInfoProtoDefaultTypeInternal110 ~InputWindowInfoProtoDefaultTypeInternal() {}
111 union { // NOLINT(misc-non-private-member-variables-in-classes)
112 InputWindowInfoProto _instance;
113 };
114 };
115 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InputWindowInfoProtoDefaultTypeInternal _InputWindowInfoProto_default_instance_;
BlurRegion(::_pbi::ConstantInitialized)116 PROTOBUF_CONSTEXPR BlurRegion::BlurRegion(
117 ::_pbi::ConstantInitialized): _impl_{
118 /*decltype(_impl_._has_bits_)*/{}
119 , /*decltype(_impl_._cached_size_)*/{}
120 , /*decltype(_impl_.blur_radius_)*/0u
121 , /*decltype(_impl_.corner_radius_tl_)*/0u
122 , /*decltype(_impl_.corner_radius_tr_)*/0u
123 , /*decltype(_impl_.corner_radius_bl_)*/0u
124 , /*decltype(_impl_.corner_radius_br_)*/0
125 , /*decltype(_impl_.alpha_)*/0
126 , /*decltype(_impl_.left_)*/0
127 , /*decltype(_impl_.top_)*/0
128 , /*decltype(_impl_.right_)*/0
129 , /*decltype(_impl_.bottom_)*/0} {}
130 struct BlurRegionDefaultTypeInternal {
BlurRegionDefaultTypeInternalperfetto::protos::BlurRegionDefaultTypeInternal131 PROTOBUF_CONSTEXPR BlurRegionDefaultTypeInternal()
132 : _instance(::_pbi::ConstantInitialized{}) {}
~BlurRegionDefaultTypeInternalperfetto::protos::BlurRegionDefaultTypeInternal133 ~BlurRegionDefaultTypeInternal() {}
134 union { // NOLINT(misc-non-private-member-variables-in-classes)
135 BlurRegion _instance;
136 };
137 };
138 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BlurRegionDefaultTypeInternal _BlurRegion_default_instance_;
ColorTransformProto(::_pbi::ConstantInitialized)139 PROTOBUF_CONSTEXPR ColorTransformProto::ColorTransformProto(
140 ::_pbi::ConstantInitialized): _impl_{
141 /*decltype(_impl_.val_)*/{}
142 , /*decltype(_impl_._cached_size_)*/{}} {}
143 struct ColorTransformProtoDefaultTypeInternal {
ColorTransformProtoDefaultTypeInternalperfetto::protos::ColorTransformProtoDefaultTypeInternal144 PROTOBUF_CONSTEXPR ColorTransformProtoDefaultTypeInternal()
145 : _instance(::_pbi::ConstantInitialized{}) {}
~ColorTransformProtoDefaultTypeInternalperfetto::protos::ColorTransformProtoDefaultTypeInternal146 ~ColorTransformProtoDefaultTypeInternal() {}
147 union { // NOLINT(misc-non-private-member-variables-in-classes)
148 ColorTransformProto _instance;
149 };
150 };
151 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ColorTransformProtoDefaultTypeInternal _ColorTransformProto_default_instance_;
152 } // namespace protos
153 } // namespace perfetto
154 namespace perfetto {
155 namespace protos {
TrustedOverlay_IsValid(int value)156 bool TrustedOverlay_IsValid(int value) {
157 switch (value) {
158 case 0:
159 case 1:
160 case 2:
161 return true;
162 default:
163 return false;
164 }
165 }
166
167 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> TrustedOverlay_strings[3] = {};
168
169 static const char TrustedOverlay_names[] =
170 "DISABLED"
171 "ENABLED"
172 "UNSET";
173
174 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry TrustedOverlay_entries[] = {
175 { {TrustedOverlay_names + 0, 8}, 1 },
176 { {TrustedOverlay_names + 8, 7}, 2 },
177 { {TrustedOverlay_names + 15, 5}, 0 },
178 };
179
180 static const int TrustedOverlay_entries_by_number[] = {
181 2, // 0 -> UNSET
182 0, // 1 -> DISABLED
183 1, // 2 -> ENABLED
184 };
185
TrustedOverlay_Name(TrustedOverlay value)186 const std::string& TrustedOverlay_Name(
187 TrustedOverlay value) {
188 static const bool dummy =
189 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
190 TrustedOverlay_entries,
191 TrustedOverlay_entries_by_number,
192 3, TrustedOverlay_strings);
193 (void) dummy;
194 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
195 TrustedOverlay_entries,
196 TrustedOverlay_entries_by_number,
197 3, value);
198 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
199 TrustedOverlay_strings[idx].get();
200 }
TrustedOverlay_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,TrustedOverlay * value)201 bool TrustedOverlay_Parse(
202 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TrustedOverlay* value) {
203 int int_value;
204 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
205 TrustedOverlay_entries, 3, name, &int_value);
206 if (success) {
207 *value = static_cast<TrustedOverlay>(int_value);
208 }
209 return success;
210 }
211
212 // ===================================================================
213
214 class RegionProto::_Internal {
215 public:
216 };
217
clear_rect()218 void RegionProto::clear_rect() {
219 _impl_.rect_.Clear();
220 }
RegionProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)221 RegionProto::RegionProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
222 bool is_message_owned)
223 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
224 SharedCtor(arena, is_message_owned);
225 // @@protoc_insertion_point(arena_constructor:perfetto.protos.RegionProto)
226 }
RegionProto(const RegionProto & from)227 RegionProto::RegionProto(const RegionProto& from)
228 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
229 RegionProto* const _this = this; (void)_this;
230 new (&_impl_) Impl_{
231 decltype(_impl_.rect_){from._impl_.rect_}
232 , /*decltype(_impl_._cached_size_)*/{}};
233
234 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
235 // @@protoc_insertion_point(copy_constructor:perfetto.protos.RegionProto)
236 }
237
SharedCtor(::_pb::Arena * arena,bool is_message_owned)238 inline void RegionProto::SharedCtor(
239 ::_pb::Arena* arena, bool is_message_owned) {
240 (void)arena;
241 (void)is_message_owned;
242 new (&_impl_) Impl_{
243 decltype(_impl_.rect_){arena}
244 , /*decltype(_impl_._cached_size_)*/{}
245 };
246 }
247
~RegionProto()248 RegionProto::~RegionProto() {
249 // @@protoc_insertion_point(destructor:perfetto.protos.RegionProto)
250 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
251 (void)arena;
252 return;
253 }
254 SharedDtor();
255 }
256
SharedDtor()257 inline void RegionProto::SharedDtor() {
258 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
259 _impl_.rect_.~RepeatedPtrField();
260 }
261
SetCachedSize(int size) const262 void RegionProto::SetCachedSize(int size) const {
263 _impl_._cached_size_.Set(size);
264 }
265
Clear()266 void RegionProto::Clear() {
267 // @@protoc_insertion_point(message_clear_start:perfetto.protos.RegionProto)
268 ::uint32_t cached_has_bits = 0;
269 // Prevent compiler warnings about cached_has_bits being unused
270 (void) cached_has_bits;
271
272 _impl_.rect_.Clear();
273 _internal_metadata_.Clear<std::string>();
274 }
275
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)276 const char* RegionProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
277 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
278 while (!ctx->Done(&ptr)) {
279 ::uint32_t tag;
280 ptr = ::_pbi::ReadTag(ptr, &tag);
281 switch (tag >> 3) {
282 // repeated .perfetto.protos.RectProto rect = 2;
283 case 2:
284 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
285 ptr -= 1;
286 do {
287 ptr += 1;
288 ptr = ctx->ParseMessage(_internal_add_rect(), ptr);
289 CHK_(ptr);
290 if (!ctx->DataAvailable(ptr)) break;
291 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
292 } else {
293 goto handle_unusual;
294 }
295 continue;
296 default:
297 goto handle_unusual;
298 } // switch
299 handle_unusual:
300 if ((tag == 0) || ((tag & 7) == 4)) {
301 CHK_(ptr);
302 ctx->SetLastTag(tag);
303 goto message_done;
304 }
305 ptr = UnknownFieldParse(
306 tag,
307 _internal_metadata_.mutable_unknown_fields<std::string>(),
308 ptr, ctx);
309 CHK_(ptr != nullptr);
310 } // while
311 message_done:
312 return ptr;
313 failure:
314 ptr = nullptr;
315 goto message_done;
316 #undef CHK_
317 }
318
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const319 ::uint8_t* RegionProto::_InternalSerialize(
320 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
321 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.RegionProto)
322 ::uint32_t cached_has_bits = 0;
323 (void) cached_has_bits;
324
325 // repeated .perfetto.protos.RectProto rect = 2;
326 for (unsigned i = 0,
327 n = static_cast<unsigned>(this->_internal_rect_size()); i < n; i++) {
328 const auto& repfield = this->_internal_rect(i);
329 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
330 InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
331 }
332
333 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
334 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
335 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
336 }
337 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.RegionProto)
338 return target;
339 }
340
ByteSizeLong() const341 size_t RegionProto::ByteSizeLong() const {
342 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.RegionProto)
343 size_t total_size = 0;
344
345 ::uint32_t cached_has_bits = 0;
346 // Prevent compiler warnings about cached_has_bits being unused
347 (void) cached_has_bits;
348
349 // repeated .perfetto.protos.RectProto rect = 2;
350 total_size += 1UL * this->_internal_rect_size();
351 for (const auto& msg : this->_impl_.rect_) {
352 total_size +=
353 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
354 }
355
356 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
357 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
358 }
359 int cached_size = ::_pbi::ToCachedSize(total_size);
360 SetCachedSize(cached_size);
361 return total_size;
362 }
363
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)364 void RegionProto::CheckTypeAndMergeFrom(
365 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
366 MergeFrom(*::_pbi::DownCast<const RegionProto*>(
367 &from));
368 }
369
MergeFrom(const RegionProto & from)370 void RegionProto::MergeFrom(const RegionProto& from) {
371 RegionProto* const _this = this;
372 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.RegionProto)
373 GOOGLE_DCHECK_NE(&from, _this);
374 ::uint32_t cached_has_bits = 0;
375 (void) cached_has_bits;
376
377 _this->_impl_.rect_.MergeFrom(from._impl_.rect_);
378 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
379 }
380
CopyFrom(const RegionProto & from)381 void RegionProto::CopyFrom(const RegionProto& from) {
382 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.RegionProto)
383 if (&from == this) return;
384 Clear();
385 MergeFrom(from);
386 }
387
IsInitialized() const388 bool RegionProto::IsInitialized() const {
389 return true;
390 }
391
InternalSwap(RegionProto * other)392 void RegionProto::InternalSwap(RegionProto* other) {
393 using std::swap;
394 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
395 _impl_.rect_.InternalSwap(&other->_impl_.rect_);
396 }
397
GetTypeName() const398 std::string RegionProto::GetTypeName() const {
399 return "perfetto.protos.RegionProto";
400 }
401
402
403 // ===================================================================
404
405 class SizeProto::_Internal {
406 public:
407 using HasBits = decltype(std::declval<SizeProto>()._impl_._has_bits_);
set_has_w(HasBits * has_bits)408 static void set_has_w(HasBits* has_bits) {
409 (*has_bits)[0] |= 1u;
410 }
set_has_h(HasBits * has_bits)411 static void set_has_h(HasBits* has_bits) {
412 (*has_bits)[0] |= 2u;
413 }
414 };
415
SizeProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)416 SizeProto::SizeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
417 bool is_message_owned)
418 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
419 SharedCtor(arena, is_message_owned);
420 // @@protoc_insertion_point(arena_constructor:perfetto.protos.SizeProto)
421 }
SizeProto(const SizeProto & from)422 SizeProto::SizeProto(const SizeProto& from)
423 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
424 SizeProto* const _this = this; (void)_this;
425 new (&_impl_) Impl_{
426 decltype(_impl_._has_bits_){from._impl_._has_bits_}
427 , /*decltype(_impl_._cached_size_)*/{}
428 , decltype(_impl_.w_){}
429 , decltype(_impl_.h_){}};
430
431 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
432 ::memcpy(&_impl_.w_, &from._impl_.w_,
433 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.h_) -
434 reinterpret_cast<char*>(&_impl_.w_)) + sizeof(_impl_.h_));
435 // @@protoc_insertion_point(copy_constructor:perfetto.protos.SizeProto)
436 }
437
SharedCtor(::_pb::Arena * arena,bool is_message_owned)438 inline void SizeProto::SharedCtor(
439 ::_pb::Arena* arena, bool is_message_owned) {
440 (void)arena;
441 (void)is_message_owned;
442 new (&_impl_) Impl_{
443 decltype(_impl_._has_bits_){}
444 , /*decltype(_impl_._cached_size_)*/{}
445 , decltype(_impl_.w_){0}
446 , decltype(_impl_.h_){0}
447 };
448 }
449
~SizeProto()450 SizeProto::~SizeProto() {
451 // @@protoc_insertion_point(destructor:perfetto.protos.SizeProto)
452 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
453 (void)arena;
454 return;
455 }
456 SharedDtor();
457 }
458
SharedDtor()459 inline void SizeProto::SharedDtor() {
460 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
461 }
462
SetCachedSize(int size) const463 void SizeProto::SetCachedSize(int size) const {
464 _impl_._cached_size_.Set(size);
465 }
466
Clear()467 void SizeProto::Clear() {
468 // @@protoc_insertion_point(message_clear_start:perfetto.protos.SizeProto)
469 ::uint32_t cached_has_bits = 0;
470 // Prevent compiler warnings about cached_has_bits being unused
471 (void) cached_has_bits;
472
473 cached_has_bits = _impl_._has_bits_[0];
474 if (cached_has_bits & 0x00000003u) {
475 ::memset(&_impl_.w_, 0, static_cast<size_t>(
476 reinterpret_cast<char*>(&_impl_.h_) -
477 reinterpret_cast<char*>(&_impl_.w_)) + sizeof(_impl_.h_));
478 }
479 _impl_._has_bits_.Clear();
480 _internal_metadata_.Clear<std::string>();
481 }
482
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)483 const char* SizeProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
484 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
485 _Internal::HasBits has_bits{};
486 while (!ctx->Done(&ptr)) {
487 ::uint32_t tag;
488 ptr = ::_pbi::ReadTag(ptr, &tag);
489 switch (tag >> 3) {
490 // optional int32 w = 1;
491 case 1:
492 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
493 _Internal::set_has_w(&has_bits);
494 _impl_.w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
495 CHK_(ptr);
496 } else {
497 goto handle_unusual;
498 }
499 continue;
500 // optional int32 h = 2;
501 case 2:
502 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
503 _Internal::set_has_h(&has_bits);
504 _impl_.h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
505 CHK_(ptr);
506 } else {
507 goto handle_unusual;
508 }
509 continue;
510 default:
511 goto handle_unusual;
512 } // switch
513 handle_unusual:
514 if ((tag == 0) || ((tag & 7) == 4)) {
515 CHK_(ptr);
516 ctx->SetLastTag(tag);
517 goto message_done;
518 }
519 ptr = UnknownFieldParse(
520 tag,
521 _internal_metadata_.mutable_unknown_fields<std::string>(),
522 ptr, ctx);
523 CHK_(ptr != nullptr);
524 } // while
525 message_done:
526 _impl_._has_bits_.Or(has_bits);
527 return ptr;
528 failure:
529 ptr = nullptr;
530 goto message_done;
531 #undef CHK_
532 }
533
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const534 ::uint8_t* SizeProto::_InternalSerialize(
535 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
536 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.SizeProto)
537 ::uint32_t cached_has_bits = 0;
538 (void) cached_has_bits;
539
540 cached_has_bits = _impl_._has_bits_[0];
541 // optional int32 w = 1;
542 if (cached_has_bits & 0x00000001u) {
543 target = stream->EnsureSpace(target);
544 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_w(), target);
545 }
546
547 // optional int32 h = 2;
548 if (cached_has_bits & 0x00000002u) {
549 target = stream->EnsureSpace(target);
550 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_h(), target);
551 }
552
553 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
554 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
555 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
556 }
557 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.SizeProto)
558 return target;
559 }
560
ByteSizeLong() const561 size_t SizeProto::ByteSizeLong() const {
562 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.SizeProto)
563 size_t total_size = 0;
564
565 ::uint32_t cached_has_bits = 0;
566 // Prevent compiler warnings about cached_has_bits being unused
567 (void) cached_has_bits;
568
569 cached_has_bits = _impl_._has_bits_[0];
570 if (cached_has_bits & 0x00000003u) {
571 // optional int32 w = 1;
572 if (cached_has_bits & 0x00000001u) {
573 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_w());
574 }
575
576 // optional int32 h = 2;
577 if (cached_has_bits & 0x00000002u) {
578 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_h());
579 }
580
581 }
582 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
583 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
584 }
585 int cached_size = ::_pbi::ToCachedSize(total_size);
586 SetCachedSize(cached_size);
587 return total_size;
588 }
589
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)590 void SizeProto::CheckTypeAndMergeFrom(
591 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
592 MergeFrom(*::_pbi::DownCast<const SizeProto*>(
593 &from));
594 }
595
MergeFrom(const SizeProto & from)596 void SizeProto::MergeFrom(const SizeProto& from) {
597 SizeProto* const _this = this;
598 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.SizeProto)
599 GOOGLE_DCHECK_NE(&from, _this);
600 ::uint32_t cached_has_bits = 0;
601 (void) cached_has_bits;
602
603 cached_has_bits = from._impl_._has_bits_[0];
604 if (cached_has_bits & 0x00000003u) {
605 if (cached_has_bits & 0x00000001u) {
606 _this->_impl_.w_ = from._impl_.w_;
607 }
608 if (cached_has_bits & 0x00000002u) {
609 _this->_impl_.h_ = from._impl_.h_;
610 }
611 _this->_impl_._has_bits_[0] |= cached_has_bits;
612 }
613 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
614 }
615
CopyFrom(const SizeProto & from)616 void SizeProto::CopyFrom(const SizeProto& from) {
617 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.SizeProto)
618 if (&from == this) return;
619 Clear();
620 MergeFrom(from);
621 }
622
IsInitialized() const623 bool SizeProto::IsInitialized() const {
624 return true;
625 }
626
InternalSwap(SizeProto * other)627 void SizeProto::InternalSwap(SizeProto* other) {
628 using std::swap;
629 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
630 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
631 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
632 PROTOBUF_FIELD_OFFSET(SizeProto, _impl_.h_)
633 + sizeof(SizeProto::_impl_.h_) // NOLINT
634 - PROTOBUF_FIELD_OFFSET(SizeProto, _impl_.w_)>(
635 reinterpret_cast<char*>(&_impl_.w_),
636 reinterpret_cast<char*>(&other->_impl_.w_));
637 }
638
GetTypeName() const639 std::string SizeProto::GetTypeName() const {
640 return "perfetto.protos.SizeProto";
641 }
642
643
644 // ===================================================================
645
646 class TransformProto::_Internal {
647 public:
648 using HasBits = decltype(std::declval<TransformProto>()._impl_._has_bits_);
set_has_dsdx(HasBits * has_bits)649 static void set_has_dsdx(HasBits* has_bits) {
650 (*has_bits)[0] |= 1u;
651 }
set_has_dtdx(HasBits * has_bits)652 static void set_has_dtdx(HasBits* has_bits) {
653 (*has_bits)[0] |= 2u;
654 }
set_has_dsdy(HasBits * has_bits)655 static void set_has_dsdy(HasBits* has_bits) {
656 (*has_bits)[0] |= 4u;
657 }
set_has_dtdy(HasBits * has_bits)658 static void set_has_dtdy(HasBits* has_bits) {
659 (*has_bits)[0] |= 8u;
660 }
set_has_type(HasBits * has_bits)661 static void set_has_type(HasBits* has_bits) {
662 (*has_bits)[0] |= 16u;
663 }
664 };
665
TransformProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)666 TransformProto::TransformProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
667 bool is_message_owned)
668 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
669 SharedCtor(arena, is_message_owned);
670 // @@protoc_insertion_point(arena_constructor:perfetto.protos.TransformProto)
671 }
TransformProto(const TransformProto & from)672 TransformProto::TransformProto(const TransformProto& from)
673 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
674 TransformProto* const _this = this; (void)_this;
675 new (&_impl_) Impl_{
676 decltype(_impl_._has_bits_){from._impl_._has_bits_}
677 , /*decltype(_impl_._cached_size_)*/{}
678 , decltype(_impl_.dsdx_){}
679 , decltype(_impl_.dtdx_){}
680 , decltype(_impl_.dsdy_){}
681 , decltype(_impl_.dtdy_){}
682 , decltype(_impl_.type_){}};
683
684 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
685 ::memcpy(&_impl_.dsdx_, &from._impl_.dsdx_,
686 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.type_) -
687 reinterpret_cast<char*>(&_impl_.dsdx_)) + sizeof(_impl_.type_));
688 // @@protoc_insertion_point(copy_constructor:perfetto.protos.TransformProto)
689 }
690
SharedCtor(::_pb::Arena * arena,bool is_message_owned)691 inline void TransformProto::SharedCtor(
692 ::_pb::Arena* arena, bool is_message_owned) {
693 (void)arena;
694 (void)is_message_owned;
695 new (&_impl_) Impl_{
696 decltype(_impl_._has_bits_){}
697 , /*decltype(_impl_._cached_size_)*/{}
698 , decltype(_impl_.dsdx_){0}
699 , decltype(_impl_.dtdx_){0}
700 , decltype(_impl_.dsdy_){0}
701 , decltype(_impl_.dtdy_){0}
702 , decltype(_impl_.type_){0}
703 };
704 }
705
~TransformProto()706 TransformProto::~TransformProto() {
707 // @@protoc_insertion_point(destructor:perfetto.protos.TransformProto)
708 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
709 (void)arena;
710 return;
711 }
712 SharedDtor();
713 }
714
SharedDtor()715 inline void TransformProto::SharedDtor() {
716 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
717 }
718
SetCachedSize(int size) const719 void TransformProto::SetCachedSize(int size) const {
720 _impl_._cached_size_.Set(size);
721 }
722
Clear()723 void TransformProto::Clear() {
724 // @@protoc_insertion_point(message_clear_start:perfetto.protos.TransformProto)
725 ::uint32_t cached_has_bits = 0;
726 // Prevent compiler warnings about cached_has_bits being unused
727 (void) cached_has_bits;
728
729 cached_has_bits = _impl_._has_bits_[0];
730 if (cached_has_bits & 0x0000001fu) {
731 ::memset(&_impl_.dsdx_, 0, static_cast<size_t>(
732 reinterpret_cast<char*>(&_impl_.type_) -
733 reinterpret_cast<char*>(&_impl_.dsdx_)) + sizeof(_impl_.type_));
734 }
735 _impl_._has_bits_.Clear();
736 _internal_metadata_.Clear<std::string>();
737 }
738
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)739 const char* TransformProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
740 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
741 _Internal::HasBits has_bits{};
742 while (!ctx->Done(&ptr)) {
743 ::uint32_t tag;
744 ptr = ::_pbi::ReadTag(ptr, &tag);
745 switch (tag >> 3) {
746 // optional float dsdx = 1;
747 case 1:
748 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 13)) {
749 _Internal::set_has_dsdx(&has_bits);
750 _impl_.dsdx_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
751 ptr += sizeof(float);
752 } else {
753 goto handle_unusual;
754 }
755 continue;
756 // optional float dtdx = 2;
757 case 2:
758 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 21)) {
759 _Internal::set_has_dtdx(&has_bits);
760 _impl_.dtdx_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
761 ptr += sizeof(float);
762 } else {
763 goto handle_unusual;
764 }
765 continue;
766 // optional float dsdy = 3;
767 case 3:
768 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 29)) {
769 _Internal::set_has_dsdy(&has_bits);
770 _impl_.dsdy_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
771 ptr += sizeof(float);
772 } else {
773 goto handle_unusual;
774 }
775 continue;
776 // optional float dtdy = 4;
777 case 4:
778 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 37)) {
779 _Internal::set_has_dtdy(&has_bits);
780 _impl_.dtdy_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
781 ptr += sizeof(float);
782 } else {
783 goto handle_unusual;
784 }
785 continue;
786 // optional int32 type = 5;
787 case 5:
788 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
789 _Internal::set_has_type(&has_bits);
790 _impl_.type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
791 CHK_(ptr);
792 } else {
793 goto handle_unusual;
794 }
795 continue;
796 default:
797 goto handle_unusual;
798 } // switch
799 handle_unusual:
800 if ((tag == 0) || ((tag & 7) == 4)) {
801 CHK_(ptr);
802 ctx->SetLastTag(tag);
803 goto message_done;
804 }
805 ptr = UnknownFieldParse(
806 tag,
807 _internal_metadata_.mutable_unknown_fields<std::string>(),
808 ptr, ctx);
809 CHK_(ptr != nullptr);
810 } // while
811 message_done:
812 _impl_._has_bits_.Or(has_bits);
813 return ptr;
814 failure:
815 ptr = nullptr;
816 goto message_done;
817 #undef CHK_
818 }
819
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const820 ::uint8_t* TransformProto::_InternalSerialize(
821 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
822 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.TransformProto)
823 ::uint32_t cached_has_bits = 0;
824 (void) cached_has_bits;
825
826 cached_has_bits = _impl_._has_bits_[0];
827 // optional float dsdx = 1;
828 if (cached_has_bits & 0x00000001u) {
829 target = stream->EnsureSpace(target);
830 target = ::_pbi::WireFormatLite::WriteFloatToArray(1, this->_internal_dsdx(), target);
831 }
832
833 // optional float dtdx = 2;
834 if (cached_has_bits & 0x00000002u) {
835 target = stream->EnsureSpace(target);
836 target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_dtdx(), target);
837 }
838
839 // optional float dsdy = 3;
840 if (cached_has_bits & 0x00000004u) {
841 target = stream->EnsureSpace(target);
842 target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_dsdy(), target);
843 }
844
845 // optional float dtdy = 4;
846 if (cached_has_bits & 0x00000008u) {
847 target = stream->EnsureSpace(target);
848 target = ::_pbi::WireFormatLite::WriteFloatToArray(4, this->_internal_dtdy(), target);
849 }
850
851 // optional int32 type = 5;
852 if (cached_has_bits & 0x00000010u) {
853 target = stream->EnsureSpace(target);
854 target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_type(), target);
855 }
856
857 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
858 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
859 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
860 }
861 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.TransformProto)
862 return target;
863 }
864
ByteSizeLong() const865 size_t TransformProto::ByteSizeLong() const {
866 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.TransformProto)
867 size_t total_size = 0;
868
869 ::uint32_t cached_has_bits = 0;
870 // Prevent compiler warnings about cached_has_bits being unused
871 (void) cached_has_bits;
872
873 cached_has_bits = _impl_._has_bits_[0];
874 if (cached_has_bits & 0x0000001fu) {
875 // optional float dsdx = 1;
876 if (cached_has_bits & 0x00000001u) {
877 total_size += 1 + 4;
878 }
879
880 // optional float dtdx = 2;
881 if (cached_has_bits & 0x00000002u) {
882 total_size += 1 + 4;
883 }
884
885 // optional float dsdy = 3;
886 if (cached_has_bits & 0x00000004u) {
887 total_size += 1 + 4;
888 }
889
890 // optional float dtdy = 4;
891 if (cached_has_bits & 0x00000008u) {
892 total_size += 1 + 4;
893 }
894
895 // optional int32 type = 5;
896 if (cached_has_bits & 0x00000010u) {
897 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_type());
898 }
899
900 }
901 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
902 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
903 }
904 int cached_size = ::_pbi::ToCachedSize(total_size);
905 SetCachedSize(cached_size);
906 return total_size;
907 }
908
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)909 void TransformProto::CheckTypeAndMergeFrom(
910 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
911 MergeFrom(*::_pbi::DownCast<const TransformProto*>(
912 &from));
913 }
914
MergeFrom(const TransformProto & from)915 void TransformProto::MergeFrom(const TransformProto& from) {
916 TransformProto* const _this = this;
917 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.TransformProto)
918 GOOGLE_DCHECK_NE(&from, _this);
919 ::uint32_t cached_has_bits = 0;
920 (void) cached_has_bits;
921
922 cached_has_bits = from._impl_._has_bits_[0];
923 if (cached_has_bits & 0x0000001fu) {
924 if (cached_has_bits & 0x00000001u) {
925 _this->_impl_.dsdx_ = from._impl_.dsdx_;
926 }
927 if (cached_has_bits & 0x00000002u) {
928 _this->_impl_.dtdx_ = from._impl_.dtdx_;
929 }
930 if (cached_has_bits & 0x00000004u) {
931 _this->_impl_.dsdy_ = from._impl_.dsdy_;
932 }
933 if (cached_has_bits & 0x00000008u) {
934 _this->_impl_.dtdy_ = from._impl_.dtdy_;
935 }
936 if (cached_has_bits & 0x00000010u) {
937 _this->_impl_.type_ = from._impl_.type_;
938 }
939 _this->_impl_._has_bits_[0] |= cached_has_bits;
940 }
941 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
942 }
943
CopyFrom(const TransformProto & from)944 void TransformProto::CopyFrom(const TransformProto& from) {
945 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.TransformProto)
946 if (&from == this) return;
947 Clear();
948 MergeFrom(from);
949 }
950
IsInitialized() const951 bool TransformProto::IsInitialized() const {
952 return true;
953 }
954
InternalSwap(TransformProto * other)955 void TransformProto::InternalSwap(TransformProto* other) {
956 using std::swap;
957 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
958 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
959 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
960 PROTOBUF_FIELD_OFFSET(TransformProto, _impl_.type_)
961 + sizeof(TransformProto::_impl_.type_) // NOLINT
962 - PROTOBUF_FIELD_OFFSET(TransformProto, _impl_.dsdx_)>(
963 reinterpret_cast<char*>(&_impl_.dsdx_),
964 reinterpret_cast<char*>(&other->_impl_.dsdx_));
965 }
966
GetTypeName() const967 std::string TransformProto::GetTypeName() const {
968 return "perfetto.protos.TransformProto";
969 }
970
971
972 // ===================================================================
973
974 class ColorProto::_Internal {
975 public:
976 using HasBits = decltype(std::declval<ColorProto>()._impl_._has_bits_);
set_has_r(HasBits * has_bits)977 static void set_has_r(HasBits* has_bits) {
978 (*has_bits)[0] |= 1u;
979 }
set_has_g(HasBits * has_bits)980 static void set_has_g(HasBits* has_bits) {
981 (*has_bits)[0] |= 2u;
982 }
set_has_b(HasBits * has_bits)983 static void set_has_b(HasBits* has_bits) {
984 (*has_bits)[0] |= 4u;
985 }
set_has_a(HasBits * has_bits)986 static void set_has_a(HasBits* has_bits) {
987 (*has_bits)[0] |= 8u;
988 }
989 };
990
ColorProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)991 ColorProto::ColorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
992 bool is_message_owned)
993 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
994 SharedCtor(arena, is_message_owned);
995 // @@protoc_insertion_point(arena_constructor:perfetto.protos.ColorProto)
996 }
ColorProto(const ColorProto & from)997 ColorProto::ColorProto(const ColorProto& from)
998 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
999 ColorProto* const _this = this; (void)_this;
1000 new (&_impl_) Impl_{
1001 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1002 , /*decltype(_impl_._cached_size_)*/{}
1003 , decltype(_impl_.r_){}
1004 , decltype(_impl_.g_){}
1005 , decltype(_impl_.b_){}
1006 , decltype(_impl_.a_){}};
1007
1008 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1009 ::memcpy(&_impl_.r_, &from._impl_.r_,
1010 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.a_) -
1011 reinterpret_cast<char*>(&_impl_.r_)) + sizeof(_impl_.a_));
1012 // @@protoc_insertion_point(copy_constructor:perfetto.protos.ColorProto)
1013 }
1014
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1015 inline void ColorProto::SharedCtor(
1016 ::_pb::Arena* arena, bool is_message_owned) {
1017 (void)arena;
1018 (void)is_message_owned;
1019 new (&_impl_) Impl_{
1020 decltype(_impl_._has_bits_){}
1021 , /*decltype(_impl_._cached_size_)*/{}
1022 , decltype(_impl_.r_){0}
1023 , decltype(_impl_.g_){0}
1024 , decltype(_impl_.b_){0}
1025 , decltype(_impl_.a_){0}
1026 };
1027 }
1028
~ColorProto()1029 ColorProto::~ColorProto() {
1030 // @@protoc_insertion_point(destructor:perfetto.protos.ColorProto)
1031 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1032 (void)arena;
1033 return;
1034 }
1035 SharedDtor();
1036 }
1037
SharedDtor()1038 inline void ColorProto::SharedDtor() {
1039 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1040 }
1041
SetCachedSize(int size) const1042 void ColorProto::SetCachedSize(int size) const {
1043 _impl_._cached_size_.Set(size);
1044 }
1045
Clear()1046 void ColorProto::Clear() {
1047 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ColorProto)
1048 ::uint32_t cached_has_bits = 0;
1049 // Prevent compiler warnings about cached_has_bits being unused
1050 (void) cached_has_bits;
1051
1052 cached_has_bits = _impl_._has_bits_[0];
1053 if (cached_has_bits & 0x0000000fu) {
1054 ::memset(&_impl_.r_, 0, static_cast<size_t>(
1055 reinterpret_cast<char*>(&_impl_.a_) -
1056 reinterpret_cast<char*>(&_impl_.r_)) + sizeof(_impl_.a_));
1057 }
1058 _impl_._has_bits_.Clear();
1059 _internal_metadata_.Clear<std::string>();
1060 }
1061
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1062 const char* ColorProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1063 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1064 _Internal::HasBits has_bits{};
1065 while (!ctx->Done(&ptr)) {
1066 ::uint32_t tag;
1067 ptr = ::_pbi::ReadTag(ptr, &tag);
1068 switch (tag >> 3) {
1069 // optional float r = 1;
1070 case 1:
1071 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 13)) {
1072 _Internal::set_has_r(&has_bits);
1073 _impl_.r_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
1074 ptr += sizeof(float);
1075 } else {
1076 goto handle_unusual;
1077 }
1078 continue;
1079 // optional float g = 2;
1080 case 2:
1081 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 21)) {
1082 _Internal::set_has_g(&has_bits);
1083 _impl_.g_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
1084 ptr += sizeof(float);
1085 } else {
1086 goto handle_unusual;
1087 }
1088 continue;
1089 // optional float b = 3;
1090 case 3:
1091 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 29)) {
1092 _Internal::set_has_b(&has_bits);
1093 _impl_.b_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
1094 ptr += sizeof(float);
1095 } else {
1096 goto handle_unusual;
1097 }
1098 continue;
1099 // optional float a = 4;
1100 case 4:
1101 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 37)) {
1102 _Internal::set_has_a(&has_bits);
1103 _impl_.a_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
1104 ptr += sizeof(float);
1105 } else {
1106 goto handle_unusual;
1107 }
1108 continue;
1109 default:
1110 goto handle_unusual;
1111 } // switch
1112 handle_unusual:
1113 if ((tag == 0) || ((tag & 7) == 4)) {
1114 CHK_(ptr);
1115 ctx->SetLastTag(tag);
1116 goto message_done;
1117 }
1118 ptr = UnknownFieldParse(
1119 tag,
1120 _internal_metadata_.mutable_unknown_fields<std::string>(),
1121 ptr, ctx);
1122 CHK_(ptr != nullptr);
1123 } // while
1124 message_done:
1125 _impl_._has_bits_.Or(has_bits);
1126 return ptr;
1127 failure:
1128 ptr = nullptr;
1129 goto message_done;
1130 #undef CHK_
1131 }
1132
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1133 ::uint8_t* ColorProto::_InternalSerialize(
1134 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1135 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ColorProto)
1136 ::uint32_t cached_has_bits = 0;
1137 (void) cached_has_bits;
1138
1139 cached_has_bits = _impl_._has_bits_[0];
1140 // optional float r = 1;
1141 if (cached_has_bits & 0x00000001u) {
1142 target = stream->EnsureSpace(target);
1143 target = ::_pbi::WireFormatLite::WriteFloatToArray(1, this->_internal_r(), target);
1144 }
1145
1146 // optional float g = 2;
1147 if (cached_has_bits & 0x00000002u) {
1148 target = stream->EnsureSpace(target);
1149 target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_g(), target);
1150 }
1151
1152 // optional float b = 3;
1153 if (cached_has_bits & 0x00000004u) {
1154 target = stream->EnsureSpace(target);
1155 target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_b(), target);
1156 }
1157
1158 // optional float a = 4;
1159 if (cached_has_bits & 0x00000008u) {
1160 target = stream->EnsureSpace(target);
1161 target = ::_pbi::WireFormatLite::WriteFloatToArray(4, this->_internal_a(), target);
1162 }
1163
1164 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1165 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1166 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1167 }
1168 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ColorProto)
1169 return target;
1170 }
1171
ByteSizeLong() const1172 size_t ColorProto::ByteSizeLong() const {
1173 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ColorProto)
1174 size_t total_size = 0;
1175
1176 ::uint32_t cached_has_bits = 0;
1177 // Prevent compiler warnings about cached_has_bits being unused
1178 (void) cached_has_bits;
1179
1180 cached_has_bits = _impl_._has_bits_[0];
1181 if (cached_has_bits & 0x0000000fu) {
1182 // optional float r = 1;
1183 if (cached_has_bits & 0x00000001u) {
1184 total_size += 1 + 4;
1185 }
1186
1187 // optional float g = 2;
1188 if (cached_has_bits & 0x00000002u) {
1189 total_size += 1 + 4;
1190 }
1191
1192 // optional float b = 3;
1193 if (cached_has_bits & 0x00000004u) {
1194 total_size += 1 + 4;
1195 }
1196
1197 // optional float a = 4;
1198 if (cached_has_bits & 0x00000008u) {
1199 total_size += 1 + 4;
1200 }
1201
1202 }
1203 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1204 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1205 }
1206 int cached_size = ::_pbi::ToCachedSize(total_size);
1207 SetCachedSize(cached_size);
1208 return total_size;
1209 }
1210
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1211 void ColorProto::CheckTypeAndMergeFrom(
1212 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1213 MergeFrom(*::_pbi::DownCast<const ColorProto*>(
1214 &from));
1215 }
1216
MergeFrom(const ColorProto & from)1217 void ColorProto::MergeFrom(const ColorProto& from) {
1218 ColorProto* const _this = this;
1219 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ColorProto)
1220 GOOGLE_DCHECK_NE(&from, _this);
1221 ::uint32_t cached_has_bits = 0;
1222 (void) cached_has_bits;
1223
1224 cached_has_bits = from._impl_._has_bits_[0];
1225 if (cached_has_bits & 0x0000000fu) {
1226 if (cached_has_bits & 0x00000001u) {
1227 _this->_impl_.r_ = from._impl_.r_;
1228 }
1229 if (cached_has_bits & 0x00000002u) {
1230 _this->_impl_.g_ = from._impl_.g_;
1231 }
1232 if (cached_has_bits & 0x00000004u) {
1233 _this->_impl_.b_ = from._impl_.b_;
1234 }
1235 if (cached_has_bits & 0x00000008u) {
1236 _this->_impl_.a_ = from._impl_.a_;
1237 }
1238 _this->_impl_._has_bits_[0] |= cached_has_bits;
1239 }
1240 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1241 }
1242
CopyFrom(const ColorProto & from)1243 void ColorProto::CopyFrom(const ColorProto& from) {
1244 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ColorProto)
1245 if (&from == this) return;
1246 Clear();
1247 MergeFrom(from);
1248 }
1249
IsInitialized() const1250 bool ColorProto::IsInitialized() const {
1251 return true;
1252 }
1253
InternalSwap(ColorProto * other)1254 void ColorProto::InternalSwap(ColorProto* other) {
1255 using std::swap;
1256 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1257 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1258 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1259 PROTOBUF_FIELD_OFFSET(ColorProto, _impl_.a_)
1260 + sizeof(ColorProto::_impl_.a_) // NOLINT
1261 - PROTOBUF_FIELD_OFFSET(ColorProto, _impl_.r_)>(
1262 reinterpret_cast<char*>(&_impl_.r_),
1263 reinterpret_cast<char*>(&other->_impl_.r_));
1264 }
1265
GetTypeName() const1266 std::string ColorProto::GetTypeName() const {
1267 return "perfetto.protos.ColorProto";
1268 }
1269
1270
1271 // ===================================================================
1272
1273 class InputWindowInfoProto::_Internal {
1274 public:
1275 using HasBits = decltype(std::declval<InputWindowInfoProto>()._impl_._has_bits_);
set_has_layout_params_flags(HasBits * has_bits)1276 static void set_has_layout_params_flags(HasBits* has_bits) {
1277 (*has_bits)[0] |= 16u;
1278 }
set_has_layout_params_type(HasBits * has_bits)1279 static void set_has_layout_params_type(HasBits* has_bits) {
1280 (*has_bits)[0] |= 32u;
1281 }
1282 static const ::perfetto::protos::RectProto& frame(const InputWindowInfoProto* msg);
set_has_frame(HasBits * has_bits)1283 static void set_has_frame(HasBits* has_bits) {
1284 (*has_bits)[0] |= 1u;
1285 }
1286 static const ::perfetto::protos::RegionProto& touchable_region(const InputWindowInfoProto* msg);
set_has_touchable_region(HasBits * has_bits)1287 static void set_has_touchable_region(HasBits* has_bits) {
1288 (*has_bits)[0] |= 2u;
1289 }
set_has_surface_inset(HasBits * has_bits)1290 static void set_has_surface_inset(HasBits* has_bits) {
1291 (*has_bits)[0] |= 64u;
1292 }
set_has_visible(HasBits * has_bits)1293 static void set_has_visible(HasBits* has_bits) {
1294 (*has_bits)[0] |= 128u;
1295 }
set_has_can_receive_keys(HasBits * has_bits)1296 static void set_has_can_receive_keys(HasBits* has_bits) {
1297 (*has_bits)[0] |= 256u;
1298 }
set_has_focusable(HasBits * has_bits)1299 static void set_has_focusable(HasBits* has_bits) {
1300 (*has_bits)[0] |= 512u;
1301 }
set_has_has_wallpaper(HasBits * has_bits)1302 static void set_has_has_wallpaper(HasBits* has_bits) {
1303 (*has_bits)[0] |= 1024u;
1304 }
set_has_global_scale_factor(HasBits * has_bits)1305 static void set_has_global_scale_factor(HasBits* has_bits) {
1306 (*has_bits)[0] |= 2048u;
1307 }
set_has_window_x_scale(HasBits * has_bits)1308 static void set_has_window_x_scale(HasBits* has_bits) {
1309 (*has_bits)[0] |= 4096u;
1310 }
set_has_window_y_scale(HasBits * has_bits)1311 static void set_has_window_y_scale(HasBits* has_bits) {
1312 (*has_bits)[0] |= 8192u;
1313 }
set_has_crop_layer_id(HasBits * has_bits)1314 static void set_has_crop_layer_id(HasBits* has_bits) {
1315 (*has_bits)[0] |= 16384u;
1316 }
set_has_replace_touchable_region_with_crop(HasBits * has_bits)1317 static void set_has_replace_touchable_region_with_crop(HasBits* has_bits) {
1318 (*has_bits)[0] |= 32768u;
1319 }
1320 static const ::perfetto::protos::RectProto& touchable_region_crop(const InputWindowInfoProto* msg);
set_has_touchable_region_crop(HasBits * has_bits)1321 static void set_has_touchable_region_crop(HasBits* has_bits) {
1322 (*has_bits)[0] |= 4u;
1323 }
1324 static const ::perfetto::protos::TransformProto& transform(const InputWindowInfoProto* msg);
set_has_transform(HasBits * has_bits)1325 static void set_has_transform(HasBits* has_bits) {
1326 (*has_bits)[0] |= 8u;
1327 }
set_has_input_config(HasBits * has_bits)1328 static void set_has_input_config(HasBits* has_bits) {
1329 (*has_bits)[0] |= 65536u;
1330 }
1331 };
1332
1333 const ::perfetto::protos::RectProto&
frame(const InputWindowInfoProto * msg)1334 InputWindowInfoProto::_Internal::frame(const InputWindowInfoProto* msg) {
1335 return *msg->_impl_.frame_;
1336 }
1337 const ::perfetto::protos::RegionProto&
touchable_region(const InputWindowInfoProto * msg)1338 InputWindowInfoProto::_Internal::touchable_region(const InputWindowInfoProto* msg) {
1339 return *msg->_impl_.touchable_region_;
1340 }
1341 const ::perfetto::protos::RectProto&
touchable_region_crop(const InputWindowInfoProto * msg)1342 InputWindowInfoProto::_Internal::touchable_region_crop(const InputWindowInfoProto* msg) {
1343 return *msg->_impl_.touchable_region_crop_;
1344 }
1345 const ::perfetto::protos::TransformProto&
transform(const InputWindowInfoProto * msg)1346 InputWindowInfoProto::_Internal::transform(const InputWindowInfoProto* msg) {
1347 return *msg->_impl_.transform_;
1348 }
clear_frame()1349 void InputWindowInfoProto::clear_frame() {
1350 if (_impl_.frame_ != nullptr) _impl_.frame_->Clear();
1351 _impl_._has_bits_[0] &= ~0x00000001u;
1352 }
clear_touchable_region_crop()1353 void InputWindowInfoProto::clear_touchable_region_crop() {
1354 if (_impl_.touchable_region_crop_ != nullptr) _impl_.touchable_region_crop_->Clear();
1355 _impl_._has_bits_[0] &= ~0x00000004u;
1356 }
InputWindowInfoProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1357 InputWindowInfoProto::InputWindowInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1358 bool is_message_owned)
1359 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1360 SharedCtor(arena, is_message_owned);
1361 // @@protoc_insertion_point(arena_constructor:perfetto.protos.InputWindowInfoProto)
1362 }
InputWindowInfoProto(const InputWindowInfoProto & from)1363 InputWindowInfoProto::InputWindowInfoProto(const InputWindowInfoProto& from)
1364 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1365 InputWindowInfoProto* const _this = this; (void)_this;
1366 new (&_impl_) Impl_{
1367 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1368 , /*decltype(_impl_._cached_size_)*/{}
1369 , decltype(_impl_.frame_){nullptr}
1370 , decltype(_impl_.touchable_region_){nullptr}
1371 , decltype(_impl_.touchable_region_crop_){nullptr}
1372 , decltype(_impl_.transform_){nullptr}
1373 , decltype(_impl_.layout_params_flags_){}
1374 , decltype(_impl_.layout_params_type_){}
1375 , decltype(_impl_.surface_inset_){}
1376 , decltype(_impl_.visible_){}
1377 , decltype(_impl_.can_receive_keys_){}
1378 , decltype(_impl_.focusable_){}
1379 , decltype(_impl_.has_wallpaper_){}
1380 , decltype(_impl_.global_scale_factor_){}
1381 , decltype(_impl_.window_x_scale_){}
1382 , decltype(_impl_.window_y_scale_){}
1383 , decltype(_impl_.crop_layer_id_){}
1384 , decltype(_impl_.replace_touchable_region_with_crop_){}
1385 , decltype(_impl_.input_config_){}};
1386
1387 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1388 if (from._internal_has_frame()) {
1389 _this->_impl_.frame_ = new ::perfetto::protos::RectProto(*from._impl_.frame_);
1390 }
1391 if (from._internal_has_touchable_region()) {
1392 _this->_impl_.touchable_region_ = new ::perfetto::protos::RegionProto(*from._impl_.touchable_region_);
1393 }
1394 if (from._internal_has_touchable_region_crop()) {
1395 _this->_impl_.touchable_region_crop_ = new ::perfetto::protos::RectProto(*from._impl_.touchable_region_crop_);
1396 }
1397 if (from._internal_has_transform()) {
1398 _this->_impl_.transform_ = new ::perfetto::protos::TransformProto(*from._impl_.transform_);
1399 }
1400 ::memcpy(&_impl_.layout_params_flags_, &from._impl_.layout_params_flags_,
1401 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.input_config_) -
1402 reinterpret_cast<char*>(&_impl_.layout_params_flags_)) + sizeof(_impl_.input_config_));
1403 // @@protoc_insertion_point(copy_constructor:perfetto.protos.InputWindowInfoProto)
1404 }
1405
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1406 inline void InputWindowInfoProto::SharedCtor(
1407 ::_pb::Arena* arena, bool is_message_owned) {
1408 (void)arena;
1409 (void)is_message_owned;
1410 new (&_impl_) Impl_{
1411 decltype(_impl_._has_bits_){}
1412 , /*decltype(_impl_._cached_size_)*/{}
1413 , decltype(_impl_.frame_){nullptr}
1414 , decltype(_impl_.touchable_region_){nullptr}
1415 , decltype(_impl_.touchable_region_crop_){nullptr}
1416 , decltype(_impl_.transform_){nullptr}
1417 , decltype(_impl_.layout_params_flags_){0u}
1418 , decltype(_impl_.layout_params_type_){0}
1419 , decltype(_impl_.surface_inset_){0}
1420 , decltype(_impl_.visible_){false}
1421 , decltype(_impl_.can_receive_keys_){false}
1422 , decltype(_impl_.focusable_){false}
1423 , decltype(_impl_.has_wallpaper_){false}
1424 , decltype(_impl_.global_scale_factor_){0}
1425 , decltype(_impl_.window_x_scale_){0}
1426 , decltype(_impl_.window_y_scale_){0}
1427 , decltype(_impl_.crop_layer_id_){0}
1428 , decltype(_impl_.replace_touchable_region_with_crop_){false}
1429 , decltype(_impl_.input_config_){0u}
1430 };
1431 }
1432
~InputWindowInfoProto()1433 InputWindowInfoProto::~InputWindowInfoProto() {
1434 // @@protoc_insertion_point(destructor:perfetto.protos.InputWindowInfoProto)
1435 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1436 (void)arena;
1437 return;
1438 }
1439 SharedDtor();
1440 }
1441
SharedDtor()1442 inline void InputWindowInfoProto::SharedDtor() {
1443 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1444 if (this != internal_default_instance()) delete _impl_.frame_;
1445 if (this != internal_default_instance()) delete _impl_.touchable_region_;
1446 if (this != internal_default_instance()) delete _impl_.touchable_region_crop_;
1447 if (this != internal_default_instance()) delete _impl_.transform_;
1448 }
1449
SetCachedSize(int size) const1450 void InputWindowInfoProto::SetCachedSize(int size) const {
1451 _impl_._cached_size_.Set(size);
1452 }
1453
Clear()1454 void InputWindowInfoProto::Clear() {
1455 // @@protoc_insertion_point(message_clear_start:perfetto.protos.InputWindowInfoProto)
1456 ::uint32_t cached_has_bits = 0;
1457 // Prevent compiler warnings about cached_has_bits being unused
1458 (void) cached_has_bits;
1459
1460 cached_has_bits = _impl_._has_bits_[0];
1461 if (cached_has_bits & 0x0000000fu) {
1462 if (cached_has_bits & 0x00000001u) {
1463 GOOGLE_DCHECK(_impl_.frame_ != nullptr);
1464 _impl_.frame_->Clear();
1465 }
1466 if (cached_has_bits & 0x00000002u) {
1467 GOOGLE_DCHECK(_impl_.touchable_region_ != nullptr);
1468 _impl_.touchable_region_->Clear();
1469 }
1470 if (cached_has_bits & 0x00000004u) {
1471 GOOGLE_DCHECK(_impl_.touchable_region_crop_ != nullptr);
1472 _impl_.touchable_region_crop_->Clear();
1473 }
1474 if (cached_has_bits & 0x00000008u) {
1475 GOOGLE_DCHECK(_impl_.transform_ != nullptr);
1476 _impl_.transform_->Clear();
1477 }
1478 }
1479 if (cached_has_bits & 0x000000f0u) {
1480 ::memset(&_impl_.layout_params_flags_, 0, static_cast<size_t>(
1481 reinterpret_cast<char*>(&_impl_.visible_) -
1482 reinterpret_cast<char*>(&_impl_.layout_params_flags_)) + sizeof(_impl_.visible_));
1483 }
1484 if (cached_has_bits & 0x0000ff00u) {
1485 ::memset(&_impl_.can_receive_keys_, 0, static_cast<size_t>(
1486 reinterpret_cast<char*>(&_impl_.replace_touchable_region_with_crop_) -
1487 reinterpret_cast<char*>(&_impl_.can_receive_keys_)) + sizeof(_impl_.replace_touchable_region_with_crop_));
1488 }
1489 _impl_.input_config_ = 0u;
1490 _impl_._has_bits_.Clear();
1491 _internal_metadata_.Clear<std::string>();
1492 }
1493
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1494 const char* InputWindowInfoProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1495 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1496 _Internal::HasBits has_bits{};
1497 while (!ctx->Done(&ptr)) {
1498 ::uint32_t tag;
1499 ptr = ::_pbi::ReadTag(ptr, &tag);
1500 switch (tag >> 3) {
1501 // optional uint32 layout_params_flags = 1;
1502 case 1:
1503 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1504 _Internal::set_has_layout_params_flags(&has_bits);
1505 _impl_.layout_params_flags_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1506 CHK_(ptr);
1507 } else {
1508 goto handle_unusual;
1509 }
1510 continue;
1511 // optional int32 layout_params_type = 2;
1512 case 2:
1513 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1514 _Internal::set_has_layout_params_type(&has_bits);
1515 _impl_.layout_params_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1516 CHK_(ptr);
1517 } else {
1518 goto handle_unusual;
1519 }
1520 continue;
1521 // optional .perfetto.protos.RectProto frame = 3;
1522 case 3:
1523 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
1524 ptr = ctx->ParseMessage(_internal_mutable_frame(), ptr);
1525 CHK_(ptr);
1526 } else {
1527 goto handle_unusual;
1528 }
1529 continue;
1530 // optional .perfetto.protos.RegionProto touchable_region = 4;
1531 case 4:
1532 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
1533 ptr = ctx->ParseMessage(_internal_mutable_touchable_region(), ptr);
1534 CHK_(ptr);
1535 } else {
1536 goto handle_unusual;
1537 }
1538 continue;
1539 // optional int32 surface_inset = 5;
1540 case 5:
1541 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
1542 _Internal::set_has_surface_inset(&has_bits);
1543 _impl_.surface_inset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1544 CHK_(ptr);
1545 } else {
1546 goto handle_unusual;
1547 }
1548 continue;
1549 // optional bool visible = 6;
1550 case 6:
1551 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
1552 _Internal::set_has_visible(&has_bits);
1553 _impl_.visible_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1554 CHK_(ptr);
1555 } else {
1556 goto handle_unusual;
1557 }
1558 continue;
1559 // optional bool can_receive_keys = 7 [deprecated = true];
1560 case 7:
1561 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
1562 _Internal::set_has_can_receive_keys(&has_bits);
1563 _impl_.can_receive_keys_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1564 CHK_(ptr);
1565 } else {
1566 goto handle_unusual;
1567 }
1568 continue;
1569 // optional bool focusable = 8;
1570 case 8:
1571 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
1572 _Internal::set_has_focusable(&has_bits);
1573 _impl_.focusable_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1574 CHK_(ptr);
1575 } else {
1576 goto handle_unusual;
1577 }
1578 continue;
1579 // optional bool has_wallpaper = 9;
1580 case 9:
1581 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
1582 _Internal::set_has_has_wallpaper(&has_bits);
1583 _impl_.has_wallpaper_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1584 CHK_(ptr);
1585 } else {
1586 goto handle_unusual;
1587 }
1588 continue;
1589 // optional float global_scale_factor = 10;
1590 case 10:
1591 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 85)) {
1592 _Internal::set_has_global_scale_factor(&has_bits);
1593 _impl_.global_scale_factor_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
1594 ptr += sizeof(float);
1595 } else {
1596 goto handle_unusual;
1597 }
1598 continue;
1599 // optional float window_x_scale = 11 [deprecated = true];
1600 case 11:
1601 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 93)) {
1602 _Internal::set_has_window_x_scale(&has_bits);
1603 _impl_.window_x_scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
1604 ptr += sizeof(float);
1605 } else {
1606 goto handle_unusual;
1607 }
1608 continue;
1609 // optional float window_y_scale = 12 [deprecated = true];
1610 case 12:
1611 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 101)) {
1612 _Internal::set_has_window_y_scale(&has_bits);
1613 _impl_.window_y_scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
1614 ptr += sizeof(float);
1615 } else {
1616 goto handle_unusual;
1617 }
1618 continue;
1619 // optional int32 crop_layer_id = 13;
1620 case 13:
1621 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 104)) {
1622 _Internal::set_has_crop_layer_id(&has_bits);
1623 _impl_.crop_layer_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1624 CHK_(ptr);
1625 } else {
1626 goto handle_unusual;
1627 }
1628 continue;
1629 // optional bool replace_touchable_region_with_crop = 14;
1630 case 14:
1631 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 112)) {
1632 _Internal::set_has_replace_touchable_region_with_crop(&has_bits);
1633 _impl_.replace_touchable_region_with_crop_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1634 CHK_(ptr);
1635 } else {
1636 goto handle_unusual;
1637 }
1638 continue;
1639 // optional .perfetto.protos.RectProto touchable_region_crop = 15;
1640 case 15:
1641 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 122)) {
1642 ptr = ctx->ParseMessage(_internal_mutable_touchable_region_crop(), ptr);
1643 CHK_(ptr);
1644 } else {
1645 goto handle_unusual;
1646 }
1647 continue;
1648 // optional .perfetto.protos.TransformProto transform = 16;
1649 case 16:
1650 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 130)) {
1651 ptr = ctx->ParseMessage(_internal_mutable_transform(), ptr);
1652 CHK_(ptr);
1653 } else {
1654 goto handle_unusual;
1655 }
1656 continue;
1657 // optional uint32 input_config = 17;
1658 case 17:
1659 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 136)) {
1660 _Internal::set_has_input_config(&has_bits);
1661 _impl_.input_config_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1662 CHK_(ptr);
1663 } else {
1664 goto handle_unusual;
1665 }
1666 continue;
1667 default:
1668 goto handle_unusual;
1669 } // switch
1670 handle_unusual:
1671 if ((tag == 0) || ((tag & 7) == 4)) {
1672 CHK_(ptr);
1673 ctx->SetLastTag(tag);
1674 goto message_done;
1675 }
1676 ptr = UnknownFieldParse(
1677 tag,
1678 _internal_metadata_.mutable_unknown_fields<std::string>(),
1679 ptr, ctx);
1680 CHK_(ptr != nullptr);
1681 } // while
1682 message_done:
1683 _impl_._has_bits_.Or(has_bits);
1684 return ptr;
1685 failure:
1686 ptr = nullptr;
1687 goto message_done;
1688 #undef CHK_
1689 }
1690
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1691 ::uint8_t* InputWindowInfoProto::_InternalSerialize(
1692 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1693 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.InputWindowInfoProto)
1694 ::uint32_t cached_has_bits = 0;
1695 (void) cached_has_bits;
1696
1697 cached_has_bits = _impl_._has_bits_[0];
1698 // optional uint32 layout_params_flags = 1;
1699 if (cached_has_bits & 0x00000010u) {
1700 target = stream->EnsureSpace(target);
1701 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_layout_params_flags(), target);
1702 }
1703
1704 // optional int32 layout_params_type = 2;
1705 if (cached_has_bits & 0x00000020u) {
1706 target = stream->EnsureSpace(target);
1707 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_layout_params_type(), target);
1708 }
1709
1710 // optional .perfetto.protos.RectProto frame = 3;
1711 if (cached_has_bits & 0x00000001u) {
1712 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1713 InternalWriteMessage(3, _Internal::frame(this),
1714 _Internal::frame(this).GetCachedSize(), target, stream);
1715 }
1716
1717 // optional .perfetto.protos.RegionProto touchable_region = 4;
1718 if (cached_has_bits & 0x00000002u) {
1719 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1720 InternalWriteMessage(4, _Internal::touchable_region(this),
1721 _Internal::touchable_region(this).GetCachedSize(), target, stream);
1722 }
1723
1724 // optional int32 surface_inset = 5;
1725 if (cached_has_bits & 0x00000040u) {
1726 target = stream->EnsureSpace(target);
1727 target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_surface_inset(), target);
1728 }
1729
1730 // optional bool visible = 6;
1731 if (cached_has_bits & 0x00000080u) {
1732 target = stream->EnsureSpace(target);
1733 target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_visible(), target);
1734 }
1735
1736 // optional bool can_receive_keys = 7 [deprecated = true];
1737 if (cached_has_bits & 0x00000100u) {
1738 target = stream->EnsureSpace(target);
1739 target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_can_receive_keys(), target);
1740 }
1741
1742 // optional bool focusable = 8;
1743 if (cached_has_bits & 0x00000200u) {
1744 target = stream->EnsureSpace(target);
1745 target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_focusable(), target);
1746 }
1747
1748 // optional bool has_wallpaper = 9;
1749 if (cached_has_bits & 0x00000400u) {
1750 target = stream->EnsureSpace(target);
1751 target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_has_wallpaper(), target);
1752 }
1753
1754 // optional float global_scale_factor = 10;
1755 if (cached_has_bits & 0x00000800u) {
1756 target = stream->EnsureSpace(target);
1757 target = ::_pbi::WireFormatLite::WriteFloatToArray(10, this->_internal_global_scale_factor(), target);
1758 }
1759
1760 // optional float window_x_scale = 11 [deprecated = true];
1761 if (cached_has_bits & 0x00001000u) {
1762 target = stream->EnsureSpace(target);
1763 target = ::_pbi::WireFormatLite::WriteFloatToArray(11, this->_internal_window_x_scale(), target);
1764 }
1765
1766 // optional float window_y_scale = 12 [deprecated = true];
1767 if (cached_has_bits & 0x00002000u) {
1768 target = stream->EnsureSpace(target);
1769 target = ::_pbi::WireFormatLite::WriteFloatToArray(12, this->_internal_window_y_scale(), target);
1770 }
1771
1772 // optional int32 crop_layer_id = 13;
1773 if (cached_has_bits & 0x00004000u) {
1774 target = stream->EnsureSpace(target);
1775 target = ::_pbi::WireFormatLite::WriteInt32ToArray(13, this->_internal_crop_layer_id(), target);
1776 }
1777
1778 // optional bool replace_touchable_region_with_crop = 14;
1779 if (cached_has_bits & 0x00008000u) {
1780 target = stream->EnsureSpace(target);
1781 target = ::_pbi::WireFormatLite::WriteBoolToArray(14, this->_internal_replace_touchable_region_with_crop(), target);
1782 }
1783
1784 // optional .perfetto.protos.RectProto touchable_region_crop = 15;
1785 if (cached_has_bits & 0x00000004u) {
1786 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1787 InternalWriteMessage(15, _Internal::touchable_region_crop(this),
1788 _Internal::touchable_region_crop(this).GetCachedSize(), target, stream);
1789 }
1790
1791 // optional .perfetto.protos.TransformProto transform = 16;
1792 if (cached_has_bits & 0x00000008u) {
1793 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1794 InternalWriteMessage(16, _Internal::transform(this),
1795 _Internal::transform(this).GetCachedSize(), target, stream);
1796 }
1797
1798 // optional uint32 input_config = 17;
1799 if (cached_has_bits & 0x00010000u) {
1800 target = stream->EnsureSpace(target);
1801 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(17, this->_internal_input_config(), target);
1802 }
1803
1804 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1805 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1806 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1807 }
1808 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.InputWindowInfoProto)
1809 return target;
1810 }
1811
ByteSizeLong() const1812 size_t InputWindowInfoProto::ByteSizeLong() const {
1813 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.InputWindowInfoProto)
1814 size_t total_size = 0;
1815
1816 ::uint32_t cached_has_bits = 0;
1817 // Prevent compiler warnings about cached_has_bits being unused
1818 (void) cached_has_bits;
1819
1820 cached_has_bits = _impl_._has_bits_[0];
1821 if (cached_has_bits & 0x000000ffu) {
1822 // optional .perfetto.protos.RectProto frame = 3;
1823 if (cached_has_bits & 0x00000001u) {
1824 total_size += 1 +
1825 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1826 *_impl_.frame_);
1827 }
1828
1829 // optional .perfetto.protos.RegionProto touchable_region = 4;
1830 if (cached_has_bits & 0x00000002u) {
1831 total_size += 1 +
1832 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1833 *_impl_.touchable_region_);
1834 }
1835
1836 // optional .perfetto.protos.RectProto touchable_region_crop = 15;
1837 if (cached_has_bits & 0x00000004u) {
1838 total_size += 1 +
1839 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1840 *_impl_.touchable_region_crop_);
1841 }
1842
1843 // optional .perfetto.protos.TransformProto transform = 16;
1844 if (cached_has_bits & 0x00000008u) {
1845 total_size += 2 +
1846 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1847 *_impl_.transform_);
1848 }
1849
1850 // optional uint32 layout_params_flags = 1;
1851 if (cached_has_bits & 0x00000010u) {
1852 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_layout_params_flags());
1853 }
1854
1855 // optional int32 layout_params_type = 2;
1856 if (cached_has_bits & 0x00000020u) {
1857 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_layout_params_type());
1858 }
1859
1860 // optional int32 surface_inset = 5;
1861 if (cached_has_bits & 0x00000040u) {
1862 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_surface_inset());
1863 }
1864
1865 // optional bool visible = 6;
1866 if (cached_has_bits & 0x00000080u) {
1867 total_size += 1 + 1;
1868 }
1869
1870 }
1871 if (cached_has_bits & 0x0000ff00u) {
1872 // optional bool can_receive_keys = 7 [deprecated = true];
1873 if (cached_has_bits & 0x00000100u) {
1874 total_size += 1 + 1;
1875 }
1876
1877 // optional bool focusable = 8;
1878 if (cached_has_bits & 0x00000200u) {
1879 total_size += 1 + 1;
1880 }
1881
1882 // optional bool has_wallpaper = 9;
1883 if (cached_has_bits & 0x00000400u) {
1884 total_size += 1 + 1;
1885 }
1886
1887 // optional float global_scale_factor = 10;
1888 if (cached_has_bits & 0x00000800u) {
1889 total_size += 1 + 4;
1890 }
1891
1892 // optional float window_x_scale = 11 [deprecated = true];
1893 if (cached_has_bits & 0x00001000u) {
1894 total_size += 1 + 4;
1895 }
1896
1897 // optional float window_y_scale = 12 [deprecated = true];
1898 if (cached_has_bits & 0x00002000u) {
1899 total_size += 1 + 4;
1900 }
1901
1902 // optional int32 crop_layer_id = 13;
1903 if (cached_has_bits & 0x00004000u) {
1904 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_crop_layer_id());
1905 }
1906
1907 // optional bool replace_touchable_region_with_crop = 14;
1908 if (cached_has_bits & 0x00008000u) {
1909 total_size += 1 + 1;
1910 }
1911
1912 }
1913 // optional uint32 input_config = 17;
1914 if (cached_has_bits & 0x00010000u) {
1915 total_size += 2 +
1916 ::_pbi::WireFormatLite::UInt32Size(
1917 this->_internal_input_config());
1918 }
1919
1920 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1921 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1922 }
1923 int cached_size = ::_pbi::ToCachedSize(total_size);
1924 SetCachedSize(cached_size);
1925 return total_size;
1926 }
1927
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1928 void InputWindowInfoProto::CheckTypeAndMergeFrom(
1929 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1930 MergeFrom(*::_pbi::DownCast<const InputWindowInfoProto*>(
1931 &from));
1932 }
1933
MergeFrom(const InputWindowInfoProto & from)1934 void InputWindowInfoProto::MergeFrom(const InputWindowInfoProto& from) {
1935 InputWindowInfoProto* const _this = this;
1936 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.InputWindowInfoProto)
1937 GOOGLE_DCHECK_NE(&from, _this);
1938 ::uint32_t cached_has_bits = 0;
1939 (void) cached_has_bits;
1940
1941 cached_has_bits = from._impl_._has_bits_[0];
1942 if (cached_has_bits & 0x000000ffu) {
1943 if (cached_has_bits & 0x00000001u) {
1944 _this->_internal_mutable_frame()->::perfetto::protos::RectProto::MergeFrom(
1945 from._internal_frame());
1946 }
1947 if (cached_has_bits & 0x00000002u) {
1948 _this->_internal_mutable_touchable_region()->::perfetto::protos::RegionProto::MergeFrom(
1949 from._internal_touchable_region());
1950 }
1951 if (cached_has_bits & 0x00000004u) {
1952 _this->_internal_mutable_touchable_region_crop()->::perfetto::protos::RectProto::MergeFrom(
1953 from._internal_touchable_region_crop());
1954 }
1955 if (cached_has_bits & 0x00000008u) {
1956 _this->_internal_mutable_transform()->::perfetto::protos::TransformProto::MergeFrom(
1957 from._internal_transform());
1958 }
1959 if (cached_has_bits & 0x00000010u) {
1960 _this->_impl_.layout_params_flags_ = from._impl_.layout_params_flags_;
1961 }
1962 if (cached_has_bits & 0x00000020u) {
1963 _this->_impl_.layout_params_type_ = from._impl_.layout_params_type_;
1964 }
1965 if (cached_has_bits & 0x00000040u) {
1966 _this->_impl_.surface_inset_ = from._impl_.surface_inset_;
1967 }
1968 if (cached_has_bits & 0x00000080u) {
1969 _this->_impl_.visible_ = from._impl_.visible_;
1970 }
1971 _this->_impl_._has_bits_[0] |= cached_has_bits;
1972 }
1973 if (cached_has_bits & 0x0000ff00u) {
1974 if (cached_has_bits & 0x00000100u) {
1975 _this->_impl_.can_receive_keys_ = from._impl_.can_receive_keys_;
1976 }
1977 if (cached_has_bits & 0x00000200u) {
1978 _this->_impl_.focusable_ = from._impl_.focusable_;
1979 }
1980 if (cached_has_bits & 0x00000400u) {
1981 _this->_impl_.has_wallpaper_ = from._impl_.has_wallpaper_;
1982 }
1983 if (cached_has_bits & 0x00000800u) {
1984 _this->_impl_.global_scale_factor_ = from._impl_.global_scale_factor_;
1985 }
1986 if (cached_has_bits & 0x00001000u) {
1987 _this->_impl_.window_x_scale_ = from._impl_.window_x_scale_;
1988 }
1989 if (cached_has_bits & 0x00002000u) {
1990 _this->_impl_.window_y_scale_ = from._impl_.window_y_scale_;
1991 }
1992 if (cached_has_bits & 0x00004000u) {
1993 _this->_impl_.crop_layer_id_ = from._impl_.crop_layer_id_;
1994 }
1995 if (cached_has_bits & 0x00008000u) {
1996 _this->_impl_.replace_touchable_region_with_crop_ = from._impl_.replace_touchable_region_with_crop_;
1997 }
1998 _this->_impl_._has_bits_[0] |= cached_has_bits;
1999 }
2000 if (cached_has_bits & 0x00010000u) {
2001 _this->_internal_set_input_config(from._internal_input_config());
2002 }
2003 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2004 }
2005
CopyFrom(const InputWindowInfoProto & from)2006 void InputWindowInfoProto::CopyFrom(const InputWindowInfoProto& from) {
2007 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.InputWindowInfoProto)
2008 if (&from == this) return;
2009 Clear();
2010 MergeFrom(from);
2011 }
2012
IsInitialized() const2013 bool InputWindowInfoProto::IsInitialized() const {
2014 return true;
2015 }
2016
InternalSwap(InputWindowInfoProto * other)2017 void InputWindowInfoProto::InternalSwap(InputWindowInfoProto* other) {
2018 using std::swap;
2019 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2020 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2021 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2022 PROTOBUF_FIELD_OFFSET(InputWindowInfoProto, _impl_.input_config_)
2023 + sizeof(InputWindowInfoProto::_impl_.input_config_) // NOLINT
2024 - PROTOBUF_FIELD_OFFSET(InputWindowInfoProto, _impl_.frame_)>(
2025 reinterpret_cast<char*>(&_impl_.frame_),
2026 reinterpret_cast<char*>(&other->_impl_.frame_));
2027 }
2028
GetTypeName() const2029 std::string InputWindowInfoProto::GetTypeName() const {
2030 return "perfetto.protos.InputWindowInfoProto";
2031 }
2032
2033
2034 // ===================================================================
2035
2036 class BlurRegion::_Internal {
2037 public:
2038 using HasBits = decltype(std::declval<BlurRegion>()._impl_._has_bits_);
set_has_blur_radius(HasBits * has_bits)2039 static void set_has_blur_radius(HasBits* has_bits) {
2040 (*has_bits)[0] |= 1u;
2041 }
set_has_corner_radius_tl(HasBits * has_bits)2042 static void set_has_corner_radius_tl(HasBits* has_bits) {
2043 (*has_bits)[0] |= 2u;
2044 }
set_has_corner_radius_tr(HasBits * has_bits)2045 static void set_has_corner_radius_tr(HasBits* has_bits) {
2046 (*has_bits)[0] |= 4u;
2047 }
set_has_corner_radius_bl(HasBits * has_bits)2048 static void set_has_corner_radius_bl(HasBits* has_bits) {
2049 (*has_bits)[0] |= 8u;
2050 }
set_has_corner_radius_br(HasBits * has_bits)2051 static void set_has_corner_radius_br(HasBits* has_bits) {
2052 (*has_bits)[0] |= 16u;
2053 }
set_has_alpha(HasBits * has_bits)2054 static void set_has_alpha(HasBits* has_bits) {
2055 (*has_bits)[0] |= 32u;
2056 }
set_has_left(HasBits * has_bits)2057 static void set_has_left(HasBits* has_bits) {
2058 (*has_bits)[0] |= 64u;
2059 }
set_has_top(HasBits * has_bits)2060 static void set_has_top(HasBits* has_bits) {
2061 (*has_bits)[0] |= 128u;
2062 }
set_has_right(HasBits * has_bits)2063 static void set_has_right(HasBits* has_bits) {
2064 (*has_bits)[0] |= 256u;
2065 }
set_has_bottom(HasBits * has_bits)2066 static void set_has_bottom(HasBits* has_bits) {
2067 (*has_bits)[0] |= 512u;
2068 }
2069 };
2070
BlurRegion(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2071 BlurRegion::BlurRegion(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2072 bool is_message_owned)
2073 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2074 SharedCtor(arena, is_message_owned);
2075 // @@protoc_insertion_point(arena_constructor:perfetto.protos.BlurRegion)
2076 }
BlurRegion(const BlurRegion & from)2077 BlurRegion::BlurRegion(const BlurRegion& from)
2078 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2079 BlurRegion* const _this = this; (void)_this;
2080 new (&_impl_) Impl_{
2081 decltype(_impl_._has_bits_){from._impl_._has_bits_}
2082 , /*decltype(_impl_._cached_size_)*/{}
2083 , decltype(_impl_.blur_radius_){}
2084 , decltype(_impl_.corner_radius_tl_){}
2085 , decltype(_impl_.corner_radius_tr_){}
2086 , decltype(_impl_.corner_radius_bl_){}
2087 , decltype(_impl_.corner_radius_br_){}
2088 , decltype(_impl_.alpha_){}
2089 , decltype(_impl_.left_){}
2090 , decltype(_impl_.top_){}
2091 , decltype(_impl_.right_){}
2092 , decltype(_impl_.bottom_){}};
2093
2094 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2095 ::memcpy(&_impl_.blur_radius_, &from._impl_.blur_radius_,
2096 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.bottom_) -
2097 reinterpret_cast<char*>(&_impl_.blur_radius_)) + sizeof(_impl_.bottom_));
2098 // @@protoc_insertion_point(copy_constructor:perfetto.protos.BlurRegion)
2099 }
2100
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2101 inline void BlurRegion::SharedCtor(
2102 ::_pb::Arena* arena, bool is_message_owned) {
2103 (void)arena;
2104 (void)is_message_owned;
2105 new (&_impl_) Impl_{
2106 decltype(_impl_._has_bits_){}
2107 , /*decltype(_impl_._cached_size_)*/{}
2108 , decltype(_impl_.blur_radius_){0u}
2109 , decltype(_impl_.corner_radius_tl_){0u}
2110 , decltype(_impl_.corner_radius_tr_){0u}
2111 , decltype(_impl_.corner_radius_bl_){0u}
2112 , decltype(_impl_.corner_radius_br_){0}
2113 , decltype(_impl_.alpha_){0}
2114 , decltype(_impl_.left_){0}
2115 , decltype(_impl_.top_){0}
2116 , decltype(_impl_.right_){0}
2117 , decltype(_impl_.bottom_){0}
2118 };
2119 }
2120
~BlurRegion()2121 BlurRegion::~BlurRegion() {
2122 // @@protoc_insertion_point(destructor:perfetto.protos.BlurRegion)
2123 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2124 (void)arena;
2125 return;
2126 }
2127 SharedDtor();
2128 }
2129
SharedDtor()2130 inline void BlurRegion::SharedDtor() {
2131 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2132 }
2133
SetCachedSize(int size) const2134 void BlurRegion::SetCachedSize(int size) const {
2135 _impl_._cached_size_.Set(size);
2136 }
2137
Clear()2138 void BlurRegion::Clear() {
2139 // @@protoc_insertion_point(message_clear_start:perfetto.protos.BlurRegion)
2140 ::uint32_t cached_has_bits = 0;
2141 // Prevent compiler warnings about cached_has_bits being unused
2142 (void) cached_has_bits;
2143
2144 cached_has_bits = _impl_._has_bits_[0];
2145 if (cached_has_bits & 0x000000ffu) {
2146 ::memset(&_impl_.blur_radius_, 0, static_cast<size_t>(
2147 reinterpret_cast<char*>(&_impl_.top_) -
2148 reinterpret_cast<char*>(&_impl_.blur_radius_)) + sizeof(_impl_.top_));
2149 }
2150 if (cached_has_bits & 0x00000300u) {
2151 ::memset(&_impl_.right_, 0, static_cast<size_t>(
2152 reinterpret_cast<char*>(&_impl_.bottom_) -
2153 reinterpret_cast<char*>(&_impl_.right_)) + sizeof(_impl_.bottom_));
2154 }
2155 _impl_._has_bits_.Clear();
2156 _internal_metadata_.Clear<std::string>();
2157 }
2158
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2159 const char* BlurRegion::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2160 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2161 _Internal::HasBits has_bits{};
2162 while (!ctx->Done(&ptr)) {
2163 ::uint32_t tag;
2164 ptr = ::_pbi::ReadTag(ptr, &tag);
2165 switch (tag >> 3) {
2166 // optional uint32 blur_radius = 1;
2167 case 1:
2168 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
2169 _Internal::set_has_blur_radius(&has_bits);
2170 _impl_.blur_radius_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2171 CHK_(ptr);
2172 } else {
2173 goto handle_unusual;
2174 }
2175 continue;
2176 // optional uint32 corner_radius_tl = 2;
2177 case 2:
2178 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
2179 _Internal::set_has_corner_radius_tl(&has_bits);
2180 _impl_.corner_radius_tl_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2181 CHK_(ptr);
2182 } else {
2183 goto handle_unusual;
2184 }
2185 continue;
2186 // optional uint32 corner_radius_tr = 3;
2187 case 3:
2188 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
2189 _Internal::set_has_corner_radius_tr(&has_bits);
2190 _impl_.corner_radius_tr_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2191 CHK_(ptr);
2192 } else {
2193 goto handle_unusual;
2194 }
2195 continue;
2196 // optional uint32 corner_radius_bl = 4;
2197 case 4:
2198 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
2199 _Internal::set_has_corner_radius_bl(&has_bits);
2200 _impl_.corner_radius_bl_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2201 CHK_(ptr);
2202 } else {
2203 goto handle_unusual;
2204 }
2205 continue;
2206 // optional float corner_radius_br = 5;
2207 case 5:
2208 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 45)) {
2209 _Internal::set_has_corner_radius_br(&has_bits);
2210 _impl_.corner_radius_br_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
2211 ptr += sizeof(float);
2212 } else {
2213 goto handle_unusual;
2214 }
2215 continue;
2216 // optional float alpha = 6;
2217 case 6:
2218 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 53)) {
2219 _Internal::set_has_alpha(&has_bits);
2220 _impl_.alpha_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
2221 ptr += sizeof(float);
2222 } else {
2223 goto handle_unusual;
2224 }
2225 continue;
2226 // optional int32 left = 7;
2227 case 7:
2228 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
2229 _Internal::set_has_left(&has_bits);
2230 _impl_.left_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2231 CHK_(ptr);
2232 } else {
2233 goto handle_unusual;
2234 }
2235 continue;
2236 // optional int32 top = 8;
2237 case 8:
2238 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
2239 _Internal::set_has_top(&has_bits);
2240 _impl_.top_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2241 CHK_(ptr);
2242 } else {
2243 goto handle_unusual;
2244 }
2245 continue;
2246 // optional int32 right = 9;
2247 case 9:
2248 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
2249 _Internal::set_has_right(&has_bits);
2250 _impl_.right_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2251 CHK_(ptr);
2252 } else {
2253 goto handle_unusual;
2254 }
2255 continue;
2256 // optional int32 bottom = 10;
2257 case 10:
2258 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
2259 _Internal::set_has_bottom(&has_bits);
2260 _impl_.bottom_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2261 CHK_(ptr);
2262 } else {
2263 goto handle_unusual;
2264 }
2265 continue;
2266 default:
2267 goto handle_unusual;
2268 } // switch
2269 handle_unusual:
2270 if ((tag == 0) || ((tag & 7) == 4)) {
2271 CHK_(ptr);
2272 ctx->SetLastTag(tag);
2273 goto message_done;
2274 }
2275 ptr = UnknownFieldParse(
2276 tag,
2277 _internal_metadata_.mutable_unknown_fields<std::string>(),
2278 ptr, ctx);
2279 CHK_(ptr != nullptr);
2280 } // while
2281 message_done:
2282 _impl_._has_bits_.Or(has_bits);
2283 return ptr;
2284 failure:
2285 ptr = nullptr;
2286 goto message_done;
2287 #undef CHK_
2288 }
2289
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2290 ::uint8_t* BlurRegion::_InternalSerialize(
2291 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2292 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.BlurRegion)
2293 ::uint32_t cached_has_bits = 0;
2294 (void) cached_has_bits;
2295
2296 cached_has_bits = _impl_._has_bits_[0];
2297 // optional uint32 blur_radius = 1;
2298 if (cached_has_bits & 0x00000001u) {
2299 target = stream->EnsureSpace(target);
2300 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_blur_radius(), target);
2301 }
2302
2303 // optional uint32 corner_radius_tl = 2;
2304 if (cached_has_bits & 0x00000002u) {
2305 target = stream->EnsureSpace(target);
2306 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_corner_radius_tl(), target);
2307 }
2308
2309 // optional uint32 corner_radius_tr = 3;
2310 if (cached_has_bits & 0x00000004u) {
2311 target = stream->EnsureSpace(target);
2312 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_corner_radius_tr(), target);
2313 }
2314
2315 // optional uint32 corner_radius_bl = 4;
2316 if (cached_has_bits & 0x00000008u) {
2317 target = stream->EnsureSpace(target);
2318 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_corner_radius_bl(), target);
2319 }
2320
2321 // optional float corner_radius_br = 5;
2322 if (cached_has_bits & 0x00000010u) {
2323 target = stream->EnsureSpace(target);
2324 target = ::_pbi::WireFormatLite::WriteFloatToArray(5, this->_internal_corner_radius_br(), target);
2325 }
2326
2327 // optional float alpha = 6;
2328 if (cached_has_bits & 0x00000020u) {
2329 target = stream->EnsureSpace(target);
2330 target = ::_pbi::WireFormatLite::WriteFloatToArray(6, this->_internal_alpha(), target);
2331 }
2332
2333 // optional int32 left = 7;
2334 if (cached_has_bits & 0x00000040u) {
2335 target = stream->EnsureSpace(target);
2336 target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_left(), target);
2337 }
2338
2339 // optional int32 top = 8;
2340 if (cached_has_bits & 0x00000080u) {
2341 target = stream->EnsureSpace(target);
2342 target = ::_pbi::WireFormatLite::WriteInt32ToArray(8, this->_internal_top(), target);
2343 }
2344
2345 // optional int32 right = 9;
2346 if (cached_has_bits & 0x00000100u) {
2347 target = stream->EnsureSpace(target);
2348 target = ::_pbi::WireFormatLite::WriteInt32ToArray(9, this->_internal_right(), target);
2349 }
2350
2351 // optional int32 bottom = 10;
2352 if (cached_has_bits & 0x00000200u) {
2353 target = stream->EnsureSpace(target);
2354 target = ::_pbi::WireFormatLite::WriteInt32ToArray(10, this->_internal_bottom(), target);
2355 }
2356
2357 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2358 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2359 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2360 }
2361 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.BlurRegion)
2362 return target;
2363 }
2364
ByteSizeLong() const2365 size_t BlurRegion::ByteSizeLong() const {
2366 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.BlurRegion)
2367 size_t total_size = 0;
2368
2369 ::uint32_t cached_has_bits = 0;
2370 // Prevent compiler warnings about cached_has_bits being unused
2371 (void) cached_has_bits;
2372
2373 cached_has_bits = _impl_._has_bits_[0];
2374 if (cached_has_bits & 0x000000ffu) {
2375 // optional uint32 blur_radius = 1;
2376 if (cached_has_bits & 0x00000001u) {
2377 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_blur_radius());
2378 }
2379
2380 // optional uint32 corner_radius_tl = 2;
2381 if (cached_has_bits & 0x00000002u) {
2382 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_corner_radius_tl());
2383 }
2384
2385 // optional uint32 corner_radius_tr = 3;
2386 if (cached_has_bits & 0x00000004u) {
2387 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_corner_radius_tr());
2388 }
2389
2390 // optional uint32 corner_radius_bl = 4;
2391 if (cached_has_bits & 0x00000008u) {
2392 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_corner_radius_bl());
2393 }
2394
2395 // optional float corner_radius_br = 5;
2396 if (cached_has_bits & 0x00000010u) {
2397 total_size += 1 + 4;
2398 }
2399
2400 // optional float alpha = 6;
2401 if (cached_has_bits & 0x00000020u) {
2402 total_size += 1 + 4;
2403 }
2404
2405 // optional int32 left = 7;
2406 if (cached_has_bits & 0x00000040u) {
2407 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_left());
2408 }
2409
2410 // optional int32 top = 8;
2411 if (cached_has_bits & 0x00000080u) {
2412 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_top());
2413 }
2414
2415 }
2416 if (cached_has_bits & 0x00000300u) {
2417 // optional int32 right = 9;
2418 if (cached_has_bits & 0x00000100u) {
2419 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_right());
2420 }
2421
2422 // optional int32 bottom = 10;
2423 if (cached_has_bits & 0x00000200u) {
2424 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_bottom());
2425 }
2426
2427 }
2428 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2429 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2430 }
2431 int cached_size = ::_pbi::ToCachedSize(total_size);
2432 SetCachedSize(cached_size);
2433 return total_size;
2434 }
2435
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2436 void BlurRegion::CheckTypeAndMergeFrom(
2437 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2438 MergeFrom(*::_pbi::DownCast<const BlurRegion*>(
2439 &from));
2440 }
2441
MergeFrom(const BlurRegion & from)2442 void BlurRegion::MergeFrom(const BlurRegion& from) {
2443 BlurRegion* const _this = this;
2444 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.BlurRegion)
2445 GOOGLE_DCHECK_NE(&from, _this);
2446 ::uint32_t cached_has_bits = 0;
2447 (void) cached_has_bits;
2448
2449 cached_has_bits = from._impl_._has_bits_[0];
2450 if (cached_has_bits & 0x000000ffu) {
2451 if (cached_has_bits & 0x00000001u) {
2452 _this->_impl_.blur_radius_ = from._impl_.blur_radius_;
2453 }
2454 if (cached_has_bits & 0x00000002u) {
2455 _this->_impl_.corner_radius_tl_ = from._impl_.corner_radius_tl_;
2456 }
2457 if (cached_has_bits & 0x00000004u) {
2458 _this->_impl_.corner_radius_tr_ = from._impl_.corner_radius_tr_;
2459 }
2460 if (cached_has_bits & 0x00000008u) {
2461 _this->_impl_.corner_radius_bl_ = from._impl_.corner_radius_bl_;
2462 }
2463 if (cached_has_bits & 0x00000010u) {
2464 _this->_impl_.corner_radius_br_ = from._impl_.corner_radius_br_;
2465 }
2466 if (cached_has_bits & 0x00000020u) {
2467 _this->_impl_.alpha_ = from._impl_.alpha_;
2468 }
2469 if (cached_has_bits & 0x00000040u) {
2470 _this->_impl_.left_ = from._impl_.left_;
2471 }
2472 if (cached_has_bits & 0x00000080u) {
2473 _this->_impl_.top_ = from._impl_.top_;
2474 }
2475 _this->_impl_._has_bits_[0] |= cached_has_bits;
2476 }
2477 if (cached_has_bits & 0x00000300u) {
2478 if (cached_has_bits & 0x00000100u) {
2479 _this->_impl_.right_ = from._impl_.right_;
2480 }
2481 if (cached_has_bits & 0x00000200u) {
2482 _this->_impl_.bottom_ = from._impl_.bottom_;
2483 }
2484 _this->_impl_._has_bits_[0] |= cached_has_bits;
2485 }
2486 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2487 }
2488
CopyFrom(const BlurRegion & from)2489 void BlurRegion::CopyFrom(const BlurRegion& from) {
2490 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.BlurRegion)
2491 if (&from == this) return;
2492 Clear();
2493 MergeFrom(from);
2494 }
2495
IsInitialized() const2496 bool BlurRegion::IsInitialized() const {
2497 return true;
2498 }
2499
InternalSwap(BlurRegion * other)2500 void BlurRegion::InternalSwap(BlurRegion* other) {
2501 using std::swap;
2502 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2503 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2504 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2505 PROTOBUF_FIELD_OFFSET(BlurRegion, _impl_.bottom_)
2506 + sizeof(BlurRegion::_impl_.bottom_) // NOLINT
2507 - PROTOBUF_FIELD_OFFSET(BlurRegion, _impl_.blur_radius_)>(
2508 reinterpret_cast<char*>(&_impl_.blur_radius_),
2509 reinterpret_cast<char*>(&other->_impl_.blur_radius_));
2510 }
2511
GetTypeName() const2512 std::string BlurRegion::GetTypeName() const {
2513 return "perfetto.protos.BlurRegion";
2514 }
2515
2516
2517 // ===================================================================
2518
2519 class ColorTransformProto::_Internal {
2520 public:
2521 };
2522
ColorTransformProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2523 ColorTransformProto::ColorTransformProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2524 bool is_message_owned)
2525 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2526 SharedCtor(arena, is_message_owned);
2527 // @@protoc_insertion_point(arena_constructor:perfetto.protos.ColorTransformProto)
2528 }
ColorTransformProto(const ColorTransformProto & from)2529 ColorTransformProto::ColorTransformProto(const ColorTransformProto& from)
2530 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2531 ColorTransformProto* const _this = this; (void)_this;
2532 new (&_impl_) Impl_{
2533 decltype(_impl_.val_){from._impl_.val_}
2534 , /*decltype(_impl_._cached_size_)*/{}};
2535
2536 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2537 // @@protoc_insertion_point(copy_constructor:perfetto.protos.ColorTransformProto)
2538 }
2539
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2540 inline void ColorTransformProto::SharedCtor(
2541 ::_pb::Arena* arena, bool is_message_owned) {
2542 (void)arena;
2543 (void)is_message_owned;
2544 new (&_impl_) Impl_{
2545 decltype(_impl_.val_){arena}
2546 , /*decltype(_impl_._cached_size_)*/{}
2547 };
2548 }
2549
~ColorTransformProto()2550 ColorTransformProto::~ColorTransformProto() {
2551 // @@protoc_insertion_point(destructor:perfetto.protos.ColorTransformProto)
2552 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2553 (void)arena;
2554 return;
2555 }
2556 SharedDtor();
2557 }
2558
SharedDtor()2559 inline void ColorTransformProto::SharedDtor() {
2560 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2561 _impl_.val_.~RepeatedField();
2562 }
2563
SetCachedSize(int size) const2564 void ColorTransformProto::SetCachedSize(int size) const {
2565 _impl_._cached_size_.Set(size);
2566 }
2567
Clear()2568 void ColorTransformProto::Clear() {
2569 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ColorTransformProto)
2570 ::uint32_t cached_has_bits = 0;
2571 // Prevent compiler warnings about cached_has_bits being unused
2572 (void) cached_has_bits;
2573
2574 _impl_.val_.Clear();
2575 _internal_metadata_.Clear<std::string>();
2576 }
2577
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2578 const char* ColorTransformProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2579 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2580 while (!ctx->Done(&ptr)) {
2581 ::uint32_t tag;
2582 ptr = ::_pbi::ReadTag(ptr, &tag);
2583 switch (tag >> 3) {
2584 // repeated float val = 1 [packed = true];
2585 case 1:
2586 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2587 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_val(), ptr, ctx);
2588 CHK_(ptr);
2589 } else if (static_cast<::uint8_t>(tag) == 13) {
2590 _internal_add_val(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
2591 ptr += sizeof(float);
2592 } else {
2593 goto handle_unusual;
2594 }
2595 continue;
2596 default:
2597 goto handle_unusual;
2598 } // switch
2599 handle_unusual:
2600 if ((tag == 0) || ((tag & 7) == 4)) {
2601 CHK_(ptr);
2602 ctx->SetLastTag(tag);
2603 goto message_done;
2604 }
2605 ptr = UnknownFieldParse(
2606 tag,
2607 _internal_metadata_.mutable_unknown_fields<std::string>(),
2608 ptr, ctx);
2609 CHK_(ptr != nullptr);
2610 } // while
2611 message_done:
2612 return ptr;
2613 failure:
2614 ptr = nullptr;
2615 goto message_done;
2616 #undef CHK_
2617 }
2618
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2619 ::uint8_t* ColorTransformProto::_InternalSerialize(
2620 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2621 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ColorTransformProto)
2622 ::uint32_t cached_has_bits = 0;
2623 (void) cached_has_bits;
2624
2625 // repeated float val = 1 [packed = true];
2626 if (this->_internal_val_size() > 0) {
2627 target = stream->WriteFixedPacked(1, _internal_val(), target);
2628 }
2629
2630 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2631 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2632 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2633 }
2634 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ColorTransformProto)
2635 return target;
2636 }
2637
ByteSizeLong() const2638 size_t ColorTransformProto::ByteSizeLong() const {
2639 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ColorTransformProto)
2640 size_t total_size = 0;
2641
2642 ::uint32_t cached_has_bits = 0;
2643 // Prevent compiler warnings about cached_has_bits being unused
2644 (void) cached_has_bits;
2645
2646 // repeated float val = 1 [packed = true];
2647 {
2648 unsigned int count = static_cast<unsigned int>(this->_internal_val_size());
2649 size_t data_size = 4UL * count;
2650 if (data_size > 0) {
2651 total_size += 1 +
2652 ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
2653 }
2654 total_size += data_size;
2655 }
2656
2657 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2658 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2659 }
2660 int cached_size = ::_pbi::ToCachedSize(total_size);
2661 SetCachedSize(cached_size);
2662 return total_size;
2663 }
2664
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2665 void ColorTransformProto::CheckTypeAndMergeFrom(
2666 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2667 MergeFrom(*::_pbi::DownCast<const ColorTransformProto*>(
2668 &from));
2669 }
2670
MergeFrom(const ColorTransformProto & from)2671 void ColorTransformProto::MergeFrom(const ColorTransformProto& from) {
2672 ColorTransformProto* const _this = this;
2673 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ColorTransformProto)
2674 GOOGLE_DCHECK_NE(&from, _this);
2675 ::uint32_t cached_has_bits = 0;
2676 (void) cached_has_bits;
2677
2678 _this->_impl_.val_.MergeFrom(from._impl_.val_);
2679 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2680 }
2681
CopyFrom(const ColorTransformProto & from)2682 void ColorTransformProto::CopyFrom(const ColorTransformProto& from) {
2683 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ColorTransformProto)
2684 if (&from == this) return;
2685 Clear();
2686 MergeFrom(from);
2687 }
2688
IsInitialized() const2689 bool ColorTransformProto::IsInitialized() const {
2690 return true;
2691 }
2692
InternalSwap(ColorTransformProto * other)2693 void ColorTransformProto::InternalSwap(ColorTransformProto* other) {
2694 using std::swap;
2695 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2696 _impl_.val_.InternalSwap(&other->_impl_.val_);
2697 }
2698
GetTypeName() const2699 std::string ColorTransformProto::GetTypeName() const {
2700 return "perfetto.protos.ColorTransformProto";
2701 }
2702
2703
2704 // @@protoc_insertion_point(namespace_scope)
2705 } // namespace protos
2706 } // namespace perfetto
2707 PROTOBUF_NAMESPACE_OPEN
2708 template<> PROTOBUF_NOINLINE ::perfetto::protos::RegionProto*
CreateMaybeMessage(Arena * arena)2709 Arena::CreateMaybeMessage< ::perfetto::protos::RegionProto >(Arena* arena) {
2710 return Arena::CreateMessageInternal< ::perfetto::protos::RegionProto >(arena);
2711 }
2712 template<> PROTOBUF_NOINLINE ::perfetto::protos::SizeProto*
CreateMaybeMessage(Arena * arena)2713 Arena::CreateMaybeMessage< ::perfetto::protos::SizeProto >(Arena* arena) {
2714 return Arena::CreateMessageInternal< ::perfetto::protos::SizeProto >(arena);
2715 }
2716 template<> PROTOBUF_NOINLINE ::perfetto::protos::TransformProto*
CreateMaybeMessage(Arena * arena)2717 Arena::CreateMaybeMessage< ::perfetto::protos::TransformProto >(Arena* arena) {
2718 return Arena::CreateMessageInternal< ::perfetto::protos::TransformProto >(arena);
2719 }
2720 template<> PROTOBUF_NOINLINE ::perfetto::protos::ColorProto*
CreateMaybeMessage(Arena * arena)2721 Arena::CreateMaybeMessage< ::perfetto::protos::ColorProto >(Arena* arena) {
2722 return Arena::CreateMessageInternal< ::perfetto::protos::ColorProto >(arena);
2723 }
2724 template<> PROTOBUF_NOINLINE ::perfetto::protos::InputWindowInfoProto*
CreateMaybeMessage(Arena * arena)2725 Arena::CreateMaybeMessage< ::perfetto::protos::InputWindowInfoProto >(Arena* arena) {
2726 return Arena::CreateMessageInternal< ::perfetto::protos::InputWindowInfoProto >(arena);
2727 }
2728 template<> PROTOBUF_NOINLINE ::perfetto::protos::BlurRegion*
CreateMaybeMessage(Arena * arena)2729 Arena::CreateMaybeMessage< ::perfetto::protos::BlurRegion >(Arena* arena) {
2730 return Arena::CreateMessageInternal< ::perfetto::protos::BlurRegion >(arena);
2731 }
2732 template<> PROTOBUF_NOINLINE ::perfetto::protos::ColorTransformProto*
CreateMaybeMessage(Arena * arena)2733 Arena::CreateMaybeMessage< ::perfetto::protos::ColorTransformProto >(Arena* arena) {
2734 return Arena::CreateMessageInternal< ::perfetto::protos::ColorTransformProto >(arena);
2735 }
2736 PROTOBUF_NAMESPACE_CLOSE
2737
2738 // @@protoc_insertion_point(global_scope)
2739 #include <google/protobuf/port_undef.inc>
2740