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