1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/android/surfaceflinger_layers.proto
3
4 #include "protos/perfetto/trace/android/surfaceflinger_layers.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 {
LayersTraceFileProto(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR LayersTraceFileProto::LayersTraceFileProto(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.entry_)*/{}
28 , /*decltype(_impl_.magic_number_)*/::uint64_t{0u}
29 , /*decltype(_impl_.real_to_elapsed_time_offset_nanos_)*/::uint64_t{0u}} {}
30 struct LayersTraceFileProtoDefaultTypeInternal {
LayersTraceFileProtoDefaultTypeInternalperfetto::protos::LayersTraceFileProtoDefaultTypeInternal31 PROTOBUF_CONSTEXPR LayersTraceFileProtoDefaultTypeInternal()
32 : _instance(::_pbi::ConstantInitialized{}) {}
~LayersTraceFileProtoDefaultTypeInternalperfetto::protos::LayersTraceFileProtoDefaultTypeInternal33 ~LayersTraceFileProtoDefaultTypeInternal() {}
34 union { // NOLINT(misc-non-private-member-variables-in-classes)
35 LayersTraceFileProto _instance;
36 };
37 };
38 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LayersTraceFileProtoDefaultTypeInternal _LayersTraceFileProto_default_instance_;
LayersSnapshotProto(::_pbi::ConstantInitialized)39 PROTOBUF_CONSTEXPR LayersSnapshotProto::LayersSnapshotProto(
40 ::_pbi::ConstantInitialized): _impl_{
41 /*decltype(_impl_._has_bits_)*/{}
42 , /*decltype(_impl_._cached_size_)*/{}
43 , /*decltype(_impl_.displays_)*/{}
44 , /*decltype(_impl_.where_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
45 , /*decltype(_impl_.hwc_blob_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
46 , /*decltype(_impl_.layers_)*/nullptr
47 , /*decltype(_impl_.elapsed_realtime_nanos_)*/::int64_t{0}
48 , /*decltype(_impl_.excludes_composition_state_)*/false
49 , /*decltype(_impl_.missed_entries_)*/0u
50 , /*decltype(_impl_.vsync_id_)*/::int64_t{0}} {}
51 struct LayersSnapshotProtoDefaultTypeInternal {
LayersSnapshotProtoDefaultTypeInternalperfetto::protos::LayersSnapshotProtoDefaultTypeInternal52 PROTOBUF_CONSTEXPR LayersSnapshotProtoDefaultTypeInternal()
53 : _instance(::_pbi::ConstantInitialized{}) {}
~LayersSnapshotProtoDefaultTypeInternalperfetto::protos::LayersSnapshotProtoDefaultTypeInternal54 ~LayersSnapshotProtoDefaultTypeInternal() {}
55 union { // NOLINT(misc-non-private-member-variables-in-classes)
56 LayersSnapshotProto _instance;
57 };
58 };
59 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LayersSnapshotProtoDefaultTypeInternal _LayersSnapshotProto_default_instance_;
LayersProto(::_pbi::ConstantInitialized)60 PROTOBUF_CONSTEXPR LayersProto::LayersProto(
61 ::_pbi::ConstantInitialized): _impl_{
62 /*decltype(_impl_.layers_)*/{}
63 , /*decltype(_impl_._cached_size_)*/{}} {}
64 struct LayersProtoDefaultTypeInternal {
LayersProtoDefaultTypeInternalperfetto::protos::LayersProtoDefaultTypeInternal65 PROTOBUF_CONSTEXPR LayersProtoDefaultTypeInternal()
66 : _instance(::_pbi::ConstantInitialized{}) {}
~LayersProtoDefaultTypeInternalperfetto::protos::LayersProtoDefaultTypeInternal67 ~LayersProtoDefaultTypeInternal() {}
68 union { // NOLINT(misc-non-private-member-variables-in-classes)
69 LayersProto _instance;
70 };
71 };
72 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LayersProtoDefaultTypeInternal _LayersProto_default_instance_;
DisplayProto(::_pbi::ConstantInitialized)73 PROTOBUF_CONSTEXPR DisplayProto::DisplayProto(
74 ::_pbi::ConstantInitialized): _impl_{
75 /*decltype(_impl_._has_bits_)*/{}
76 , /*decltype(_impl_._cached_size_)*/{}
77 , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
78 , /*decltype(_impl_.size_)*/nullptr
79 , /*decltype(_impl_.layer_stack_space_rect_)*/nullptr
80 , /*decltype(_impl_.transform_)*/nullptr
81 , /*decltype(_impl_.id_)*/::uint64_t{0u}
82 , /*decltype(_impl_.layer_stack_)*/0u
83 , /*decltype(_impl_.is_virtual_)*/false
84 , /*decltype(_impl_.dpi_x_)*/0
85 , /*decltype(_impl_.dpi_y_)*/0} {}
86 struct DisplayProtoDefaultTypeInternal {
DisplayProtoDefaultTypeInternalperfetto::protos::DisplayProtoDefaultTypeInternal87 PROTOBUF_CONSTEXPR DisplayProtoDefaultTypeInternal()
88 : _instance(::_pbi::ConstantInitialized{}) {}
~DisplayProtoDefaultTypeInternalperfetto::protos::DisplayProtoDefaultTypeInternal89 ~DisplayProtoDefaultTypeInternal() {}
90 union { // NOLINT(misc-non-private-member-variables-in-classes)
91 DisplayProto _instance;
92 };
93 };
94 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DisplayProtoDefaultTypeInternal _DisplayProto_default_instance_;
LayerProto_MetadataEntry_DoNotUse(::_pbi::ConstantInitialized)95 PROTOBUF_CONSTEXPR LayerProto_MetadataEntry_DoNotUse::LayerProto_MetadataEntry_DoNotUse(
96 ::_pbi::ConstantInitialized) {}
97 struct LayerProto_MetadataEntry_DoNotUseDefaultTypeInternal {
LayerProto_MetadataEntry_DoNotUseDefaultTypeInternalperfetto::protos::LayerProto_MetadataEntry_DoNotUseDefaultTypeInternal98 PROTOBUF_CONSTEXPR LayerProto_MetadataEntry_DoNotUseDefaultTypeInternal()
99 : _instance(::_pbi::ConstantInitialized{}) {}
~LayerProto_MetadataEntry_DoNotUseDefaultTypeInternalperfetto::protos::LayerProto_MetadataEntry_DoNotUseDefaultTypeInternal100 ~LayerProto_MetadataEntry_DoNotUseDefaultTypeInternal() {}
101 union { // NOLINT(misc-non-private-member-variables-in-classes)
102 LayerProto_MetadataEntry_DoNotUse _instance;
103 };
104 };
105 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LayerProto_MetadataEntry_DoNotUseDefaultTypeInternal _LayerProto_MetadataEntry_DoNotUse_default_instance_;
LayerProto(::_pbi::ConstantInitialized)106 PROTOBUF_CONSTEXPR LayerProto::LayerProto(
107 ::_pbi::ConstantInitialized): _impl_{
108 /*decltype(_impl_._has_bits_)*/{}
109 , /*decltype(_impl_._cached_size_)*/{}
110 , /*decltype(_impl_.children_)*/{}
111 , /*decltype(_impl_._children_cached_byte_size_)*/{0}
112 , /*decltype(_impl_.relatives_)*/{}
113 , /*decltype(_impl_._relatives_cached_byte_size_)*/{0}
114 , /*decltype(_impl_.barrier_layer_)*/{}
115 , /*decltype(_impl_.metadata_)*/{}
116 , /*decltype(_impl_.blur_regions_)*/{}
117 , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
118 , /*decltype(_impl_.type_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
119 , /*decltype(_impl_.dataspace_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
120 , /*decltype(_impl_.pixel_format_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
121 , /*decltype(_impl_.transparent_region_)*/nullptr
122 , /*decltype(_impl_.visible_region_)*/nullptr
123 , /*decltype(_impl_.damage_region_)*/nullptr
124 , /*decltype(_impl_.position_)*/nullptr
125 , /*decltype(_impl_.requested_position_)*/nullptr
126 , /*decltype(_impl_.size_)*/nullptr
127 , /*decltype(_impl_.crop_)*/nullptr
128 , /*decltype(_impl_.final_crop_)*/nullptr
129 , /*decltype(_impl_.color_)*/nullptr
130 , /*decltype(_impl_.requested_color_)*/nullptr
131 , /*decltype(_impl_.transform_)*/nullptr
132 , /*decltype(_impl_.requested_transform_)*/nullptr
133 , /*decltype(_impl_.active_buffer_)*/nullptr
134 , /*decltype(_impl_.hwc_frame_)*/nullptr
135 , /*decltype(_impl_.hwc_crop_)*/nullptr
136 , /*decltype(_impl_.buffer_transform_)*/nullptr
137 , /*decltype(_impl_.effective_transform_)*/nullptr
138 , /*decltype(_impl_.source_bounds_)*/nullptr
139 , /*decltype(_impl_.bounds_)*/nullptr
140 , /*decltype(_impl_.screen_bounds_)*/nullptr
141 , /*decltype(_impl_.input_window_info_)*/nullptr
142 , /*decltype(_impl_.corner_radius_crop_)*/nullptr
143 , /*decltype(_impl_.color_transform_)*/nullptr
144 , /*decltype(_impl_.destination_frame_)*/nullptr
145 , /*decltype(_impl_.id_)*/0
146 , /*decltype(_impl_.layer_stack_)*/0u
147 , /*decltype(_impl_.z_)*/0
148 , /*decltype(_impl_.flags_)*/0u
149 , /*decltype(_impl_.is_opaque_)*/false
150 , /*decltype(_impl_.invalidate_)*/false
151 , /*decltype(_impl_.refresh_pending_)*/false
152 , /*decltype(_impl_.is_protected_)*/false
153 , /*decltype(_impl_.parent_)*/0
154 , /*decltype(_impl_.z_order_relative_of_)*/0
155 , /*decltype(_impl_.queued_frames_)*/0
156 , /*decltype(_impl_.hwc_transform_)*/0
157 , /*decltype(_impl_.window_type_)*/0
158 , /*decltype(_impl_.app_id_)*/0
159 , /*decltype(_impl_.hwc_composition_type_)*/0
160 , /*decltype(_impl_.curr_frame_)*/::uint64_t{0u}
161 , /*decltype(_impl_.effective_scaling_mode_)*/0
162 , /*decltype(_impl_.corner_radius_)*/0
163 , /*decltype(_impl_.shadow_radius_)*/0
164 , /*decltype(_impl_.background_blur_radius_)*/0
165 , /*decltype(_impl_.owner_uid_)*/0u
166 , /*decltype(_impl_.is_relative_of_)*/false
167 , /*decltype(_impl_.is_trusted_overlay_)*/false
168 , /*decltype(_impl_.requested_corner_radius_)*/0
169 , /*decltype(_impl_.original_id_)*/0u
170 , /*decltype(_impl_.trusted_overlay_)*/0} {}
171 struct LayerProtoDefaultTypeInternal {
LayerProtoDefaultTypeInternalperfetto::protos::LayerProtoDefaultTypeInternal172 PROTOBUF_CONSTEXPR LayerProtoDefaultTypeInternal()
173 : _instance(::_pbi::ConstantInitialized{}) {}
~LayerProtoDefaultTypeInternalperfetto::protos::LayerProtoDefaultTypeInternal174 ~LayerProtoDefaultTypeInternal() {}
175 union { // NOLINT(misc-non-private-member-variables-in-classes)
176 LayerProto _instance;
177 };
178 };
179 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LayerProtoDefaultTypeInternal _LayerProto_default_instance_;
PositionProto(::_pbi::ConstantInitialized)180 PROTOBUF_CONSTEXPR PositionProto::PositionProto(
181 ::_pbi::ConstantInitialized): _impl_{
182 /*decltype(_impl_._has_bits_)*/{}
183 , /*decltype(_impl_._cached_size_)*/{}
184 , /*decltype(_impl_.x_)*/0
185 , /*decltype(_impl_.y_)*/0} {}
186 struct PositionProtoDefaultTypeInternal {
PositionProtoDefaultTypeInternalperfetto::protos::PositionProtoDefaultTypeInternal187 PROTOBUF_CONSTEXPR PositionProtoDefaultTypeInternal()
188 : _instance(::_pbi::ConstantInitialized{}) {}
~PositionProtoDefaultTypeInternalperfetto::protos::PositionProtoDefaultTypeInternal189 ~PositionProtoDefaultTypeInternal() {}
190 union { // NOLINT(misc-non-private-member-variables-in-classes)
191 PositionProto _instance;
192 };
193 };
194 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PositionProtoDefaultTypeInternal _PositionProto_default_instance_;
FloatRectProto(::_pbi::ConstantInitialized)195 PROTOBUF_CONSTEXPR FloatRectProto::FloatRectProto(
196 ::_pbi::ConstantInitialized): _impl_{
197 /*decltype(_impl_._has_bits_)*/{}
198 , /*decltype(_impl_._cached_size_)*/{}
199 , /*decltype(_impl_.left_)*/0
200 , /*decltype(_impl_.top_)*/0
201 , /*decltype(_impl_.right_)*/0
202 , /*decltype(_impl_.bottom_)*/0} {}
203 struct FloatRectProtoDefaultTypeInternal {
FloatRectProtoDefaultTypeInternalperfetto::protos::FloatRectProtoDefaultTypeInternal204 PROTOBUF_CONSTEXPR FloatRectProtoDefaultTypeInternal()
205 : _instance(::_pbi::ConstantInitialized{}) {}
~FloatRectProtoDefaultTypeInternalperfetto::protos::FloatRectProtoDefaultTypeInternal206 ~FloatRectProtoDefaultTypeInternal() {}
207 union { // NOLINT(misc-non-private-member-variables-in-classes)
208 FloatRectProto _instance;
209 };
210 };
211 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FloatRectProtoDefaultTypeInternal _FloatRectProto_default_instance_;
ActiveBufferProto(::_pbi::ConstantInitialized)212 PROTOBUF_CONSTEXPR ActiveBufferProto::ActiveBufferProto(
213 ::_pbi::ConstantInitialized): _impl_{
214 /*decltype(_impl_._has_bits_)*/{}
215 , /*decltype(_impl_._cached_size_)*/{}
216 , /*decltype(_impl_.width_)*/0u
217 , /*decltype(_impl_.height_)*/0u
218 , /*decltype(_impl_.stride_)*/0u
219 , /*decltype(_impl_.format_)*/0
220 , /*decltype(_impl_.usage_)*/::uint64_t{0u}} {}
221 struct ActiveBufferProtoDefaultTypeInternal {
ActiveBufferProtoDefaultTypeInternalperfetto::protos::ActiveBufferProtoDefaultTypeInternal222 PROTOBUF_CONSTEXPR ActiveBufferProtoDefaultTypeInternal()
223 : _instance(::_pbi::ConstantInitialized{}) {}
~ActiveBufferProtoDefaultTypeInternalperfetto::protos::ActiveBufferProtoDefaultTypeInternal224 ~ActiveBufferProtoDefaultTypeInternal() {}
225 union { // NOLINT(misc-non-private-member-variables-in-classes)
226 ActiveBufferProto _instance;
227 };
228 };
229 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ActiveBufferProtoDefaultTypeInternal _ActiveBufferProto_default_instance_;
BarrierLayerProto(::_pbi::ConstantInitialized)230 PROTOBUF_CONSTEXPR BarrierLayerProto::BarrierLayerProto(
231 ::_pbi::ConstantInitialized): _impl_{
232 /*decltype(_impl_._has_bits_)*/{}
233 , /*decltype(_impl_._cached_size_)*/{}
234 , /*decltype(_impl_.frame_number_)*/::uint64_t{0u}
235 , /*decltype(_impl_.id_)*/0} {}
236 struct BarrierLayerProtoDefaultTypeInternal {
BarrierLayerProtoDefaultTypeInternalperfetto::protos::BarrierLayerProtoDefaultTypeInternal237 PROTOBUF_CONSTEXPR BarrierLayerProtoDefaultTypeInternal()
238 : _instance(::_pbi::ConstantInitialized{}) {}
~BarrierLayerProtoDefaultTypeInternalperfetto::protos::BarrierLayerProtoDefaultTypeInternal239 ~BarrierLayerProtoDefaultTypeInternal() {}
240 union { // NOLINT(misc-non-private-member-variables-in-classes)
241 BarrierLayerProto _instance;
242 };
243 };
244 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BarrierLayerProtoDefaultTypeInternal _BarrierLayerProto_default_instance_;
245 } // namespace protos
246 } // namespace perfetto
247 namespace perfetto {
248 namespace protos {
LayersTraceFileProto_MagicNumber_IsValid(int value)249 bool LayersTraceFileProto_MagicNumber_IsValid(int value) {
250 switch (value) {
251 case 0:
252 case 1162035538:
253 case 1414682956:
254 return true;
255 default:
256 return false;
257 }
258 }
259
260 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> LayersTraceFileProto_MagicNumber_strings[3] = {};
261
262 static const char LayersTraceFileProto_MagicNumber_names[] =
263 "INVALID"
264 "MAGIC_NUMBER_H"
265 "MAGIC_NUMBER_L";
266
267 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry LayersTraceFileProto_MagicNumber_entries[] = {
268 { {LayersTraceFileProto_MagicNumber_names + 0, 7}, 0 },
269 { {LayersTraceFileProto_MagicNumber_names + 7, 14}, 1162035538 },
270 { {LayersTraceFileProto_MagicNumber_names + 21, 14}, 1414682956 },
271 };
272
273 static const int LayersTraceFileProto_MagicNumber_entries_by_number[] = {
274 0, // 0 -> INVALID
275 1, // 1162035538 -> MAGIC_NUMBER_H
276 2, // 1414682956 -> MAGIC_NUMBER_L
277 };
278
LayersTraceFileProto_MagicNumber_Name(LayersTraceFileProto_MagicNumber value)279 const std::string& LayersTraceFileProto_MagicNumber_Name(
280 LayersTraceFileProto_MagicNumber value) {
281 static const bool dummy =
282 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
283 LayersTraceFileProto_MagicNumber_entries,
284 LayersTraceFileProto_MagicNumber_entries_by_number,
285 3, LayersTraceFileProto_MagicNumber_strings);
286 (void) dummy;
287 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
288 LayersTraceFileProto_MagicNumber_entries,
289 LayersTraceFileProto_MagicNumber_entries_by_number,
290 3, value);
291 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
292 LayersTraceFileProto_MagicNumber_strings[idx].get();
293 }
LayersTraceFileProto_MagicNumber_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,LayersTraceFileProto_MagicNumber * value)294 bool LayersTraceFileProto_MagicNumber_Parse(
295 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, LayersTraceFileProto_MagicNumber* value) {
296 int int_value;
297 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
298 LayersTraceFileProto_MagicNumber_entries, 3, name, &int_value);
299 if (success) {
300 *value = static_cast<LayersTraceFileProto_MagicNumber>(int_value);
301 }
302 return success;
303 }
304 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
305 constexpr LayersTraceFileProto_MagicNumber LayersTraceFileProto::INVALID;
306 constexpr LayersTraceFileProto_MagicNumber LayersTraceFileProto::MAGIC_NUMBER_L;
307 constexpr LayersTraceFileProto_MagicNumber LayersTraceFileProto::MAGIC_NUMBER_H;
308 constexpr LayersTraceFileProto_MagicNumber LayersTraceFileProto::MagicNumber_MIN;
309 constexpr LayersTraceFileProto_MagicNumber LayersTraceFileProto::MagicNumber_MAX;
310 constexpr int LayersTraceFileProto::MagicNumber_ARRAYSIZE;
311 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
HwcCompositionType_IsValid(int value)312 bool HwcCompositionType_IsValid(int value) {
313 switch (value) {
314 case 0:
315 case 1:
316 case 2:
317 case 3:
318 case 4:
319 case 5:
320 case 6:
321 return true;
322 default:
323 return false;
324 }
325 }
326
327 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> HwcCompositionType_strings[7] = {};
328
329 static const char HwcCompositionType_names[] =
330 "HWC_TYPE_CLIENT"
331 "HWC_TYPE_CURSOR"
332 "HWC_TYPE_DEVICE"
333 "HWC_TYPE_DISPLAY_DECORATION"
334 "HWC_TYPE_SIDEBAND"
335 "HWC_TYPE_SOLID_COLOR"
336 "HWC_TYPE_UNSPECIFIED";
337
338 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry HwcCompositionType_entries[] = {
339 { {HwcCompositionType_names + 0, 15}, 1 },
340 { {HwcCompositionType_names + 15, 15}, 4 },
341 { {HwcCompositionType_names + 30, 15}, 2 },
342 { {HwcCompositionType_names + 45, 27}, 6 },
343 { {HwcCompositionType_names + 72, 17}, 5 },
344 { {HwcCompositionType_names + 89, 20}, 3 },
345 { {HwcCompositionType_names + 109, 20}, 0 },
346 };
347
348 static const int HwcCompositionType_entries_by_number[] = {
349 6, // 0 -> HWC_TYPE_UNSPECIFIED
350 0, // 1 -> HWC_TYPE_CLIENT
351 2, // 2 -> HWC_TYPE_DEVICE
352 5, // 3 -> HWC_TYPE_SOLID_COLOR
353 1, // 4 -> HWC_TYPE_CURSOR
354 4, // 5 -> HWC_TYPE_SIDEBAND
355 3, // 6 -> HWC_TYPE_DISPLAY_DECORATION
356 };
357
HwcCompositionType_Name(HwcCompositionType value)358 const std::string& HwcCompositionType_Name(
359 HwcCompositionType value) {
360 static const bool dummy =
361 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
362 HwcCompositionType_entries,
363 HwcCompositionType_entries_by_number,
364 7, HwcCompositionType_strings);
365 (void) dummy;
366 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
367 HwcCompositionType_entries,
368 HwcCompositionType_entries_by_number,
369 7, value);
370 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
371 HwcCompositionType_strings[idx].get();
372 }
HwcCompositionType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,HwcCompositionType * value)373 bool HwcCompositionType_Parse(
374 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, HwcCompositionType* value) {
375 int int_value;
376 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
377 HwcCompositionType_entries, 7, name, &int_value);
378 if (success) {
379 *value = static_cast<HwcCompositionType>(int_value);
380 }
381 return success;
382 }
383
384 // ===================================================================
385
386 class LayersTraceFileProto::_Internal {
387 public:
388 using HasBits = decltype(std::declval<LayersTraceFileProto>()._impl_._has_bits_);
set_has_magic_number(HasBits * has_bits)389 static void set_has_magic_number(HasBits* has_bits) {
390 (*has_bits)[0] |= 1u;
391 }
set_has_real_to_elapsed_time_offset_nanos(HasBits * has_bits)392 static void set_has_real_to_elapsed_time_offset_nanos(HasBits* has_bits) {
393 (*has_bits)[0] |= 2u;
394 }
395 };
396
LayersTraceFileProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)397 LayersTraceFileProto::LayersTraceFileProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
398 bool is_message_owned)
399 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
400 SharedCtor(arena, is_message_owned);
401 // @@protoc_insertion_point(arena_constructor:perfetto.protos.LayersTraceFileProto)
402 }
LayersTraceFileProto(const LayersTraceFileProto & from)403 LayersTraceFileProto::LayersTraceFileProto(const LayersTraceFileProto& from)
404 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
405 LayersTraceFileProto* const _this = this; (void)_this;
406 new (&_impl_) Impl_{
407 decltype(_impl_._has_bits_){from._impl_._has_bits_}
408 , /*decltype(_impl_._cached_size_)*/{}
409 , decltype(_impl_.entry_){from._impl_.entry_}
410 , decltype(_impl_.magic_number_){}
411 , decltype(_impl_.real_to_elapsed_time_offset_nanos_){}};
412
413 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
414 ::memcpy(&_impl_.magic_number_, &from._impl_.magic_number_,
415 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.real_to_elapsed_time_offset_nanos_) -
416 reinterpret_cast<char*>(&_impl_.magic_number_)) + sizeof(_impl_.real_to_elapsed_time_offset_nanos_));
417 // @@protoc_insertion_point(copy_constructor:perfetto.protos.LayersTraceFileProto)
418 }
419
SharedCtor(::_pb::Arena * arena,bool is_message_owned)420 inline void LayersTraceFileProto::SharedCtor(
421 ::_pb::Arena* arena, bool is_message_owned) {
422 (void)arena;
423 (void)is_message_owned;
424 new (&_impl_) Impl_{
425 decltype(_impl_._has_bits_){}
426 , /*decltype(_impl_._cached_size_)*/{}
427 , decltype(_impl_.entry_){arena}
428 , decltype(_impl_.magic_number_){::uint64_t{0u}}
429 , decltype(_impl_.real_to_elapsed_time_offset_nanos_){::uint64_t{0u}}
430 };
431 }
432
~LayersTraceFileProto()433 LayersTraceFileProto::~LayersTraceFileProto() {
434 // @@protoc_insertion_point(destructor:perfetto.protos.LayersTraceFileProto)
435 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
436 (void)arena;
437 return;
438 }
439 SharedDtor();
440 }
441
SharedDtor()442 inline void LayersTraceFileProto::SharedDtor() {
443 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
444 _impl_.entry_.~RepeatedPtrField();
445 }
446
SetCachedSize(int size) const447 void LayersTraceFileProto::SetCachedSize(int size) const {
448 _impl_._cached_size_.Set(size);
449 }
450
Clear()451 void LayersTraceFileProto::Clear() {
452 // @@protoc_insertion_point(message_clear_start:perfetto.protos.LayersTraceFileProto)
453 ::uint32_t cached_has_bits = 0;
454 // Prevent compiler warnings about cached_has_bits being unused
455 (void) cached_has_bits;
456
457 _impl_.entry_.Clear();
458 cached_has_bits = _impl_._has_bits_[0];
459 if (cached_has_bits & 0x00000003u) {
460 ::memset(&_impl_.magic_number_, 0, static_cast<size_t>(
461 reinterpret_cast<char*>(&_impl_.real_to_elapsed_time_offset_nanos_) -
462 reinterpret_cast<char*>(&_impl_.magic_number_)) + sizeof(_impl_.real_to_elapsed_time_offset_nanos_));
463 }
464 _impl_._has_bits_.Clear();
465 _internal_metadata_.Clear<std::string>();
466 }
467
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)468 const char* LayersTraceFileProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
469 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
470 _Internal::HasBits has_bits{};
471 while (!ctx->Done(&ptr)) {
472 ::uint32_t tag;
473 ptr = ::_pbi::ReadTag(ptr, &tag);
474 switch (tag >> 3) {
475 // optional fixed64 magic_number = 1;
476 case 1:
477 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 9)) {
478 _Internal::set_has_magic_number(&has_bits);
479 _impl_.magic_number_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::uint64_t>(ptr);
480 ptr += sizeof(::uint64_t);
481 } else {
482 goto handle_unusual;
483 }
484 continue;
485 // repeated .perfetto.protos.LayersSnapshotProto entry = 2;
486 case 2:
487 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
488 ptr -= 1;
489 do {
490 ptr += 1;
491 ptr = ctx->ParseMessage(_internal_add_entry(), ptr);
492 CHK_(ptr);
493 if (!ctx->DataAvailable(ptr)) break;
494 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
495 } else {
496 goto handle_unusual;
497 }
498 continue;
499 // optional fixed64 real_to_elapsed_time_offset_nanos = 3;
500 case 3:
501 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 25)) {
502 _Internal::set_has_real_to_elapsed_time_offset_nanos(&has_bits);
503 _impl_.real_to_elapsed_time_offset_nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::uint64_t>(ptr);
504 ptr += sizeof(::uint64_t);
505 } else {
506 goto handle_unusual;
507 }
508 continue;
509 default:
510 goto handle_unusual;
511 } // switch
512 handle_unusual:
513 if ((tag == 0) || ((tag & 7) == 4)) {
514 CHK_(ptr);
515 ctx->SetLastTag(tag);
516 goto message_done;
517 }
518 ptr = UnknownFieldParse(
519 tag,
520 _internal_metadata_.mutable_unknown_fields<std::string>(),
521 ptr, ctx);
522 CHK_(ptr != nullptr);
523 } // while
524 message_done:
525 _impl_._has_bits_.Or(has_bits);
526 return ptr;
527 failure:
528 ptr = nullptr;
529 goto message_done;
530 #undef CHK_
531 }
532
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const533 ::uint8_t* LayersTraceFileProto::_InternalSerialize(
534 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
535 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.LayersTraceFileProto)
536 ::uint32_t cached_has_bits = 0;
537 (void) cached_has_bits;
538
539 cached_has_bits = _impl_._has_bits_[0];
540 // optional fixed64 magic_number = 1;
541 if (cached_has_bits & 0x00000001u) {
542 target = stream->EnsureSpace(target);
543 target = ::_pbi::WireFormatLite::WriteFixed64ToArray(1, this->_internal_magic_number(), target);
544 }
545
546 // repeated .perfetto.protos.LayersSnapshotProto entry = 2;
547 for (unsigned i = 0,
548 n = static_cast<unsigned>(this->_internal_entry_size()); i < n; i++) {
549 const auto& repfield = this->_internal_entry(i);
550 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
551 InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
552 }
553
554 // optional fixed64 real_to_elapsed_time_offset_nanos = 3;
555 if (cached_has_bits & 0x00000002u) {
556 target = stream->EnsureSpace(target);
557 target = ::_pbi::WireFormatLite::WriteFixed64ToArray(3, this->_internal_real_to_elapsed_time_offset_nanos(), target);
558 }
559
560 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
561 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
562 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
563 }
564 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.LayersTraceFileProto)
565 return target;
566 }
567
ByteSizeLong() const568 size_t LayersTraceFileProto::ByteSizeLong() const {
569 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.LayersTraceFileProto)
570 size_t total_size = 0;
571
572 ::uint32_t cached_has_bits = 0;
573 // Prevent compiler warnings about cached_has_bits being unused
574 (void) cached_has_bits;
575
576 // repeated .perfetto.protos.LayersSnapshotProto entry = 2;
577 total_size += 1UL * this->_internal_entry_size();
578 for (const auto& msg : this->_impl_.entry_) {
579 total_size +=
580 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
581 }
582
583 cached_has_bits = _impl_._has_bits_[0];
584 if (cached_has_bits & 0x00000003u) {
585 // optional fixed64 magic_number = 1;
586 if (cached_has_bits & 0x00000001u) {
587 total_size += 1 + 8;
588 }
589
590 // optional fixed64 real_to_elapsed_time_offset_nanos = 3;
591 if (cached_has_bits & 0x00000002u) {
592 total_size += 1 + 8;
593 }
594
595 }
596 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
597 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
598 }
599 int cached_size = ::_pbi::ToCachedSize(total_size);
600 SetCachedSize(cached_size);
601 return total_size;
602 }
603
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)604 void LayersTraceFileProto::CheckTypeAndMergeFrom(
605 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
606 MergeFrom(*::_pbi::DownCast<const LayersTraceFileProto*>(
607 &from));
608 }
609
MergeFrom(const LayersTraceFileProto & from)610 void LayersTraceFileProto::MergeFrom(const LayersTraceFileProto& from) {
611 LayersTraceFileProto* const _this = this;
612 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.LayersTraceFileProto)
613 GOOGLE_DCHECK_NE(&from, _this);
614 ::uint32_t cached_has_bits = 0;
615 (void) cached_has_bits;
616
617 _this->_impl_.entry_.MergeFrom(from._impl_.entry_);
618 cached_has_bits = from._impl_._has_bits_[0];
619 if (cached_has_bits & 0x00000003u) {
620 if (cached_has_bits & 0x00000001u) {
621 _this->_impl_.magic_number_ = from._impl_.magic_number_;
622 }
623 if (cached_has_bits & 0x00000002u) {
624 _this->_impl_.real_to_elapsed_time_offset_nanos_ = from._impl_.real_to_elapsed_time_offset_nanos_;
625 }
626 _this->_impl_._has_bits_[0] |= cached_has_bits;
627 }
628 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
629 }
630
CopyFrom(const LayersTraceFileProto & from)631 void LayersTraceFileProto::CopyFrom(const LayersTraceFileProto& from) {
632 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.LayersTraceFileProto)
633 if (&from == this) return;
634 Clear();
635 MergeFrom(from);
636 }
637
IsInitialized() const638 bool LayersTraceFileProto::IsInitialized() const {
639 return true;
640 }
641
InternalSwap(LayersTraceFileProto * other)642 void LayersTraceFileProto::InternalSwap(LayersTraceFileProto* other) {
643 using std::swap;
644 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
645 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
646 _impl_.entry_.InternalSwap(&other->_impl_.entry_);
647 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
648 PROTOBUF_FIELD_OFFSET(LayersTraceFileProto, _impl_.real_to_elapsed_time_offset_nanos_)
649 + sizeof(LayersTraceFileProto::_impl_.real_to_elapsed_time_offset_nanos_) // NOLINT
650 - PROTOBUF_FIELD_OFFSET(LayersTraceFileProto, _impl_.magic_number_)>(
651 reinterpret_cast<char*>(&_impl_.magic_number_),
652 reinterpret_cast<char*>(&other->_impl_.magic_number_));
653 }
654
GetTypeName() const655 std::string LayersTraceFileProto::GetTypeName() const {
656 return "perfetto.protos.LayersTraceFileProto";
657 }
658
659
660 // ===================================================================
661
662 class LayersSnapshotProto::_Internal {
663 public:
664 using HasBits = decltype(std::declval<LayersSnapshotProto>()._impl_._has_bits_);
set_has_elapsed_realtime_nanos(HasBits * has_bits)665 static void set_has_elapsed_realtime_nanos(HasBits* has_bits) {
666 (*has_bits)[0] |= 8u;
667 }
set_has_where(HasBits * has_bits)668 static void set_has_where(HasBits* has_bits) {
669 (*has_bits)[0] |= 1u;
670 }
671 static const ::perfetto::protos::LayersProto& layers(const LayersSnapshotProto* msg);
set_has_layers(HasBits * has_bits)672 static void set_has_layers(HasBits* has_bits) {
673 (*has_bits)[0] |= 4u;
674 }
set_has_hwc_blob(HasBits * has_bits)675 static void set_has_hwc_blob(HasBits* has_bits) {
676 (*has_bits)[0] |= 2u;
677 }
set_has_excludes_composition_state(HasBits * has_bits)678 static void set_has_excludes_composition_state(HasBits* has_bits) {
679 (*has_bits)[0] |= 16u;
680 }
set_has_missed_entries(HasBits * has_bits)681 static void set_has_missed_entries(HasBits* has_bits) {
682 (*has_bits)[0] |= 32u;
683 }
set_has_vsync_id(HasBits * has_bits)684 static void set_has_vsync_id(HasBits* has_bits) {
685 (*has_bits)[0] |= 64u;
686 }
687 };
688
689 const ::perfetto::protos::LayersProto&
layers(const LayersSnapshotProto * msg)690 LayersSnapshotProto::_Internal::layers(const LayersSnapshotProto* msg) {
691 return *msg->_impl_.layers_;
692 }
LayersSnapshotProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)693 LayersSnapshotProto::LayersSnapshotProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
694 bool is_message_owned)
695 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
696 SharedCtor(arena, is_message_owned);
697 // @@protoc_insertion_point(arena_constructor:perfetto.protos.LayersSnapshotProto)
698 }
LayersSnapshotProto(const LayersSnapshotProto & from)699 LayersSnapshotProto::LayersSnapshotProto(const LayersSnapshotProto& from)
700 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
701 LayersSnapshotProto* const _this = this; (void)_this;
702 new (&_impl_) Impl_{
703 decltype(_impl_._has_bits_){from._impl_._has_bits_}
704 , /*decltype(_impl_._cached_size_)*/{}
705 , decltype(_impl_.displays_){from._impl_.displays_}
706 , decltype(_impl_.where_){}
707 , decltype(_impl_.hwc_blob_){}
708 , decltype(_impl_.layers_){nullptr}
709 , decltype(_impl_.elapsed_realtime_nanos_){}
710 , decltype(_impl_.excludes_composition_state_){}
711 , decltype(_impl_.missed_entries_){}
712 , decltype(_impl_.vsync_id_){}};
713
714 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
715 _impl_.where_.InitDefault();
716 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
717 _impl_.where_.Set("", GetArenaForAllocation());
718 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
719 if (from._internal_has_where()) {
720 _this->_impl_.where_.Set(from._internal_where(),
721 _this->GetArenaForAllocation());
722 }
723 _impl_.hwc_blob_.InitDefault();
724 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
725 _impl_.hwc_blob_.Set("", GetArenaForAllocation());
726 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
727 if (from._internal_has_hwc_blob()) {
728 _this->_impl_.hwc_blob_.Set(from._internal_hwc_blob(),
729 _this->GetArenaForAllocation());
730 }
731 if (from._internal_has_layers()) {
732 _this->_impl_.layers_ = new ::perfetto::protos::LayersProto(*from._impl_.layers_);
733 }
734 ::memcpy(&_impl_.elapsed_realtime_nanos_, &from._impl_.elapsed_realtime_nanos_,
735 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.vsync_id_) -
736 reinterpret_cast<char*>(&_impl_.elapsed_realtime_nanos_)) + sizeof(_impl_.vsync_id_));
737 // @@protoc_insertion_point(copy_constructor:perfetto.protos.LayersSnapshotProto)
738 }
739
SharedCtor(::_pb::Arena * arena,bool is_message_owned)740 inline void LayersSnapshotProto::SharedCtor(
741 ::_pb::Arena* arena, bool is_message_owned) {
742 (void)arena;
743 (void)is_message_owned;
744 new (&_impl_) Impl_{
745 decltype(_impl_._has_bits_){}
746 , /*decltype(_impl_._cached_size_)*/{}
747 , decltype(_impl_.displays_){arena}
748 , decltype(_impl_.where_){}
749 , decltype(_impl_.hwc_blob_){}
750 , decltype(_impl_.layers_){nullptr}
751 , decltype(_impl_.elapsed_realtime_nanos_){::int64_t{0}}
752 , decltype(_impl_.excludes_composition_state_){false}
753 , decltype(_impl_.missed_entries_){0u}
754 , decltype(_impl_.vsync_id_){::int64_t{0}}
755 };
756 _impl_.where_.InitDefault();
757 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
758 _impl_.where_.Set("", GetArenaForAllocation());
759 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
760 _impl_.hwc_blob_.InitDefault();
761 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
762 _impl_.hwc_blob_.Set("", GetArenaForAllocation());
763 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
764 }
765
~LayersSnapshotProto()766 LayersSnapshotProto::~LayersSnapshotProto() {
767 // @@protoc_insertion_point(destructor:perfetto.protos.LayersSnapshotProto)
768 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
769 (void)arena;
770 return;
771 }
772 SharedDtor();
773 }
774
SharedDtor()775 inline void LayersSnapshotProto::SharedDtor() {
776 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
777 _impl_.displays_.~RepeatedPtrField();
778 _impl_.where_.Destroy();
779 _impl_.hwc_blob_.Destroy();
780 if (this != internal_default_instance()) delete _impl_.layers_;
781 }
782
SetCachedSize(int size) const783 void LayersSnapshotProto::SetCachedSize(int size) const {
784 _impl_._cached_size_.Set(size);
785 }
786
Clear()787 void LayersSnapshotProto::Clear() {
788 // @@protoc_insertion_point(message_clear_start:perfetto.protos.LayersSnapshotProto)
789 ::uint32_t cached_has_bits = 0;
790 // Prevent compiler warnings about cached_has_bits being unused
791 (void) cached_has_bits;
792
793 _impl_.displays_.Clear();
794 cached_has_bits = _impl_._has_bits_[0];
795 if (cached_has_bits & 0x00000007u) {
796 if (cached_has_bits & 0x00000001u) {
797 _impl_.where_.ClearNonDefaultToEmpty();
798 }
799 if (cached_has_bits & 0x00000002u) {
800 _impl_.hwc_blob_.ClearNonDefaultToEmpty();
801 }
802 if (cached_has_bits & 0x00000004u) {
803 GOOGLE_DCHECK(_impl_.layers_ != nullptr);
804 _impl_.layers_->Clear();
805 }
806 }
807 if (cached_has_bits & 0x00000078u) {
808 ::memset(&_impl_.elapsed_realtime_nanos_, 0, static_cast<size_t>(
809 reinterpret_cast<char*>(&_impl_.vsync_id_) -
810 reinterpret_cast<char*>(&_impl_.elapsed_realtime_nanos_)) + sizeof(_impl_.vsync_id_));
811 }
812 _impl_._has_bits_.Clear();
813 _internal_metadata_.Clear<std::string>();
814 }
815
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)816 const char* LayersSnapshotProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
817 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
818 _Internal::HasBits has_bits{};
819 while (!ctx->Done(&ptr)) {
820 ::uint32_t tag;
821 ptr = ::_pbi::ReadTag(ptr, &tag);
822 switch (tag >> 3) {
823 // optional sfixed64 elapsed_realtime_nanos = 1;
824 case 1:
825 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 9)) {
826 _Internal::set_has_elapsed_realtime_nanos(&has_bits);
827 _impl_.elapsed_realtime_nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::int64_t>(ptr);
828 ptr += sizeof(::int64_t);
829 } else {
830 goto handle_unusual;
831 }
832 continue;
833 // optional string where = 2;
834 case 2:
835 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
836 auto str = _internal_mutable_where();
837 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
838 CHK_(ptr);
839 } else {
840 goto handle_unusual;
841 }
842 continue;
843 // optional .perfetto.protos.LayersProto layers = 3;
844 case 3:
845 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
846 ptr = ctx->ParseMessage(_internal_mutable_layers(), ptr);
847 CHK_(ptr);
848 } else {
849 goto handle_unusual;
850 }
851 continue;
852 // optional string hwc_blob = 4;
853 case 4:
854 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
855 auto str = _internal_mutable_hwc_blob();
856 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
857 CHK_(ptr);
858 } else {
859 goto handle_unusual;
860 }
861 continue;
862 // optional bool excludes_composition_state = 5;
863 case 5:
864 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
865 _Internal::set_has_excludes_composition_state(&has_bits);
866 _impl_.excludes_composition_state_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
867 CHK_(ptr);
868 } else {
869 goto handle_unusual;
870 }
871 continue;
872 // optional uint32 missed_entries = 6;
873 case 6:
874 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
875 _Internal::set_has_missed_entries(&has_bits);
876 _impl_.missed_entries_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
877 CHK_(ptr);
878 } else {
879 goto handle_unusual;
880 }
881 continue;
882 // repeated .perfetto.protos.DisplayProto displays = 7;
883 case 7:
884 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
885 ptr -= 1;
886 do {
887 ptr += 1;
888 ptr = ctx->ParseMessage(_internal_add_displays(), ptr);
889 CHK_(ptr);
890 if (!ctx->DataAvailable(ptr)) break;
891 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr));
892 } else {
893 goto handle_unusual;
894 }
895 continue;
896 // optional int64 vsync_id = 8;
897 case 8:
898 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
899 _Internal::set_has_vsync_id(&has_bits);
900 _impl_.vsync_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
901 CHK_(ptr);
902 } else {
903 goto handle_unusual;
904 }
905 continue;
906 default:
907 goto handle_unusual;
908 } // switch
909 handle_unusual:
910 if ((tag == 0) || ((tag & 7) == 4)) {
911 CHK_(ptr);
912 ctx->SetLastTag(tag);
913 goto message_done;
914 }
915 ptr = UnknownFieldParse(
916 tag,
917 _internal_metadata_.mutable_unknown_fields<std::string>(),
918 ptr, ctx);
919 CHK_(ptr != nullptr);
920 } // while
921 message_done:
922 _impl_._has_bits_.Or(has_bits);
923 return ptr;
924 failure:
925 ptr = nullptr;
926 goto message_done;
927 #undef CHK_
928 }
929
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const930 ::uint8_t* LayersSnapshotProto::_InternalSerialize(
931 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
932 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.LayersSnapshotProto)
933 ::uint32_t cached_has_bits = 0;
934 (void) cached_has_bits;
935
936 cached_has_bits = _impl_._has_bits_[0];
937 // optional sfixed64 elapsed_realtime_nanos = 1;
938 if (cached_has_bits & 0x00000008u) {
939 target = stream->EnsureSpace(target);
940 target = ::_pbi::WireFormatLite::WriteSFixed64ToArray(1, this->_internal_elapsed_realtime_nanos(), target);
941 }
942
943 // optional string where = 2;
944 if (cached_has_bits & 0x00000001u) {
945 target = stream->WriteStringMaybeAliased(
946 2, this->_internal_where(), target);
947 }
948
949 // optional .perfetto.protos.LayersProto layers = 3;
950 if (cached_has_bits & 0x00000004u) {
951 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
952 InternalWriteMessage(3, _Internal::layers(this),
953 _Internal::layers(this).GetCachedSize(), target, stream);
954 }
955
956 // optional string hwc_blob = 4;
957 if (cached_has_bits & 0x00000002u) {
958 target = stream->WriteStringMaybeAliased(
959 4, this->_internal_hwc_blob(), target);
960 }
961
962 // optional bool excludes_composition_state = 5;
963 if (cached_has_bits & 0x00000010u) {
964 target = stream->EnsureSpace(target);
965 target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_excludes_composition_state(), target);
966 }
967
968 // optional uint32 missed_entries = 6;
969 if (cached_has_bits & 0x00000020u) {
970 target = stream->EnsureSpace(target);
971 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_missed_entries(), target);
972 }
973
974 // repeated .perfetto.protos.DisplayProto displays = 7;
975 for (unsigned i = 0,
976 n = static_cast<unsigned>(this->_internal_displays_size()); i < n; i++) {
977 const auto& repfield = this->_internal_displays(i);
978 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
979 InternalWriteMessage(7, repfield, repfield.GetCachedSize(), target, stream);
980 }
981
982 // optional int64 vsync_id = 8;
983 if (cached_has_bits & 0x00000040u) {
984 target = stream->EnsureSpace(target);
985 target = ::_pbi::WireFormatLite::WriteInt64ToArray(8, this->_internal_vsync_id(), target);
986 }
987
988 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
989 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
990 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
991 }
992 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.LayersSnapshotProto)
993 return target;
994 }
995
ByteSizeLong() const996 size_t LayersSnapshotProto::ByteSizeLong() const {
997 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.LayersSnapshotProto)
998 size_t total_size = 0;
999
1000 ::uint32_t cached_has_bits = 0;
1001 // Prevent compiler warnings about cached_has_bits being unused
1002 (void) cached_has_bits;
1003
1004 // repeated .perfetto.protos.DisplayProto displays = 7;
1005 total_size += 1UL * this->_internal_displays_size();
1006 for (const auto& msg : this->_impl_.displays_) {
1007 total_size +=
1008 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1009 }
1010
1011 cached_has_bits = _impl_._has_bits_[0];
1012 if (cached_has_bits & 0x0000007fu) {
1013 // optional string where = 2;
1014 if (cached_has_bits & 0x00000001u) {
1015 total_size += 1 +
1016 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1017 this->_internal_where());
1018 }
1019
1020 // optional string hwc_blob = 4;
1021 if (cached_has_bits & 0x00000002u) {
1022 total_size += 1 +
1023 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1024 this->_internal_hwc_blob());
1025 }
1026
1027 // optional .perfetto.protos.LayersProto layers = 3;
1028 if (cached_has_bits & 0x00000004u) {
1029 total_size += 1 +
1030 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1031 *_impl_.layers_);
1032 }
1033
1034 // optional sfixed64 elapsed_realtime_nanos = 1;
1035 if (cached_has_bits & 0x00000008u) {
1036 total_size += 1 + 8;
1037 }
1038
1039 // optional bool excludes_composition_state = 5;
1040 if (cached_has_bits & 0x00000010u) {
1041 total_size += 1 + 1;
1042 }
1043
1044 // optional uint32 missed_entries = 6;
1045 if (cached_has_bits & 0x00000020u) {
1046 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_missed_entries());
1047 }
1048
1049 // optional int64 vsync_id = 8;
1050 if (cached_has_bits & 0x00000040u) {
1051 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_vsync_id());
1052 }
1053
1054 }
1055 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1056 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1057 }
1058 int cached_size = ::_pbi::ToCachedSize(total_size);
1059 SetCachedSize(cached_size);
1060 return total_size;
1061 }
1062
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1063 void LayersSnapshotProto::CheckTypeAndMergeFrom(
1064 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1065 MergeFrom(*::_pbi::DownCast<const LayersSnapshotProto*>(
1066 &from));
1067 }
1068
MergeFrom(const LayersSnapshotProto & from)1069 void LayersSnapshotProto::MergeFrom(const LayersSnapshotProto& from) {
1070 LayersSnapshotProto* const _this = this;
1071 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.LayersSnapshotProto)
1072 GOOGLE_DCHECK_NE(&from, _this);
1073 ::uint32_t cached_has_bits = 0;
1074 (void) cached_has_bits;
1075
1076 _this->_impl_.displays_.MergeFrom(from._impl_.displays_);
1077 cached_has_bits = from._impl_._has_bits_[0];
1078 if (cached_has_bits & 0x0000007fu) {
1079 if (cached_has_bits & 0x00000001u) {
1080 _this->_internal_set_where(from._internal_where());
1081 }
1082 if (cached_has_bits & 0x00000002u) {
1083 _this->_internal_set_hwc_blob(from._internal_hwc_blob());
1084 }
1085 if (cached_has_bits & 0x00000004u) {
1086 _this->_internal_mutable_layers()->::perfetto::protos::LayersProto::MergeFrom(
1087 from._internal_layers());
1088 }
1089 if (cached_has_bits & 0x00000008u) {
1090 _this->_impl_.elapsed_realtime_nanos_ = from._impl_.elapsed_realtime_nanos_;
1091 }
1092 if (cached_has_bits & 0x00000010u) {
1093 _this->_impl_.excludes_composition_state_ = from._impl_.excludes_composition_state_;
1094 }
1095 if (cached_has_bits & 0x00000020u) {
1096 _this->_impl_.missed_entries_ = from._impl_.missed_entries_;
1097 }
1098 if (cached_has_bits & 0x00000040u) {
1099 _this->_impl_.vsync_id_ = from._impl_.vsync_id_;
1100 }
1101 _this->_impl_._has_bits_[0] |= cached_has_bits;
1102 }
1103 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1104 }
1105
CopyFrom(const LayersSnapshotProto & from)1106 void LayersSnapshotProto::CopyFrom(const LayersSnapshotProto& from) {
1107 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.LayersSnapshotProto)
1108 if (&from == this) return;
1109 Clear();
1110 MergeFrom(from);
1111 }
1112
IsInitialized() const1113 bool LayersSnapshotProto::IsInitialized() const {
1114 return true;
1115 }
1116
InternalSwap(LayersSnapshotProto * other)1117 void LayersSnapshotProto::InternalSwap(LayersSnapshotProto* other) {
1118 using std::swap;
1119 auto* lhs_arena = GetArenaForAllocation();
1120 auto* rhs_arena = other->GetArenaForAllocation();
1121 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1122 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1123 _impl_.displays_.InternalSwap(&other->_impl_.displays_);
1124 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1125 &_impl_.where_, lhs_arena,
1126 &other->_impl_.where_, rhs_arena
1127 );
1128 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1129 &_impl_.hwc_blob_, lhs_arena,
1130 &other->_impl_.hwc_blob_, rhs_arena
1131 );
1132 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1133 PROTOBUF_FIELD_OFFSET(LayersSnapshotProto, _impl_.vsync_id_)
1134 + sizeof(LayersSnapshotProto::_impl_.vsync_id_) // NOLINT
1135 - PROTOBUF_FIELD_OFFSET(LayersSnapshotProto, _impl_.layers_)>(
1136 reinterpret_cast<char*>(&_impl_.layers_),
1137 reinterpret_cast<char*>(&other->_impl_.layers_));
1138 }
1139
GetTypeName() const1140 std::string LayersSnapshotProto::GetTypeName() const {
1141 return "perfetto.protos.LayersSnapshotProto";
1142 }
1143
1144
1145 // ===================================================================
1146
1147 class LayersProto::_Internal {
1148 public:
1149 };
1150
LayersProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1151 LayersProto::LayersProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1152 bool is_message_owned)
1153 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1154 SharedCtor(arena, is_message_owned);
1155 // @@protoc_insertion_point(arena_constructor:perfetto.protos.LayersProto)
1156 }
LayersProto(const LayersProto & from)1157 LayersProto::LayersProto(const LayersProto& from)
1158 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1159 LayersProto* const _this = this; (void)_this;
1160 new (&_impl_) Impl_{
1161 decltype(_impl_.layers_){from._impl_.layers_}
1162 , /*decltype(_impl_._cached_size_)*/{}};
1163
1164 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1165 // @@protoc_insertion_point(copy_constructor:perfetto.protos.LayersProto)
1166 }
1167
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1168 inline void LayersProto::SharedCtor(
1169 ::_pb::Arena* arena, bool is_message_owned) {
1170 (void)arena;
1171 (void)is_message_owned;
1172 new (&_impl_) Impl_{
1173 decltype(_impl_.layers_){arena}
1174 , /*decltype(_impl_._cached_size_)*/{}
1175 };
1176 }
1177
~LayersProto()1178 LayersProto::~LayersProto() {
1179 // @@protoc_insertion_point(destructor:perfetto.protos.LayersProto)
1180 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1181 (void)arena;
1182 return;
1183 }
1184 SharedDtor();
1185 }
1186
SharedDtor()1187 inline void LayersProto::SharedDtor() {
1188 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1189 _impl_.layers_.~RepeatedPtrField();
1190 }
1191
SetCachedSize(int size) const1192 void LayersProto::SetCachedSize(int size) const {
1193 _impl_._cached_size_.Set(size);
1194 }
1195
Clear()1196 void LayersProto::Clear() {
1197 // @@protoc_insertion_point(message_clear_start:perfetto.protos.LayersProto)
1198 ::uint32_t cached_has_bits = 0;
1199 // Prevent compiler warnings about cached_has_bits being unused
1200 (void) cached_has_bits;
1201
1202 _impl_.layers_.Clear();
1203 _internal_metadata_.Clear<std::string>();
1204 }
1205
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1206 const char* LayersProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1207 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1208 while (!ctx->Done(&ptr)) {
1209 ::uint32_t tag;
1210 ptr = ::_pbi::ReadTag(ptr, &tag);
1211 switch (tag >> 3) {
1212 // repeated .perfetto.protos.LayerProto layers = 1;
1213 case 1:
1214 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1215 ptr -= 1;
1216 do {
1217 ptr += 1;
1218 ptr = ctx->ParseMessage(_internal_add_layers(), ptr);
1219 CHK_(ptr);
1220 if (!ctx->DataAvailable(ptr)) break;
1221 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
1222 } else {
1223 goto handle_unusual;
1224 }
1225 continue;
1226 default:
1227 goto handle_unusual;
1228 } // switch
1229 handle_unusual:
1230 if ((tag == 0) || ((tag & 7) == 4)) {
1231 CHK_(ptr);
1232 ctx->SetLastTag(tag);
1233 goto message_done;
1234 }
1235 ptr = UnknownFieldParse(
1236 tag,
1237 _internal_metadata_.mutable_unknown_fields<std::string>(),
1238 ptr, ctx);
1239 CHK_(ptr != nullptr);
1240 } // while
1241 message_done:
1242 return ptr;
1243 failure:
1244 ptr = nullptr;
1245 goto message_done;
1246 #undef CHK_
1247 }
1248
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1249 ::uint8_t* LayersProto::_InternalSerialize(
1250 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1251 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.LayersProto)
1252 ::uint32_t cached_has_bits = 0;
1253 (void) cached_has_bits;
1254
1255 // repeated .perfetto.protos.LayerProto layers = 1;
1256 for (unsigned i = 0,
1257 n = static_cast<unsigned>(this->_internal_layers_size()); i < n; i++) {
1258 const auto& repfield = this->_internal_layers(i);
1259 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1260 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
1261 }
1262
1263 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1264 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1265 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1266 }
1267 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.LayersProto)
1268 return target;
1269 }
1270
ByteSizeLong() const1271 size_t LayersProto::ByteSizeLong() const {
1272 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.LayersProto)
1273 size_t total_size = 0;
1274
1275 ::uint32_t cached_has_bits = 0;
1276 // Prevent compiler warnings about cached_has_bits being unused
1277 (void) cached_has_bits;
1278
1279 // repeated .perfetto.protos.LayerProto layers = 1;
1280 total_size += 1UL * this->_internal_layers_size();
1281 for (const auto& msg : this->_impl_.layers_) {
1282 total_size +=
1283 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1284 }
1285
1286 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1287 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1288 }
1289 int cached_size = ::_pbi::ToCachedSize(total_size);
1290 SetCachedSize(cached_size);
1291 return total_size;
1292 }
1293
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1294 void LayersProto::CheckTypeAndMergeFrom(
1295 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1296 MergeFrom(*::_pbi::DownCast<const LayersProto*>(
1297 &from));
1298 }
1299
MergeFrom(const LayersProto & from)1300 void LayersProto::MergeFrom(const LayersProto& from) {
1301 LayersProto* const _this = this;
1302 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.LayersProto)
1303 GOOGLE_DCHECK_NE(&from, _this);
1304 ::uint32_t cached_has_bits = 0;
1305 (void) cached_has_bits;
1306
1307 _this->_impl_.layers_.MergeFrom(from._impl_.layers_);
1308 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1309 }
1310
CopyFrom(const LayersProto & from)1311 void LayersProto::CopyFrom(const LayersProto& from) {
1312 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.LayersProto)
1313 if (&from == this) return;
1314 Clear();
1315 MergeFrom(from);
1316 }
1317
IsInitialized() const1318 bool LayersProto::IsInitialized() const {
1319 return true;
1320 }
1321
InternalSwap(LayersProto * other)1322 void LayersProto::InternalSwap(LayersProto* other) {
1323 using std::swap;
1324 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1325 _impl_.layers_.InternalSwap(&other->_impl_.layers_);
1326 }
1327
GetTypeName() const1328 std::string LayersProto::GetTypeName() const {
1329 return "perfetto.protos.LayersProto";
1330 }
1331
1332
1333 // ===================================================================
1334
1335 class DisplayProto::_Internal {
1336 public:
1337 using HasBits = decltype(std::declval<DisplayProto>()._impl_._has_bits_);
set_has_id(HasBits * has_bits)1338 static void set_has_id(HasBits* has_bits) {
1339 (*has_bits)[0] |= 16u;
1340 }
set_has_name(HasBits * has_bits)1341 static void set_has_name(HasBits* has_bits) {
1342 (*has_bits)[0] |= 1u;
1343 }
set_has_layer_stack(HasBits * has_bits)1344 static void set_has_layer_stack(HasBits* has_bits) {
1345 (*has_bits)[0] |= 32u;
1346 }
1347 static const ::perfetto::protos::SizeProto& size(const DisplayProto* msg);
set_has_size(HasBits * has_bits)1348 static void set_has_size(HasBits* has_bits) {
1349 (*has_bits)[0] |= 2u;
1350 }
1351 static const ::perfetto::protos::RectProto& layer_stack_space_rect(const DisplayProto* msg);
set_has_layer_stack_space_rect(HasBits * has_bits)1352 static void set_has_layer_stack_space_rect(HasBits* has_bits) {
1353 (*has_bits)[0] |= 4u;
1354 }
1355 static const ::perfetto::protos::TransformProto& transform(const DisplayProto* msg);
set_has_transform(HasBits * has_bits)1356 static void set_has_transform(HasBits* has_bits) {
1357 (*has_bits)[0] |= 8u;
1358 }
set_has_is_virtual(HasBits * has_bits)1359 static void set_has_is_virtual(HasBits* has_bits) {
1360 (*has_bits)[0] |= 64u;
1361 }
set_has_dpi_x(HasBits * has_bits)1362 static void set_has_dpi_x(HasBits* has_bits) {
1363 (*has_bits)[0] |= 128u;
1364 }
set_has_dpi_y(HasBits * has_bits)1365 static void set_has_dpi_y(HasBits* has_bits) {
1366 (*has_bits)[0] |= 256u;
1367 }
1368 };
1369
1370 const ::perfetto::protos::SizeProto&
size(const DisplayProto * msg)1371 DisplayProto::_Internal::size(const DisplayProto* msg) {
1372 return *msg->_impl_.size_;
1373 }
1374 const ::perfetto::protos::RectProto&
layer_stack_space_rect(const DisplayProto * msg)1375 DisplayProto::_Internal::layer_stack_space_rect(const DisplayProto* msg) {
1376 return *msg->_impl_.layer_stack_space_rect_;
1377 }
1378 const ::perfetto::protos::TransformProto&
transform(const DisplayProto * msg)1379 DisplayProto::_Internal::transform(const DisplayProto* msg) {
1380 return *msg->_impl_.transform_;
1381 }
clear_size()1382 void DisplayProto::clear_size() {
1383 if (_impl_.size_ != nullptr) _impl_.size_->Clear();
1384 _impl_._has_bits_[0] &= ~0x00000002u;
1385 }
clear_layer_stack_space_rect()1386 void DisplayProto::clear_layer_stack_space_rect() {
1387 if (_impl_.layer_stack_space_rect_ != nullptr) _impl_.layer_stack_space_rect_->Clear();
1388 _impl_._has_bits_[0] &= ~0x00000004u;
1389 }
clear_transform()1390 void DisplayProto::clear_transform() {
1391 if (_impl_.transform_ != nullptr) _impl_.transform_->Clear();
1392 _impl_._has_bits_[0] &= ~0x00000008u;
1393 }
DisplayProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1394 DisplayProto::DisplayProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1395 bool is_message_owned)
1396 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1397 SharedCtor(arena, is_message_owned);
1398 // @@protoc_insertion_point(arena_constructor:perfetto.protos.DisplayProto)
1399 }
DisplayProto(const DisplayProto & from)1400 DisplayProto::DisplayProto(const DisplayProto& from)
1401 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1402 DisplayProto* const _this = this; (void)_this;
1403 new (&_impl_) Impl_{
1404 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1405 , /*decltype(_impl_._cached_size_)*/{}
1406 , decltype(_impl_.name_){}
1407 , decltype(_impl_.size_){nullptr}
1408 , decltype(_impl_.layer_stack_space_rect_){nullptr}
1409 , decltype(_impl_.transform_){nullptr}
1410 , decltype(_impl_.id_){}
1411 , decltype(_impl_.layer_stack_){}
1412 , decltype(_impl_.is_virtual_){}
1413 , decltype(_impl_.dpi_x_){}
1414 , decltype(_impl_.dpi_y_){}};
1415
1416 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1417 _impl_.name_.InitDefault();
1418 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1419 _impl_.name_.Set("", GetArenaForAllocation());
1420 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1421 if (from._internal_has_name()) {
1422 _this->_impl_.name_.Set(from._internal_name(),
1423 _this->GetArenaForAllocation());
1424 }
1425 if (from._internal_has_size()) {
1426 _this->_impl_.size_ = new ::perfetto::protos::SizeProto(*from._impl_.size_);
1427 }
1428 if (from._internal_has_layer_stack_space_rect()) {
1429 _this->_impl_.layer_stack_space_rect_ = new ::perfetto::protos::RectProto(*from._impl_.layer_stack_space_rect_);
1430 }
1431 if (from._internal_has_transform()) {
1432 _this->_impl_.transform_ = new ::perfetto::protos::TransformProto(*from._impl_.transform_);
1433 }
1434 ::memcpy(&_impl_.id_, &from._impl_.id_,
1435 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.dpi_y_) -
1436 reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.dpi_y_));
1437 // @@protoc_insertion_point(copy_constructor:perfetto.protos.DisplayProto)
1438 }
1439
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1440 inline void DisplayProto::SharedCtor(
1441 ::_pb::Arena* arena, bool is_message_owned) {
1442 (void)arena;
1443 (void)is_message_owned;
1444 new (&_impl_) Impl_{
1445 decltype(_impl_._has_bits_){}
1446 , /*decltype(_impl_._cached_size_)*/{}
1447 , decltype(_impl_.name_){}
1448 , decltype(_impl_.size_){nullptr}
1449 , decltype(_impl_.layer_stack_space_rect_){nullptr}
1450 , decltype(_impl_.transform_){nullptr}
1451 , decltype(_impl_.id_){::uint64_t{0u}}
1452 , decltype(_impl_.layer_stack_){0u}
1453 , decltype(_impl_.is_virtual_){false}
1454 , decltype(_impl_.dpi_x_){0}
1455 , decltype(_impl_.dpi_y_){0}
1456 };
1457 _impl_.name_.InitDefault();
1458 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1459 _impl_.name_.Set("", GetArenaForAllocation());
1460 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1461 }
1462
~DisplayProto()1463 DisplayProto::~DisplayProto() {
1464 // @@protoc_insertion_point(destructor:perfetto.protos.DisplayProto)
1465 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1466 (void)arena;
1467 return;
1468 }
1469 SharedDtor();
1470 }
1471
SharedDtor()1472 inline void DisplayProto::SharedDtor() {
1473 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1474 _impl_.name_.Destroy();
1475 if (this != internal_default_instance()) delete _impl_.size_;
1476 if (this != internal_default_instance()) delete _impl_.layer_stack_space_rect_;
1477 if (this != internal_default_instance()) delete _impl_.transform_;
1478 }
1479
SetCachedSize(int size) const1480 void DisplayProto::SetCachedSize(int size) const {
1481 _impl_._cached_size_.Set(size);
1482 }
1483
Clear()1484 void DisplayProto::Clear() {
1485 // @@protoc_insertion_point(message_clear_start:perfetto.protos.DisplayProto)
1486 ::uint32_t cached_has_bits = 0;
1487 // Prevent compiler warnings about cached_has_bits being unused
1488 (void) cached_has_bits;
1489
1490 cached_has_bits = _impl_._has_bits_[0];
1491 if (cached_has_bits & 0x0000000fu) {
1492 if (cached_has_bits & 0x00000001u) {
1493 _impl_.name_.ClearNonDefaultToEmpty();
1494 }
1495 if (cached_has_bits & 0x00000002u) {
1496 GOOGLE_DCHECK(_impl_.size_ != nullptr);
1497 _impl_.size_->Clear();
1498 }
1499 if (cached_has_bits & 0x00000004u) {
1500 GOOGLE_DCHECK(_impl_.layer_stack_space_rect_ != nullptr);
1501 _impl_.layer_stack_space_rect_->Clear();
1502 }
1503 if (cached_has_bits & 0x00000008u) {
1504 GOOGLE_DCHECK(_impl_.transform_ != nullptr);
1505 _impl_.transform_->Clear();
1506 }
1507 }
1508 if (cached_has_bits & 0x000000f0u) {
1509 ::memset(&_impl_.id_, 0, static_cast<size_t>(
1510 reinterpret_cast<char*>(&_impl_.dpi_x_) -
1511 reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.dpi_x_));
1512 }
1513 _impl_.dpi_y_ = 0;
1514 _impl_._has_bits_.Clear();
1515 _internal_metadata_.Clear<std::string>();
1516 }
1517
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1518 const char* DisplayProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1519 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1520 _Internal::HasBits has_bits{};
1521 while (!ctx->Done(&ptr)) {
1522 ::uint32_t tag;
1523 ptr = ::_pbi::ReadTag(ptr, &tag);
1524 switch (tag >> 3) {
1525 // optional uint64 id = 1;
1526 case 1:
1527 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1528 _Internal::set_has_id(&has_bits);
1529 _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1530 CHK_(ptr);
1531 } else {
1532 goto handle_unusual;
1533 }
1534 continue;
1535 // optional string name = 2;
1536 case 2:
1537 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1538 auto str = _internal_mutable_name();
1539 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1540 CHK_(ptr);
1541 } else {
1542 goto handle_unusual;
1543 }
1544 continue;
1545 // optional uint32 layer_stack = 3;
1546 case 3:
1547 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1548 _Internal::set_has_layer_stack(&has_bits);
1549 _impl_.layer_stack_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1550 CHK_(ptr);
1551 } else {
1552 goto handle_unusual;
1553 }
1554 continue;
1555 // optional .perfetto.protos.SizeProto size = 4;
1556 case 4:
1557 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
1558 ptr = ctx->ParseMessage(_internal_mutable_size(), ptr);
1559 CHK_(ptr);
1560 } else {
1561 goto handle_unusual;
1562 }
1563 continue;
1564 // optional .perfetto.protos.RectProto layer_stack_space_rect = 5;
1565 case 5:
1566 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
1567 ptr = ctx->ParseMessage(_internal_mutable_layer_stack_space_rect(), ptr);
1568 CHK_(ptr);
1569 } else {
1570 goto handle_unusual;
1571 }
1572 continue;
1573 // optional .perfetto.protos.TransformProto transform = 6;
1574 case 6:
1575 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
1576 ptr = ctx->ParseMessage(_internal_mutable_transform(), ptr);
1577 CHK_(ptr);
1578 } else {
1579 goto handle_unusual;
1580 }
1581 continue;
1582 // optional bool is_virtual = 7;
1583 case 7:
1584 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
1585 _Internal::set_has_is_virtual(&has_bits);
1586 _impl_.is_virtual_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1587 CHK_(ptr);
1588 } else {
1589 goto handle_unusual;
1590 }
1591 continue;
1592 // optional double dpi_x = 8;
1593 case 8:
1594 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 65)) {
1595 _Internal::set_has_dpi_x(&has_bits);
1596 _impl_.dpi_x_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
1597 ptr += sizeof(double);
1598 } else {
1599 goto handle_unusual;
1600 }
1601 continue;
1602 // optional double dpi_y = 9;
1603 case 9:
1604 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 73)) {
1605 _Internal::set_has_dpi_y(&has_bits);
1606 _impl_.dpi_y_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
1607 ptr += sizeof(double);
1608 } else {
1609 goto handle_unusual;
1610 }
1611 continue;
1612 default:
1613 goto handle_unusual;
1614 } // switch
1615 handle_unusual:
1616 if ((tag == 0) || ((tag & 7) == 4)) {
1617 CHK_(ptr);
1618 ctx->SetLastTag(tag);
1619 goto message_done;
1620 }
1621 ptr = UnknownFieldParse(
1622 tag,
1623 _internal_metadata_.mutable_unknown_fields<std::string>(),
1624 ptr, ctx);
1625 CHK_(ptr != nullptr);
1626 } // while
1627 message_done:
1628 _impl_._has_bits_.Or(has_bits);
1629 return ptr;
1630 failure:
1631 ptr = nullptr;
1632 goto message_done;
1633 #undef CHK_
1634 }
1635
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1636 ::uint8_t* DisplayProto::_InternalSerialize(
1637 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1638 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.DisplayProto)
1639 ::uint32_t cached_has_bits = 0;
1640 (void) cached_has_bits;
1641
1642 cached_has_bits = _impl_._has_bits_[0];
1643 // optional uint64 id = 1;
1644 if (cached_has_bits & 0x00000010u) {
1645 target = stream->EnsureSpace(target);
1646 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_id(), target);
1647 }
1648
1649 // optional string name = 2;
1650 if (cached_has_bits & 0x00000001u) {
1651 target = stream->WriteStringMaybeAliased(
1652 2, this->_internal_name(), target);
1653 }
1654
1655 // optional uint32 layer_stack = 3;
1656 if (cached_has_bits & 0x00000020u) {
1657 target = stream->EnsureSpace(target);
1658 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_layer_stack(), target);
1659 }
1660
1661 // optional .perfetto.protos.SizeProto size = 4;
1662 if (cached_has_bits & 0x00000002u) {
1663 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1664 InternalWriteMessage(4, _Internal::size(this),
1665 _Internal::size(this).GetCachedSize(), target, stream);
1666 }
1667
1668 // optional .perfetto.protos.RectProto layer_stack_space_rect = 5;
1669 if (cached_has_bits & 0x00000004u) {
1670 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1671 InternalWriteMessage(5, _Internal::layer_stack_space_rect(this),
1672 _Internal::layer_stack_space_rect(this).GetCachedSize(), target, stream);
1673 }
1674
1675 // optional .perfetto.protos.TransformProto transform = 6;
1676 if (cached_has_bits & 0x00000008u) {
1677 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1678 InternalWriteMessage(6, _Internal::transform(this),
1679 _Internal::transform(this).GetCachedSize(), target, stream);
1680 }
1681
1682 // optional bool is_virtual = 7;
1683 if (cached_has_bits & 0x00000040u) {
1684 target = stream->EnsureSpace(target);
1685 target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_is_virtual(), target);
1686 }
1687
1688 // optional double dpi_x = 8;
1689 if (cached_has_bits & 0x00000080u) {
1690 target = stream->EnsureSpace(target);
1691 target = ::_pbi::WireFormatLite::WriteDoubleToArray(8, this->_internal_dpi_x(), target);
1692 }
1693
1694 // optional double dpi_y = 9;
1695 if (cached_has_bits & 0x00000100u) {
1696 target = stream->EnsureSpace(target);
1697 target = ::_pbi::WireFormatLite::WriteDoubleToArray(9, this->_internal_dpi_y(), target);
1698 }
1699
1700 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1701 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1702 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1703 }
1704 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.DisplayProto)
1705 return target;
1706 }
1707
ByteSizeLong() const1708 size_t DisplayProto::ByteSizeLong() const {
1709 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.DisplayProto)
1710 size_t total_size = 0;
1711
1712 ::uint32_t cached_has_bits = 0;
1713 // Prevent compiler warnings about cached_has_bits being unused
1714 (void) cached_has_bits;
1715
1716 cached_has_bits = _impl_._has_bits_[0];
1717 if (cached_has_bits & 0x000000ffu) {
1718 // optional string name = 2;
1719 if (cached_has_bits & 0x00000001u) {
1720 total_size += 1 +
1721 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1722 this->_internal_name());
1723 }
1724
1725 // optional .perfetto.protos.SizeProto size = 4;
1726 if (cached_has_bits & 0x00000002u) {
1727 total_size += 1 +
1728 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1729 *_impl_.size_);
1730 }
1731
1732 // optional .perfetto.protos.RectProto layer_stack_space_rect = 5;
1733 if (cached_has_bits & 0x00000004u) {
1734 total_size += 1 +
1735 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1736 *_impl_.layer_stack_space_rect_);
1737 }
1738
1739 // optional .perfetto.protos.TransformProto transform = 6;
1740 if (cached_has_bits & 0x00000008u) {
1741 total_size += 1 +
1742 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1743 *_impl_.transform_);
1744 }
1745
1746 // optional uint64 id = 1;
1747 if (cached_has_bits & 0x00000010u) {
1748 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_id());
1749 }
1750
1751 // optional uint32 layer_stack = 3;
1752 if (cached_has_bits & 0x00000020u) {
1753 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_layer_stack());
1754 }
1755
1756 // optional bool is_virtual = 7;
1757 if (cached_has_bits & 0x00000040u) {
1758 total_size += 1 + 1;
1759 }
1760
1761 // optional double dpi_x = 8;
1762 if (cached_has_bits & 0x00000080u) {
1763 total_size += 1 + 8;
1764 }
1765
1766 }
1767 // optional double dpi_y = 9;
1768 if (cached_has_bits & 0x00000100u) {
1769 total_size += 1 + 8;
1770 }
1771
1772 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1773 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1774 }
1775 int cached_size = ::_pbi::ToCachedSize(total_size);
1776 SetCachedSize(cached_size);
1777 return total_size;
1778 }
1779
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1780 void DisplayProto::CheckTypeAndMergeFrom(
1781 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1782 MergeFrom(*::_pbi::DownCast<const DisplayProto*>(
1783 &from));
1784 }
1785
MergeFrom(const DisplayProto & from)1786 void DisplayProto::MergeFrom(const DisplayProto& from) {
1787 DisplayProto* const _this = this;
1788 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.DisplayProto)
1789 GOOGLE_DCHECK_NE(&from, _this);
1790 ::uint32_t cached_has_bits = 0;
1791 (void) cached_has_bits;
1792
1793 cached_has_bits = from._impl_._has_bits_[0];
1794 if (cached_has_bits & 0x000000ffu) {
1795 if (cached_has_bits & 0x00000001u) {
1796 _this->_internal_set_name(from._internal_name());
1797 }
1798 if (cached_has_bits & 0x00000002u) {
1799 _this->_internal_mutable_size()->::perfetto::protos::SizeProto::MergeFrom(
1800 from._internal_size());
1801 }
1802 if (cached_has_bits & 0x00000004u) {
1803 _this->_internal_mutable_layer_stack_space_rect()->::perfetto::protos::RectProto::MergeFrom(
1804 from._internal_layer_stack_space_rect());
1805 }
1806 if (cached_has_bits & 0x00000008u) {
1807 _this->_internal_mutable_transform()->::perfetto::protos::TransformProto::MergeFrom(
1808 from._internal_transform());
1809 }
1810 if (cached_has_bits & 0x00000010u) {
1811 _this->_impl_.id_ = from._impl_.id_;
1812 }
1813 if (cached_has_bits & 0x00000020u) {
1814 _this->_impl_.layer_stack_ = from._impl_.layer_stack_;
1815 }
1816 if (cached_has_bits & 0x00000040u) {
1817 _this->_impl_.is_virtual_ = from._impl_.is_virtual_;
1818 }
1819 if (cached_has_bits & 0x00000080u) {
1820 _this->_impl_.dpi_x_ = from._impl_.dpi_x_;
1821 }
1822 _this->_impl_._has_bits_[0] |= cached_has_bits;
1823 }
1824 if (cached_has_bits & 0x00000100u) {
1825 _this->_internal_set_dpi_y(from._internal_dpi_y());
1826 }
1827 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1828 }
1829
CopyFrom(const DisplayProto & from)1830 void DisplayProto::CopyFrom(const DisplayProto& from) {
1831 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.DisplayProto)
1832 if (&from == this) return;
1833 Clear();
1834 MergeFrom(from);
1835 }
1836
IsInitialized() const1837 bool DisplayProto::IsInitialized() const {
1838 return true;
1839 }
1840
InternalSwap(DisplayProto * other)1841 void DisplayProto::InternalSwap(DisplayProto* other) {
1842 using std::swap;
1843 auto* lhs_arena = GetArenaForAllocation();
1844 auto* rhs_arena = other->GetArenaForAllocation();
1845 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1846 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1847 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1848 &_impl_.name_, lhs_arena,
1849 &other->_impl_.name_, rhs_arena
1850 );
1851 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1852 PROTOBUF_FIELD_OFFSET(DisplayProto, _impl_.dpi_y_)
1853 + sizeof(DisplayProto::_impl_.dpi_y_) // NOLINT
1854 - PROTOBUF_FIELD_OFFSET(DisplayProto, _impl_.size_)>(
1855 reinterpret_cast<char*>(&_impl_.size_),
1856 reinterpret_cast<char*>(&other->_impl_.size_));
1857 }
1858
GetTypeName() const1859 std::string DisplayProto::GetTypeName() const {
1860 return "perfetto.protos.DisplayProto";
1861 }
1862
1863
1864 // ===================================================================
1865
LayerProto_MetadataEntry_DoNotUse()1866 LayerProto_MetadataEntry_DoNotUse::LayerProto_MetadataEntry_DoNotUse() {}
LayerProto_MetadataEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena * arena)1867 LayerProto_MetadataEntry_DoNotUse::LayerProto_MetadataEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
1868 : SuperType(arena) {}
MergeFrom(const LayerProto_MetadataEntry_DoNotUse & other)1869 void LayerProto_MetadataEntry_DoNotUse::MergeFrom(const LayerProto_MetadataEntry_DoNotUse& other) {
1870 MergeFromInternal(other);
1871 }
1872
1873 // ===================================================================
1874
1875 class LayerProto::_Internal {
1876 public:
1877 using HasBits = decltype(std::declval<LayerProto>()._impl_._has_bits_);
set_has_id(HasBits * has_bits)1878 static void set_has_id(HasBits* has_bits) {
1879 (*has_bits)[0] |= 268435456u;
1880 }
set_has_name(HasBits * has_bits)1881 static void set_has_name(HasBits* has_bits) {
1882 (*has_bits)[0] |= 1u;
1883 }
set_has_type(HasBits * has_bits)1884 static void set_has_type(HasBits* has_bits) {
1885 (*has_bits)[0] |= 2u;
1886 }
1887 static const ::perfetto::protos::RegionProto& transparent_region(const LayerProto* msg);
set_has_transparent_region(HasBits * has_bits)1888 static void set_has_transparent_region(HasBits* has_bits) {
1889 (*has_bits)[0] |= 16u;
1890 }
1891 static const ::perfetto::protos::RegionProto& visible_region(const LayerProto* msg);
set_has_visible_region(HasBits * has_bits)1892 static void set_has_visible_region(HasBits* has_bits) {
1893 (*has_bits)[0] |= 32u;
1894 }
1895 static const ::perfetto::protos::RegionProto& damage_region(const LayerProto* msg);
set_has_damage_region(HasBits * has_bits)1896 static void set_has_damage_region(HasBits* has_bits) {
1897 (*has_bits)[0] |= 64u;
1898 }
set_has_layer_stack(HasBits * has_bits)1899 static void set_has_layer_stack(HasBits* has_bits) {
1900 (*has_bits)[0] |= 536870912u;
1901 }
set_has_z(HasBits * has_bits)1902 static void set_has_z(HasBits* has_bits) {
1903 (*has_bits)[0] |= 1073741824u;
1904 }
1905 static const ::perfetto::protos::PositionProto& position(const LayerProto* msg);
set_has_position(HasBits * has_bits)1906 static void set_has_position(HasBits* has_bits) {
1907 (*has_bits)[0] |= 128u;
1908 }
1909 static const ::perfetto::protos::PositionProto& requested_position(const LayerProto* msg);
set_has_requested_position(HasBits * has_bits)1910 static void set_has_requested_position(HasBits* has_bits) {
1911 (*has_bits)[0] |= 256u;
1912 }
1913 static const ::perfetto::protos::SizeProto& size(const LayerProto* msg);
set_has_size(HasBits * has_bits)1914 static void set_has_size(HasBits* has_bits) {
1915 (*has_bits)[0] |= 512u;
1916 }
1917 static const ::perfetto::protos::RectProto& crop(const LayerProto* msg);
set_has_crop(HasBits * has_bits)1918 static void set_has_crop(HasBits* has_bits) {
1919 (*has_bits)[0] |= 1024u;
1920 }
1921 static const ::perfetto::protos::RectProto& final_crop(const LayerProto* msg);
set_has_final_crop(HasBits * has_bits)1922 static void set_has_final_crop(HasBits* has_bits) {
1923 (*has_bits)[0] |= 2048u;
1924 }
set_has_is_opaque(HasBits * has_bits)1925 static void set_has_is_opaque(HasBits* has_bits) {
1926 (*has_bits)[1] |= 1u;
1927 }
set_has_invalidate(HasBits * has_bits)1928 static void set_has_invalidate(HasBits* has_bits) {
1929 (*has_bits)[1] |= 2u;
1930 }
set_has_dataspace(HasBits * has_bits)1931 static void set_has_dataspace(HasBits* has_bits) {
1932 (*has_bits)[0] |= 4u;
1933 }
set_has_pixel_format(HasBits * has_bits)1934 static void set_has_pixel_format(HasBits* has_bits) {
1935 (*has_bits)[0] |= 8u;
1936 }
1937 static const ::perfetto::protos::ColorProto& color(const LayerProto* msg);
set_has_color(HasBits * has_bits)1938 static void set_has_color(HasBits* has_bits) {
1939 (*has_bits)[0] |= 4096u;
1940 }
1941 static const ::perfetto::protos::ColorProto& requested_color(const LayerProto* msg);
set_has_requested_color(HasBits * has_bits)1942 static void set_has_requested_color(HasBits* has_bits) {
1943 (*has_bits)[0] |= 8192u;
1944 }
set_has_flags(HasBits * has_bits)1945 static void set_has_flags(HasBits* has_bits) {
1946 (*has_bits)[0] |= 2147483648u;
1947 }
1948 static const ::perfetto::protos::TransformProto& transform(const LayerProto* msg);
set_has_transform(HasBits * has_bits)1949 static void set_has_transform(HasBits* has_bits) {
1950 (*has_bits)[0] |= 16384u;
1951 }
1952 static const ::perfetto::protos::TransformProto& requested_transform(const LayerProto* msg);
set_has_requested_transform(HasBits * has_bits)1953 static void set_has_requested_transform(HasBits* has_bits) {
1954 (*has_bits)[0] |= 32768u;
1955 }
set_has_parent(HasBits * has_bits)1956 static void set_has_parent(HasBits* has_bits) {
1957 (*has_bits)[1] |= 16u;
1958 }
set_has_z_order_relative_of(HasBits * has_bits)1959 static void set_has_z_order_relative_of(HasBits* has_bits) {
1960 (*has_bits)[1] |= 32u;
1961 }
1962 static const ::perfetto::protos::ActiveBufferProto& active_buffer(const LayerProto* msg);
set_has_active_buffer(HasBits * has_bits)1963 static void set_has_active_buffer(HasBits* has_bits) {
1964 (*has_bits)[0] |= 65536u;
1965 }
set_has_queued_frames(HasBits * has_bits)1966 static void set_has_queued_frames(HasBits* has_bits) {
1967 (*has_bits)[1] |= 64u;
1968 }
set_has_refresh_pending(HasBits * has_bits)1969 static void set_has_refresh_pending(HasBits* has_bits) {
1970 (*has_bits)[1] |= 4u;
1971 }
1972 static const ::perfetto::protos::RectProto& hwc_frame(const LayerProto* msg);
set_has_hwc_frame(HasBits * has_bits)1973 static void set_has_hwc_frame(HasBits* has_bits) {
1974 (*has_bits)[0] |= 131072u;
1975 }
1976 static const ::perfetto::protos::FloatRectProto& hwc_crop(const LayerProto* msg);
set_has_hwc_crop(HasBits * has_bits)1977 static void set_has_hwc_crop(HasBits* has_bits) {
1978 (*has_bits)[0] |= 262144u;
1979 }
set_has_hwc_transform(HasBits * has_bits)1980 static void set_has_hwc_transform(HasBits* has_bits) {
1981 (*has_bits)[1] |= 128u;
1982 }
set_has_window_type(HasBits * has_bits)1983 static void set_has_window_type(HasBits* has_bits) {
1984 (*has_bits)[1] |= 256u;
1985 }
set_has_app_id(HasBits * has_bits)1986 static void set_has_app_id(HasBits* has_bits) {
1987 (*has_bits)[1] |= 512u;
1988 }
set_has_hwc_composition_type(HasBits * has_bits)1989 static void set_has_hwc_composition_type(HasBits* has_bits) {
1990 (*has_bits)[1] |= 1024u;
1991 }
set_has_is_protected(HasBits * has_bits)1992 static void set_has_is_protected(HasBits* has_bits) {
1993 (*has_bits)[1] |= 8u;
1994 }
set_has_curr_frame(HasBits * has_bits)1995 static void set_has_curr_frame(HasBits* has_bits) {
1996 (*has_bits)[1] |= 2048u;
1997 }
1998 static const ::perfetto::protos::TransformProto& buffer_transform(const LayerProto* msg);
set_has_buffer_transform(HasBits * has_bits)1999 static void set_has_buffer_transform(HasBits* has_bits) {
2000 (*has_bits)[0] |= 524288u;
2001 }
set_has_effective_scaling_mode(HasBits * has_bits)2002 static void set_has_effective_scaling_mode(HasBits* has_bits) {
2003 (*has_bits)[1] |= 4096u;
2004 }
set_has_corner_radius(HasBits * has_bits)2005 static void set_has_corner_radius(HasBits* has_bits) {
2006 (*has_bits)[1] |= 8192u;
2007 }
2008 static const ::perfetto::protos::TransformProto& effective_transform(const LayerProto* msg);
set_has_effective_transform(HasBits * has_bits)2009 static void set_has_effective_transform(HasBits* has_bits) {
2010 (*has_bits)[0] |= 1048576u;
2011 }
2012 static const ::perfetto::protos::FloatRectProto& source_bounds(const LayerProto* msg);
set_has_source_bounds(HasBits * has_bits)2013 static void set_has_source_bounds(HasBits* has_bits) {
2014 (*has_bits)[0] |= 2097152u;
2015 }
2016 static const ::perfetto::protos::FloatRectProto& bounds(const LayerProto* msg);
set_has_bounds(HasBits * has_bits)2017 static void set_has_bounds(HasBits* has_bits) {
2018 (*has_bits)[0] |= 4194304u;
2019 }
2020 static const ::perfetto::protos::FloatRectProto& screen_bounds(const LayerProto* msg);
set_has_screen_bounds(HasBits * has_bits)2021 static void set_has_screen_bounds(HasBits* has_bits) {
2022 (*has_bits)[0] |= 8388608u;
2023 }
2024 static const ::perfetto::protos::InputWindowInfoProto& input_window_info(const LayerProto* msg);
set_has_input_window_info(HasBits * has_bits)2025 static void set_has_input_window_info(HasBits* has_bits) {
2026 (*has_bits)[0] |= 16777216u;
2027 }
2028 static const ::perfetto::protos::FloatRectProto& corner_radius_crop(const LayerProto* msg);
set_has_corner_radius_crop(HasBits * has_bits)2029 static void set_has_corner_radius_crop(HasBits* has_bits) {
2030 (*has_bits)[0] |= 33554432u;
2031 }
set_has_shadow_radius(HasBits * has_bits)2032 static void set_has_shadow_radius(HasBits* has_bits) {
2033 (*has_bits)[1] |= 16384u;
2034 }
2035 static const ::perfetto::protos::ColorTransformProto& color_transform(const LayerProto* msg);
set_has_color_transform(HasBits * has_bits)2036 static void set_has_color_transform(HasBits* has_bits) {
2037 (*has_bits)[0] |= 67108864u;
2038 }
set_has_is_relative_of(HasBits * has_bits)2039 static void set_has_is_relative_of(HasBits* has_bits) {
2040 (*has_bits)[1] |= 131072u;
2041 }
set_has_background_blur_radius(HasBits * has_bits)2042 static void set_has_background_blur_radius(HasBits* has_bits) {
2043 (*has_bits)[1] |= 32768u;
2044 }
set_has_owner_uid(HasBits * has_bits)2045 static void set_has_owner_uid(HasBits* has_bits) {
2046 (*has_bits)[1] |= 65536u;
2047 }
set_has_is_trusted_overlay(HasBits * has_bits)2048 static void set_has_is_trusted_overlay(HasBits* has_bits) {
2049 (*has_bits)[1] |= 262144u;
2050 }
set_has_requested_corner_radius(HasBits * has_bits)2051 static void set_has_requested_corner_radius(HasBits* has_bits) {
2052 (*has_bits)[1] |= 524288u;
2053 }
2054 static const ::perfetto::protos::RectProto& destination_frame(const LayerProto* msg);
set_has_destination_frame(HasBits * has_bits)2055 static void set_has_destination_frame(HasBits* has_bits) {
2056 (*has_bits)[0] |= 134217728u;
2057 }
set_has_original_id(HasBits * has_bits)2058 static void set_has_original_id(HasBits* has_bits) {
2059 (*has_bits)[1] |= 1048576u;
2060 }
set_has_trusted_overlay(HasBits * has_bits)2061 static void set_has_trusted_overlay(HasBits* has_bits) {
2062 (*has_bits)[1] |= 2097152u;
2063 }
2064 };
2065
2066 const ::perfetto::protos::RegionProto&
transparent_region(const LayerProto * msg)2067 LayerProto::_Internal::transparent_region(const LayerProto* msg) {
2068 return *msg->_impl_.transparent_region_;
2069 }
2070 const ::perfetto::protos::RegionProto&
visible_region(const LayerProto * msg)2071 LayerProto::_Internal::visible_region(const LayerProto* msg) {
2072 return *msg->_impl_.visible_region_;
2073 }
2074 const ::perfetto::protos::RegionProto&
damage_region(const LayerProto * msg)2075 LayerProto::_Internal::damage_region(const LayerProto* msg) {
2076 return *msg->_impl_.damage_region_;
2077 }
2078 const ::perfetto::protos::PositionProto&
position(const LayerProto * msg)2079 LayerProto::_Internal::position(const LayerProto* msg) {
2080 return *msg->_impl_.position_;
2081 }
2082 const ::perfetto::protos::PositionProto&
requested_position(const LayerProto * msg)2083 LayerProto::_Internal::requested_position(const LayerProto* msg) {
2084 return *msg->_impl_.requested_position_;
2085 }
2086 const ::perfetto::protos::SizeProto&
size(const LayerProto * msg)2087 LayerProto::_Internal::size(const LayerProto* msg) {
2088 return *msg->_impl_.size_;
2089 }
2090 const ::perfetto::protos::RectProto&
crop(const LayerProto * msg)2091 LayerProto::_Internal::crop(const LayerProto* msg) {
2092 return *msg->_impl_.crop_;
2093 }
2094 const ::perfetto::protos::RectProto&
final_crop(const LayerProto * msg)2095 LayerProto::_Internal::final_crop(const LayerProto* msg) {
2096 return *msg->_impl_.final_crop_;
2097 }
2098 const ::perfetto::protos::ColorProto&
color(const LayerProto * msg)2099 LayerProto::_Internal::color(const LayerProto* msg) {
2100 return *msg->_impl_.color_;
2101 }
2102 const ::perfetto::protos::ColorProto&
requested_color(const LayerProto * msg)2103 LayerProto::_Internal::requested_color(const LayerProto* msg) {
2104 return *msg->_impl_.requested_color_;
2105 }
2106 const ::perfetto::protos::TransformProto&
transform(const LayerProto * msg)2107 LayerProto::_Internal::transform(const LayerProto* msg) {
2108 return *msg->_impl_.transform_;
2109 }
2110 const ::perfetto::protos::TransformProto&
requested_transform(const LayerProto * msg)2111 LayerProto::_Internal::requested_transform(const LayerProto* msg) {
2112 return *msg->_impl_.requested_transform_;
2113 }
2114 const ::perfetto::protos::ActiveBufferProto&
active_buffer(const LayerProto * msg)2115 LayerProto::_Internal::active_buffer(const LayerProto* msg) {
2116 return *msg->_impl_.active_buffer_;
2117 }
2118 const ::perfetto::protos::RectProto&
hwc_frame(const LayerProto * msg)2119 LayerProto::_Internal::hwc_frame(const LayerProto* msg) {
2120 return *msg->_impl_.hwc_frame_;
2121 }
2122 const ::perfetto::protos::FloatRectProto&
hwc_crop(const LayerProto * msg)2123 LayerProto::_Internal::hwc_crop(const LayerProto* msg) {
2124 return *msg->_impl_.hwc_crop_;
2125 }
2126 const ::perfetto::protos::TransformProto&
buffer_transform(const LayerProto * msg)2127 LayerProto::_Internal::buffer_transform(const LayerProto* msg) {
2128 return *msg->_impl_.buffer_transform_;
2129 }
2130 const ::perfetto::protos::TransformProto&
effective_transform(const LayerProto * msg)2131 LayerProto::_Internal::effective_transform(const LayerProto* msg) {
2132 return *msg->_impl_.effective_transform_;
2133 }
2134 const ::perfetto::protos::FloatRectProto&
source_bounds(const LayerProto * msg)2135 LayerProto::_Internal::source_bounds(const LayerProto* msg) {
2136 return *msg->_impl_.source_bounds_;
2137 }
2138 const ::perfetto::protos::FloatRectProto&
bounds(const LayerProto * msg)2139 LayerProto::_Internal::bounds(const LayerProto* msg) {
2140 return *msg->_impl_.bounds_;
2141 }
2142 const ::perfetto::protos::FloatRectProto&
screen_bounds(const LayerProto * msg)2143 LayerProto::_Internal::screen_bounds(const LayerProto* msg) {
2144 return *msg->_impl_.screen_bounds_;
2145 }
2146 const ::perfetto::protos::InputWindowInfoProto&
input_window_info(const LayerProto * msg)2147 LayerProto::_Internal::input_window_info(const LayerProto* msg) {
2148 return *msg->_impl_.input_window_info_;
2149 }
2150 const ::perfetto::protos::FloatRectProto&
corner_radius_crop(const LayerProto * msg)2151 LayerProto::_Internal::corner_radius_crop(const LayerProto* msg) {
2152 return *msg->_impl_.corner_radius_crop_;
2153 }
2154 const ::perfetto::protos::ColorTransformProto&
color_transform(const LayerProto * msg)2155 LayerProto::_Internal::color_transform(const LayerProto* msg) {
2156 return *msg->_impl_.color_transform_;
2157 }
2158 const ::perfetto::protos::RectProto&
destination_frame(const LayerProto * msg)2159 LayerProto::_Internal::destination_frame(const LayerProto* msg) {
2160 return *msg->_impl_.destination_frame_;
2161 }
clear_transparent_region()2162 void LayerProto::clear_transparent_region() {
2163 if (_impl_.transparent_region_ != nullptr) _impl_.transparent_region_->Clear();
2164 _impl_._has_bits_[0] &= ~0x00000010u;
2165 }
clear_visible_region()2166 void LayerProto::clear_visible_region() {
2167 if (_impl_.visible_region_ != nullptr) _impl_.visible_region_->Clear();
2168 _impl_._has_bits_[0] &= ~0x00000020u;
2169 }
clear_damage_region()2170 void LayerProto::clear_damage_region() {
2171 if (_impl_.damage_region_ != nullptr) _impl_.damage_region_->Clear();
2172 _impl_._has_bits_[0] &= ~0x00000040u;
2173 }
clear_size()2174 void LayerProto::clear_size() {
2175 if (_impl_.size_ != nullptr) _impl_.size_->Clear();
2176 _impl_._has_bits_[0] &= ~0x00000200u;
2177 }
clear_crop()2178 void LayerProto::clear_crop() {
2179 if (_impl_.crop_ != nullptr) _impl_.crop_->Clear();
2180 _impl_._has_bits_[0] &= ~0x00000400u;
2181 }
clear_final_crop()2182 void LayerProto::clear_final_crop() {
2183 if (_impl_.final_crop_ != nullptr) _impl_.final_crop_->Clear();
2184 _impl_._has_bits_[0] &= ~0x00000800u;
2185 }
clear_color()2186 void LayerProto::clear_color() {
2187 if (_impl_.color_ != nullptr) _impl_.color_->Clear();
2188 _impl_._has_bits_[0] &= ~0x00001000u;
2189 }
clear_requested_color()2190 void LayerProto::clear_requested_color() {
2191 if (_impl_.requested_color_ != nullptr) _impl_.requested_color_->Clear();
2192 _impl_._has_bits_[0] &= ~0x00002000u;
2193 }
clear_transform()2194 void LayerProto::clear_transform() {
2195 if (_impl_.transform_ != nullptr) _impl_.transform_->Clear();
2196 _impl_._has_bits_[0] &= ~0x00004000u;
2197 }
clear_requested_transform()2198 void LayerProto::clear_requested_transform() {
2199 if (_impl_.requested_transform_ != nullptr) _impl_.requested_transform_->Clear();
2200 _impl_._has_bits_[0] &= ~0x00008000u;
2201 }
clear_hwc_frame()2202 void LayerProto::clear_hwc_frame() {
2203 if (_impl_.hwc_frame_ != nullptr) _impl_.hwc_frame_->Clear();
2204 _impl_._has_bits_[0] &= ~0x00020000u;
2205 }
clear_buffer_transform()2206 void LayerProto::clear_buffer_transform() {
2207 if (_impl_.buffer_transform_ != nullptr) _impl_.buffer_transform_->Clear();
2208 _impl_._has_bits_[0] &= ~0x00080000u;
2209 }
clear_effective_transform()2210 void LayerProto::clear_effective_transform() {
2211 if (_impl_.effective_transform_ != nullptr) _impl_.effective_transform_->Clear();
2212 _impl_._has_bits_[0] &= ~0x00100000u;
2213 }
clear_input_window_info()2214 void LayerProto::clear_input_window_info() {
2215 if (_impl_.input_window_info_ != nullptr) _impl_.input_window_info_->Clear();
2216 _impl_._has_bits_[0] &= ~0x01000000u;
2217 }
clear_color_transform()2218 void LayerProto::clear_color_transform() {
2219 if (_impl_.color_transform_ != nullptr) _impl_.color_transform_->Clear();
2220 _impl_._has_bits_[0] &= ~0x04000000u;
2221 }
clear_blur_regions()2222 void LayerProto::clear_blur_regions() {
2223 _impl_.blur_regions_.Clear();
2224 }
clear_destination_frame()2225 void LayerProto::clear_destination_frame() {
2226 if (_impl_.destination_frame_ != nullptr) _impl_.destination_frame_->Clear();
2227 _impl_._has_bits_[0] &= ~0x08000000u;
2228 }
LayerProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2229 LayerProto::LayerProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2230 bool is_message_owned)
2231 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2232 SharedCtor(arena, is_message_owned);
2233 // @@protoc_insertion_point(arena_constructor:perfetto.protos.LayerProto)
2234 }
LayerProto(const LayerProto & from)2235 LayerProto::LayerProto(const LayerProto& from)
2236 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2237 LayerProto* const _this = this; (void)_this;
2238 new (&_impl_) Impl_{
2239 decltype(_impl_._has_bits_){from._impl_._has_bits_}
2240 , /*decltype(_impl_._cached_size_)*/{}
2241 , decltype(_impl_.children_){from._impl_.children_}
2242 , /*decltype(_impl_._children_cached_byte_size_)*/{0}
2243 , decltype(_impl_.relatives_){from._impl_.relatives_}
2244 , /*decltype(_impl_._relatives_cached_byte_size_)*/{0}
2245 , decltype(_impl_.barrier_layer_){from._impl_.barrier_layer_}
2246 , /*decltype(_impl_.metadata_)*/{}
2247 , decltype(_impl_.blur_regions_){from._impl_.blur_regions_}
2248 , decltype(_impl_.name_){}
2249 , decltype(_impl_.type_){}
2250 , decltype(_impl_.dataspace_){}
2251 , decltype(_impl_.pixel_format_){}
2252 , decltype(_impl_.transparent_region_){nullptr}
2253 , decltype(_impl_.visible_region_){nullptr}
2254 , decltype(_impl_.damage_region_){nullptr}
2255 , decltype(_impl_.position_){nullptr}
2256 , decltype(_impl_.requested_position_){nullptr}
2257 , decltype(_impl_.size_){nullptr}
2258 , decltype(_impl_.crop_){nullptr}
2259 , decltype(_impl_.final_crop_){nullptr}
2260 , decltype(_impl_.color_){nullptr}
2261 , decltype(_impl_.requested_color_){nullptr}
2262 , decltype(_impl_.transform_){nullptr}
2263 , decltype(_impl_.requested_transform_){nullptr}
2264 , decltype(_impl_.active_buffer_){nullptr}
2265 , decltype(_impl_.hwc_frame_){nullptr}
2266 , decltype(_impl_.hwc_crop_){nullptr}
2267 , decltype(_impl_.buffer_transform_){nullptr}
2268 , decltype(_impl_.effective_transform_){nullptr}
2269 , decltype(_impl_.source_bounds_){nullptr}
2270 , decltype(_impl_.bounds_){nullptr}
2271 , decltype(_impl_.screen_bounds_){nullptr}
2272 , decltype(_impl_.input_window_info_){nullptr}
2273 , decltype(_impl_.corner_radius_crop_){nullptr}
2274 , decltype(_impl_.color_transform_){nullptr}
2275 , decltype(_impl_.destination_frame_){nullptr}
2276 , decltype(_impl_.id_){}
2277 , decltype(_impl_.layer_stack_){}
2278 , decltype(_impl_.z_){}
2279 , decltype(_impl_.flags_){}
2280 , decltype(_impl_.is_opaque_){}
2281 , decltype(_impl_.invalidate_){}
2282 , decltype(_impl_.refresh_pending_){}
2283 , decltype(_impl_.is_protected_){}
2284 , decltype(_impl_.parent_){}
2285 , decltype(_impl_.z_order_relative_of_){}
2286 , decltype(_impl_.queued_frames_){}
2287 , decltype(_impl_.hwc_transform_){}
2288 , decltype(_impl_.window_type_){}
2289 , decltype(_impl_.app_id_){}
2290 , decltype(_impl_.hwc_composition_type_){}
2291 , decltype(_impl_.curr_frame_){}
2292 , decltype(_impl_.effective_scaling_mode_){}
2293 , decltype(_impl_.corner_radius_){}
2294 , decltype(_impl_.shadow_radius_){}
2295 , decltype(_impl_.background_blur_radius_){}
2296 , decltype(_impl_.owner_uid_){}
2297 , decltype(_impl_.is_relative_of_){}
2298 , decltype(_impl_.is_trusted_overlay_){}
2299 , decltype(_impl_.requested_corner_radius_){}
2300 , decltype(_impl_.original_id_){}
2301 , decltype(_impl_.trusted_overlay_){}};
2302
2303 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2304 _this->_impl_.metadata_.MergeFrom(from._impl_.metadata_);
2305 _impl_.name_.InitDefault();
2306 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2307 _impl_.name_.Set("", GetArenaForAllocation());
2308 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2309 if (from._internal_has_name()) {
2310 _this->_impl_.name_.Set(from._internal_name(),
2311 _this->GetArenaForAllocation());
2312 }
2313 _impl_.type_.InitDefault();
2314 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2315 _impl_.type_.Set("", GetArenaForAllocation());
2316 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2317 if (from._internal_has_type()) {
2318 _this->_impl_.type_.Set(from._internal_type(),
2319 _this->GetArenaForAllocation());
2320 }
2321 _impl_.dataspace_.InitDefault();
2322 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2323 _impl_.dataspace_.Set("", GetArenaForAllocation());
2324 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2325 if (from._internal_has_dataspace()) {
2326 _this->_impl_.dataspace_.Set(from._internal_dataspace(),
2327 _this->GetArenaForAllocation());
2328 }
2329 _impl_.pixel_format_.InitDefault();
2330 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2331 _impl_.pixel_format_.Set("", GetArenaForAllocation());
2332 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2333 if (from._internal_has_pixel_format()) {
2334 _this->_impl_.pixel_format_.Set(from._internal_pixel_format(),
2335 _this->GetArenaForAllocation());
2336 }
2337 if (from._internal_has_transparent_region()) {
2338 _this->_impl_.transparent_region_ = new ::perfetto::protos::RegionProto(*from._impl_.transparent_region_);
2339 }
2340 if (from._internal_has_visible_region()) {
2341 _this->_impl_.visible_region_ = new ::perfetto::protos::RegionProto(*from._impl_.visible_region_);
2342 }
2343 if (from._internal_has_damage_region()) {
2344 _this->_impl_.damage_region_ = new ::perfetto::protos::RegionProto(*from._impl_.damage_region_);
2345 }
2346 if (from._internal_has_position()) {
2347 _this->_impl_.position_ = new ::perfetto::protos::PositionProto(*from._impl_.position_);
2348 }
2349 if (from._internal_has_requested_position()) {
2350 _this->_impl_.requested_position_ = new ::perfetto::protos::PositionProto(*from._impl_.requested_position_);
2351 }
2352 if (from._internal_has_size()) {
2353 _this->_impl_.size_ = new ::perfetto::protos::SizeProto(*from._impl_.size_);
2354 }
2355 if (from._internal_has_crop()) {
2356 _this->_impl_.crop_ = new ::perfetto::protos::RectProto(*from._impl_.crop_);
2357 }
2358 if (from._internal_has_final_crop()) {
2359 _this->_impl_.final_crop_ = new ::perfetto::protos::RectProto(*from._impl_.final_crop_);
2360 }
2361 if (from._internal_has_color()) {
2362 _this->_impl_.color_ = new ::perfetto::protos::ColorProto(*from._impl_.color_);
2363 }
2364 if (from._internal_has_requested_color()) {
2365 _this->_impl_.requested_color_ = new ::perfetto::protos::ColorProto(*from._impl_.requested_color_);
2366 }
2367 if (from._internal_has_transform()) {
2368 _this->_impl_.transform_ = new ::perfetto::protos::TransformProto(*from._impl_.transform_);
2369 }
2370 if (from._internal_has_requested_transform()) {
2371 _this->_impl_.requested_transform_ = new ::perfetto::protos::TransformProto(*from._impl_.requested_transform_);
2372 }
2373 if (from._internal_has_active_buffer()) {
2374 _this->_impl_.active_buffer_ = new ::perfetto::protos::ActiveBufferProto(*from._impl_.active_buffer_);
2375 }
2376 if (from._internal_has_hwc_frame()) {
2377 _this->_impl_.hwc_frame_ = new ::perfetto::protos::RectProto(*from._impl_.hwc_frame_);
2378 }
2379 if (from._internal_has_hwc_crop()) {
2380 _this->_impl_.hwc_crop_ = new ::perfetto::protos::FloatRectProto(*from._impl_.hwc_crop_);
2381 }
2382 if (from._internal_has_buffer_transform()) {
2383 _this->_impl_.buffer_transform_ = new ::perfetto::protos::TransformProto(*from._impl_.buffer_transform_);
2384 }
2385 if (from._internal_has_effective_transform()) {
2386 _this->_impl_.effective_transform_ = new ::perfetto::protos::TransformProto(*from._impl_.effective_transform_);
2387 }
2388 if (from._internal_has_source_bounds()) {
2389 _this->_impl_.source_bounds_ = new ::perfetto::protos::FloatRectProto(*from._impl_.source_bounds_);
2390 }
2391 if (from._internal_has_bounds()) {
2392 _this->_impl_.bounds_ = new ::perfetto::protos::FloatRectProto(*from._impl_.bounds_);
2393 }
2394 if (from._internal_has_screen_bounds()) {
2395 _this->_impl_.screen_bounds_ = new ::perfetto::protos::FloatRectProto(*from._impl_.screen_bounds_);
2396 }
2397 if (from._internal_has_input_window_info()) {
2398 _this->_impl_.input_window_info_ = new ::perfetto::protos::InputWindowInfoProto(*from._impl_.input_window_info_);
2399 }
2400 if (from._internal_has_corner_radius_crop()) {
2401 _this->_impl_.corner_radius_crop_ = new ::perfetto::protos::FloatRectProto(*from._impl_.corner_radius_crop_);
2402 }
2403 if (from._internal_has_color_transform()) {
2404 _this->_impl_.color_transform_ = new ::perfetto::protos::ColorTransformProto(*from._impl_.color_transform_);
2405 }
2406 if (from._internal_has_destination_frame()) {
2407 _this->_impl_.destination_frame_ = new ::perfetto::protos::RectProto(*from._impl_.destination_frame_);
2408 }
2409 ::memcpy(&_impl_.id_, &from._impl_.id_,
2410 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.trusted_overlay_) -
2411 reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.trusted_overlay_));
2412 // @@protoc_insertion_point(copy_constructor:perfetto.protos.LayerProto)
2413 }
2414
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2415 inline void LayerProto::SharedCtor(
2416 ::_pb::Arena* arena, bool is_message_owned) {
2417 (void)arena;
2418 (void)is_message_owned;
2419 new (&_impl_) Impl_{
2420 decltype(_impl_._has_bits_){}
2421 , /*decltype(_impl_._cached_size_)*/{}
2422 , decltype(_impl_.children_){arena}
2423 , /*decltype(_impl_._children_cached_byte_size_)*/{0}
2424 , decltype(_impl_.relatives_){arena}
2425 , /*decltype(_impl_._relatives_cached_byte_size_)*/{0}
2426 , decltype(_impl_.barrier_layer_){arena}
2427 , /*decltype(_impl_.metadata_)*/{::_pbi::ArenaInitialized(), arena}
2428 , decltype(_impl_.blur_regions_){arena}
2429 , decltype(_impl_.name_){}
2430 , decltype(_impl_.type_){}
2431 , decltype(_impl_.dataspace_){}
2432 , decltype(_impl_.pixel_format_){}
2433 , decltype(_impl_.transparent_region_){nullptr}
2434 , decltype(_impl_.visible_region_){nullptr}
2435 , decltype(_impl_.damage_region_){nullptr}
2436 , decltype(_impl_.position_){nullptr}
2437 , decltype(_impl_.requested_position_){nullptr}
2438 , decltype(_impl_.size_){nullptr}
2439 , decltype(_impl_.crop_){nullptr}
2440 , decltype(_impl_.final_crop_){nullptr}
2441 , decltype(_impl_.color_){nullptr}
2442 , decltype(_impl_.requested_color_){nullptr}
2443 , decltype(_impl_.transform_){nullptr}
2444 , decltype(_impl_.requested_transform_){nullptr}
2445 , decltype(_impl_.active_buffer_){nullptr}
2446 , decltype(_impl_.hwc_frame_){nullptr}
2447 , decltype(_impl_.hwc_crop_){nullptr}
2448 , decltype(_impl_.buffer_transform_){nullptr}
2449 , decltype(_impl_.effective_transform_){nullptr}
2450 , decltype(_impl_.source_bounds_){nullptr}
2451 , decltype(_impl_.bounds_){nullptr}
2452 , decltype(_impl_.screen_bounds_){nullptr}
2453 , decltype(_impl_.input_window_info_){nullptr}
2454 , decltype(_impl_.corner_radius_crop_){nullptr}
2455 , decltype(_impl_.color_transform_){nullptr}
2456 , decltype(_impl_.destination_frame_){nullptr}
2457 , decltype(_impl_.id_){0}
2458 , decltype(_impl_.layer_stack_){0u}
2459 , decltype(_impl_.z_){0}
2460 , decltype(_impl_.flags_){0u}
2461 , decltype(_impl_.is_opaque_){false}
2462 , decltype(_impl_.invalidate_){false}
2463 , decltype(_impl_.refresh_pending_){false}
2464 , decltype(_impl_.is_protected_){false}
2465 , decltype(_impl_.parent_){0}
2466 , decltype(_impl_.z_order_relative_of_){0}
2467 , decltype(_impl_.queued_frames_){0}
2468 , decltype(_impl_.hwc_transform_){0}
2469 , decltype(_impl_.window_type_){0}
2470 , decltype(_impl_.app_id_){0}
2471 , decltype(_impl_.hwc_composition_type_){0}
2472 , decltype(_impl_.curr_frame_){::uint64_t{0u}}
2473 , decltype(_impl_.effective_scaling_mode_){0}
2474 , decltype(_impl_.corner_radius_){0}
2475 , decltype(_impl_.shadow_radius_){0}
2476 , decltype(_impl_.background_blur_radius_){0}
2477 , decltype(_impl_.owner_uid_){0u}
2478 , decltype(_impl_.is_relative_of_){false}
2479 , decltype(_impl_.is_trusted_overlay_){false}
2480 , decltype(_impl_.requested_corner_radius_){0}
2481 , decltype(_impl_.original_id_){0u}
2482 , decltype(_impl_.trusted_overlay_){0}
2483 };
2484 _impl_.name_.InitDefault();
2485 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2486 _impl_.name_.Set("", GetArenaForAllocation());
2487 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2488 _impl_.type_.InitDefault();
2489 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2490 _impl_.type_.Set("", GetArenaForAllocation());
2491 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2492 _impl_.dataspace_.InitDefault();
2493 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2494 _impl_.dataspace_.Set("", GetArenaForAllocation());
2495 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2496 _impl_.pixel_format_.InitDefault();
2497 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2498 _impl_.pixel_format_.Set("", GetArenaForAllocation());
2499 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2500 }
2501
~LayerProto()2502 LayerProto::~LayerProto() {
2503 // @@protoc_insertion_point(destructor:perfetto.protos.LayerProto)
2504 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2505 (void)arena;
2506 return;
2507 }
2508 SharedDtor();
2509 }
2510
SharedDtor()2511 inline void LayerProto::SharedDtor() {
2512 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2513 _impl_.children_.~RepeatedField();
2514 _impl_.relatives_.~RepeatedField();
2515 _impl_.barrier_layer_.~RepeatedPtrField();
2516 _impl_.metadata_.Destruct();
2517 _impl_.metadata_.~MapFieldLite();
2518 _impl_.blur_regions_.~RepeatedPtrField();
2519 _impl_.name_.Destroy();
2520 _impl_.type_.Destroy();
2521 _impl_.dataspace_.Destroy();
2522 _impl_.pixel_format_.Destroy();
2523 if (this != internal_default_instance()) delete _impl_.transparent_region_;
2524 if (this != internal_default_instance()) delete _impl_.visible_region_;
2525 if (this != internal_default_instance()) delete _impl_.damage_region_;
2526 if (this != internal_default_instance()) delete _impl_.position_;
2527 if (this != internal_default_instance()) delete _impl_.requested_position_;
2528 if (this != internal_default_instance()) delete _impl_.size_;
2529 if (this != internal_default_instance()) delete _impl_.crop_;
2530 if (this != internal_default_instance()) delete _impl_.final_crop_;
2531 if (this != internal_default_instance()) delete _impl_.color_;
2532 if (this != internal_default_instance()) delete _impl_.requested_color_;
2533 if (this != internal_default_instance()) delete _impl_.transform_;
2534 if (this != internal_default_instance()) delete _impl_.requested_transform_;
2535 if (this != internal_default_instance()) delete _impl_.active_buffer_;
2536 if (this != internal_default_instance()) delete _impl_.hwc_frame_;
2537 if (this != internal_default_instance()) delete _impl_.hwc_crop_;
2538 if (this != internal_default_instance()) delete _impl_.buffer_transform_;
2539 if (this != internal_default_instance()) delete _impl_.effective_transform_;
2540 if (this != internal_default_instance()) delete _impl_.source_bounds_;
2541 if (this != internal_default_instance()) delete _impl_.bounds_;
2542 if (this != internal_default_instance()) delete _impl_.screen_bounds_;
2543 if (this != internal_default_instance()) delete _impl_.input_window_info_;
2544 if (this != internal_default_instance()) delete _impl_.corner_radius_crop_;
2545 if (this != internal_default_instance()) delete _impl_.color_transform_;
2546 if (this != internal_default_instance()) delete _impl_.destination_frame_;
2547 }
2548
SetCachedSize(int size) const2549 void LayerProto::SetCachedSize(int size) const {
2550 _impl_._cached_size_.Set(size);
2551 }
2552
Clear()2553 void LayerProto::Clear() {
2554 // @@protoc_insertion_point(message_clear_start:perfetto.protos.LayerProto)
2555 ::uint32_t cached_has_bits = 0;
2556 // Prevent compiler warnings about cached_has_bits being unused
2557 (void) cached_has_bits;
2558
2559 _impl_.children_.Clear();
2560 _impl_.relatives_.Clear();
2561 _impl_.barrier_layer_.Clear();
2562 _impl_.metadata_.Clear();
2563 _impl_.blur_regions_.Clear();
2564 cached_has_bits = _impl_._has_bits_[0];
2565 if (cached_has_bits & 0x000000ffu) {
2566 if (cached_has_bits & 0x00000001u) {
2567 _impl_.name_.ClearNonDefaultToEmpty();
2568 }
2569 if (cached_has_bits & 0x00000002u) {
2570 _impl_.type_.ClearNonDefaultToEmpty();
2571 }
2572 if (cached_has_bits & 0x00000004u) {
2573 _impl_.dataspace_.ClearNonDefaultToEmpty();
2574 }
2575 if (cached_has_bits & 0x00000008u) {
2576 _impl_.pixel_format_.ClearNonDefaultToEmpty();
2577 }
2578 if (cached_has_bits & 0x00000010u) {
2579 GOOGLE_DCHECK(_impl_.transparent_region_ != nullptr);
2580 _impl_.transparent_region_->Clear();
2581 }
2582 if (cached_has_bits & 0x00000020u) {
2583 GOOGLE_DCHECK(_impl_.visible_region_ != nullptr);
2584 _impl_.visible_region_->Clear();
2585 }
2586 if (cached_has_bits & 0x00000040u) {
2587 GOOGLE_DCHECK(_impl_.damage_region_ != nullptr);
2588 _impl_.damage_region_->Clear();
2589 }
2590 if (cached_has_bits & 0x00000080u) {
2591 GOOGLE_DCHECK(_impl_.position_ != nullptr);
2592 _impl_.position_->Clear();
2593 }
2594 }
2595 if (cached_has_bits & 0x0000ff00u) {
2596 if (cached_has_bits & 0x00000100u) {
2597 GOOGLE_DCHECK(_impl_.requested_position_ != nullptr);
2598 _impl_.requested_position_->Clear();
2599 }
2600 if (cached_has_bits & 0x00000200u) {
2601 GOOGLE_DCHECK(_impl_.size_ != nullptr);
2602 _impl_.size_->Clear();
2603 }
2604 if (cached_has_bits & 0x00000400u) {
2605 GOOGLE_DCHECK(_impl_.crop_ != nullptr);
2606 _impl_.crop_->Clear();
2607 }
2608 if (cached_has_bits & 0x00000800u) {
2609 GOOGLE_DCHECK(_impl_.final_crop_ != nullptr);
2610 _impl_.final_crop_->Clear();
2611 }
2612 if (cached_has_bits & 0x00001000u) {
2613 GOOGLE_DCHECK(_impl_.color_ != nullptr);
2614 _impl_.color_->Clear();
2615 }
2616 if (cached_has_bits & 0x00002000u) {
2617 GOOGLE_DCHECK(_impl_.requested_color_ != nullptr);
2618 _impl_.requested_color_->Clear();
2619 }
2620 if (cached_has_bits & 0x00004000u) {
2621 GOOGLE_DCHECK(_impl_.transform_ != nullptr);
2622 _impl_.transform_->Clear();
2623 }
2624 if (cached_has_bits & 0x00008000u) {
2625 GOOGLE_DCHECK(_impl_.requested_transform_ != nullptr);
2626 _impl_.requested_transform_->Clear();
2627 }
2628 }
2629 if (cached_has_bits & 0x00ff0000u) {
2630 if (cached_has_bits & 0x00010000u) {
2631 GOOGLE_DCHECK(_impl_.active_buffer_ != nullptr);
2632 _impl_.active_buffer_->Clear();
2633 }
2634 if (cached_has_bits & 0x00020000u) {
2635 GOOGLE_DCHECK(_impl_.hwc_frame_ != nullptr);
2636 _impl_.hwc_frame_->Clear();
2637 }
2638 if (cached_has_bits & 0x00040000u) {
2639 GOOGLE_DCHECK(_impl_.hwc_crop_ != nullptr);
2640 _impl_.hwc_crop_->Clear();
2641 }
2642 if (cached_has_bits & 0x00080000u) {
2643 GOOGLE_DCHECK(_impl_.buffer_transform_ != nullptr);
2644 _impl_.buffer_transform_->Clear();
2645 }
2646 if (cached_has_bits & 0x00100000u) {
2647 GOOGLE_DCHECK(_impl_.effective_transform_ != nullptr);
2648 _impl_.effective_transform_->Clear();
2649 }
2650 if (cached_has_bits & 0x00200000u) {
2651 GOOGLE_DCHECK(_impl_.source_bounds_ != nullptr);
2652 _impl_.source_bounds_->Clear();
2653 }
2654 if (cached_has_bits & 0x00400000u) {
2655 GOOGLE_DCHECK(_impl_.bounds_ != nullptr);
2656 _impl_.bounds_->Clear();
2657 }
2658 if (cached_has_bits & 0x00800000u) {
2659 GOOGLE_DCHECK(_impl_.screen_bounds_ != nullptr);
2660 _impl_.screen_bounds_->Clear();
2661 }
2662 }
2663 if (cached_has_bits & 0x0f000000u) {
2664 if (cached_has_bits & 0x01000000u) {
2665 GOOGLE_DCHECK(_impl_.input_window_info_ != nullptr);
2666 _impl_.input_window_info_->Clear();
2667 }
2668 if (cached_has_bits & 0x02000000u) {
2669 GOOGLE_DCHECK(_impl_.corner_radius_crop_ != nullptr);
2670 _impl_.corner_radius_crop_->Clear();
2671 }
2672 if (cached_has_bits & 0x04000000u) {
2673 GOOGLE_DCHECK(_impl_.color_transform_ != nullptr);
2674 _impl_.color_transform_->Clear();
2675 }
2676 if (cached_has_bits & 0x08000000u) {
2677 GOOGLE_DCHECK(_impl_.destination_frame_ != nullptr);
2678 _impl_.destination_frame_->Clear();
2679 }
2680 }
2681 if (cached_has_bits & 0xf0000000u) {
2682 ::memset(&_impl_.id_, 0, static_cast<size_t>(
2683 reinterpret_cast<char*>(&_impl_.flags_) -
2684 reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.flags_));
2685 }
2686 cached_has_bits = _impl_._has_bits_[1];
2687 if (cached_has_bits & 0x000000ffu) {
2688 ::memset(&_impl_.is_opaque_, 0, static_cast<size_t>(
2689 reinterpret_cast<char*>(&_impl_.hwc_transform_) -
2690 reinterpret_cast<char*>(&_impl_.is_opaque_)) + sizeof(_impl_.hwc_transform_));
2691 }
2692 if (cached_has_bits & 0x0000ff00u) {
2693 ::memset(&_impl_.window_type_, 0, static_cast<size_t>(
2694 reinterpret_cast<char*>(&_impl_.background_blur_radius_) -
2695 reinterpret_cast<char*>(&_impl_.window_type_)) + sizeof(_impl_.background_blur_radius_));
2696 }
2697 if (cached_has_bits & 0x003f0000u) {
2698 ::memset(&_impl_.owner_uid_, 0, static_cast<size_t>(
2699 reinterpret_cast<char*>(&_impl_.trusted_overlay_) -
2700 reinterpret_cast<char*>(&_impl_.owner_uid_)) + sizeof(_impl_.trusted_overlay_));
2701 }
2702 _impl_._has_bits_.Clear();
2703 _internal_metadata_.Clear<std::string>();
2704 }
2705
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2706 const char* LayerProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2707 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2708 while (!ctx->Done(&ptr)) {
2709 ::uint32_t tag;
2710 ptr = ::_pbi::ReadTag(ptr, &tag);
2711 switch (tag >> 3) {
2712 // optional int32 id = 1;
2713 case 1:
2714 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
2715 _Internal::set_has_id(&_impl_._has_bits_);
2716 _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2717 CHK_(ptr);
2718 } else {
2719 goto handle_unusual;
2720 }
2721 continue;
2722 // optional string name = 2;
2723 case 2:
2724 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2725 auto str = _internal_mutable_name();
2726 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2727 CHK_(ptr);
2728 } else {
2729 goto handle_unusual;
2730 }
2731 continue;
2732 // repeated int32 children = 3 [packed = true];
2733 case 3:
2734 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
2735 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_children(), ptr, ctx);
2736 CHK_(ptr);
2737 } else if (static_cast<::uint8_t>(tag) == 24) {
2738 _internal_add_children(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
2739 CHK_(ptr);
2740 } else {
2741 goto handle_unusual;
2742 }
2743 continue;
2744 // repeated int32 relatives = 4 [packed = true];
2745 case 4:
2746 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
2747 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_relatives(), ptr, ctx);
2748 CHK_(ptr);
2749 } else if (static_cast<::uint8_t>(tag) == 32) {
2750 _internal_add_relatives(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
2751 CHK_(ptr);
2752 } else {
2753 goto handle_unusual;
2754 }
2755 continue;
2756 // optional string type = 5;
2757 case 5:
2758 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
2759 auto str = _internal_mutable_type();
2760 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2761 CHK_(ptr);
2762 } else {
2763 goto handle_unusual;
2764 }
2765 continue;
2766 // optional .perfetto.protos.RegionProto transparent_region = 6;
2767 case 6:
2768 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
2769 ptr = ctx->ParseMessage(_internal_mutable_transparent_region(), ptr);
2770 CHK_(ptr);
2771 } else {
2772 goto handle_unusual;
2773 }
2774 continue;
2775 // optional .perfetto.protos.RegionProto visible_region = 7;
2776 case 7:
2777 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
2778 ptr = ctx->ParseMessage(_internal_mutable_visible_region(), ptr);
2779 CHK_(ptr);
2780 } else {
2781 goto handle_unusual;
2782 }
2783 continue;
2784 // optional .perfetto.protos.RegionProto damage_region = 8;
2785 case 8:
2786 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
2787 ptr = ctx->ParseMessage(_internal_mutable_damage_region(), ptr);
2788 CHK_(ptr);
2789 } else {
2790 goto handle_unusual;
2791 }
2792 continue;
2793 // optional uint32 layer_stack = 9;
2794 case 9:
2795 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
2796 _Internal::set_has_layer_stack(&_impl_._has_bits_);
2797 _impl_.layer_stack_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2798 CHK_(ptr);
2799 } else {
2800 goto handle_unusual;
2801 }
2802 continue;
2803 // optional int32 z = 10;
2804 case 10:
2805 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
2806 _Internal::set_has_z(&_impl_._has_bits_);
2807 _impl_.z_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2808 CHK_(ptr);
2809 } else {
2810 goto handle_unusual;
2811 }
2812 continue;
2813 // optional .perfetto.protos.PositionProto position = 11;
2814 case 11:
2815 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
2816 ptr = ctx->ParseMessage(_internal_mutable_position(), ptr);
2817 CHK_(ptr);
2818 } else {
2819 goto handle_unusual;
2820 }
2821 continue;
2822 // optional .perfetto.protos.PositionProto requested_position = 12;
2823 case 12:
2824 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 98)) {
2825 ptr = ctx->ParseMessage(_internal_mutable_requested_position(), ptr);
2826 CHK_(ptr);
2827 } else {
2828 goto handle_unusual;
2829 }
2830 continue;
2831 // optional .perfetto.protos.SizeProto size = 13;
2832 case 13:
2833 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 106)) {
2834 ptr = ctx->ParseMessage(_internal_mutable_size(), ptr);
2835 CHK_(ptr);
2836 } else {
2837 goto handle_unusual;
2838 }
2839 continue;
2840 // optional .perfetto.protos.RectProto crop = 14;
2841 case 14:
2842 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 114)) {
2843 ptr = ctx->ParseMessage(_internal_mutable_crop(), ptr);
2844 CHK_(ptr);
2845 } else {
2846 goto handle_unusual;
2847 }
2848 continue;
2849 // optional .perfetto.protos.RectProto final_crop = 15 [deprecated = true];
2850 case 15:
2851 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 122)) {
2852 ptr = ctx->ParseMessage(_internal_mutable_final_crop(), ptr);
2853 CHK_(ptr);
2854 } else {
2855 goto handle_unusual;
2856 }
2857 continue;
2858 // optional bool is_opaque = 16;
2859 case 16:
2860 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 128)) {
2861 _Internal::set_has_is_opaque(&_impl_._has_bits_);
2862 _impl_.is_opaque_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2863 CHK_(ptr);
2864 } else {
2865 goto handle_unusual;
2866 }
2867 continue;
2868 // optional bool invalidate = 17;
2869 case 17:
2870 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 136)) {
2871 _Internal::set_has_invalidate(&_impl_._has_bits_);
2872 _impl_.invalidate_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2873 CHK_(ptr);
2874 } else {
2875 goto handle_unusual;
2876 }
2877 continue;
2878 // optional string dataspace = 18;
2879 case 18:
2880 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 146)) {
2881 auto str = _internal_mutable_dataspace();
2882 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2883 CHK_(ptr);
2884 } else {
2885 goto handle_unusual;
2886 }
2887 continue;
2888 // optional string pixel_format = 19;
2889 case 19:
2890 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 154)) {
2891 auto str = _internal_mutable_pixel_format();
2892 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2893 CHK_(ptr);
2894 } else {
2895 goto handle_unusual;
2896 }
2897 continue;
2898 // optional .perfetto.protos.ColorProto color = 20;
2899 case 20:
2900 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 162)) {
2901 ptr = ctx->ParseMessage(_internal_mutable_color(), ptr);
2902 CHK_(ptr);
2903 } else {
2904 goto handle_unusual;
2905 }
2906 continue;
2907 // optional .perfetto.protos.ColorProto requested_color = 21;
2908 case 21:
2909 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 170)) {
2910 ptr = ctx->ParseMessage(_internal_mutable_requested_color(), ptr);
2911 CHK_(ptr);
2912 } else {
2913 goto handle_unusual;
2914 }
2915 continue;
2916 // optional uint32 flags = 22;
2917 case 22:
2918 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 176)) {
2919 _Internal::set_has_flags(&_impl_._has_bits_);
2920 _impl_.flags_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2921 CHK_(ptr);
2922 } else {
2923 goto handle_unusual;
2924 }
2925 continue;
2926 // optional .perfetto.protos.TransformProto transform = 23;
2927 case 23:
2928 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 186)) {
2929 ptr = ctx->ParseMessage(_internal_mutable_transform(), ptr);
2930 CHK_(ptr);
2931 } else {
2932 goto handle_unusual;
2933 }
2934 continue;
2935 // optional .perfetto.protos.TransformProto requested_transform = 24;
2936 case 24:
2937 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 194)) {
2938 ptr = ctx->ParseMessage(_internal_mutable_requested_transform(), ptr);
2939 CHK_(ptr);
2940 } else {
2941 goto handle_unusual;
2942 }
2943 continue;
2944 // optional int32 parent = 25;
2945 case 25:
2946 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 200)) {
2947 _Internal::set_has_parent(&_impl_._has_bits_);
2948 _impl_.parent_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2949 CHK_(ptr);
2950 } else {
2951 goto handle_unusual;
2952 }
2953 continue;
2954 // optional int32 z_order_relative_of = 26;
2955 case 26:
2956 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 208)) {
2957 _Internal::set_has_z_order_relative_of(&_impl_._has_bits_);
2958 _impl_.z_order_relative_of_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2959 CHK_(ptr);
2960 } else {
2961 goto handle_unusual;
2962 }
2963 continue;
2964 // optional .perfetto.protos.ActiveBufferProto active_buffer = 27;
2965 case 27:
2966 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 218)) {
2967 ptr = ctx->ParseMessage(_internal_mutable_active_buffer(), ptr);
2968 CHK_(ptr);
2969 } else {
2970 goto handle_unusual;
2971 }
2972 continue;
2973 // optional int32 queued_frames = 28;
2974 case 28:
2975 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 224)) {
2976 _Internal::set_has_queued_frames(&_impl_._has_bits_);
2977 _impl_.queued_frames_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2978 CHK_(ptr);
2979 } else {
2980 goto handle_unusual;
2981 }
2982 continue;
2983 // optional bool refresh_pending = 29;
2984 case 29:
2985 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 232)) {
2986 _Internal::set_has_refresh_pending(&_impl_._has_bits_);
2987 _impl_.refresh_pending_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2988 CHK_(ptr);
2989 } else {
2990 goto handle_unusual;
2991 }
2992 continue;
2993 // optional .perfetto.protos.RectProto hwc_frame = 30;
2994 case 30:
2995 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 242)) {
2996 ptr = ctx->ParseMessage(_internal_mutable_hwc_frame(), ptr);
2997 CHK_(ptr);
2998 } else {
2999 goto handle_unusual;
3000 }
3001 continue;
3002 // optional .perfetto.protos.FloatRectProto hwc_crop = 31;
3003 case 31:
3004 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 250)) {
3005 ptr = ctx->ParseMessage(_internal_mutable_hwc_crop(), ptr);
3006 CHK_(ptr);
3007 } else {
3008 goto handle_unusual;
3009 }
3010 continue;
3011 // optional int32 hwc_transform = 32;
3012 case 32:
3013 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 0)) {
3014 _Internal::set_has_hwc_transform(&_impl_._has_bits_);
3015 _impl_.hwc_transform_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3016 CHK_(ptr);
3017 } else {
3018 goto handle_unusual;
3019 }
3020 continue;
3021 // optional int32 window_type = 33 [deprecated = true];
3022 case 33:
3023 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
3024 _Internal::set_has_window_type(&_impl_._has_bits_);
3025 _impl_.window_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3026 CHK_(ptr);
3027 } else {
3028 goto handle_unusual;
3029 }
3030 continue;
3031 // optional int32 app_id = 34 [deprecated = true];
3032 case 34:
3033 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
3034 _Internal::set_has_app_id(&_impl_._has_bits_);
3035 _impl_.app_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3036 CHK_(ptr);
3037 } else {
3038 goto handle_unusual;
3039 }
3040 continue;
3041 // optional .perfetto.protos.HwcCompositionType hwc_composition_type = 35;
3042 case 35:
3043 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
3044 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3045 CHK_(ptr);
3046 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::HwcCompositionType_IsValid(val))) {
3047 _internal_set_hwc_composition_type(static_cast<::perfetto::protos::HwcCompositionType>(val));
3048 } else {
3049 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(35, val, mutable_unknown_fields());
3050 }
3051 } else {
3052 goto handle_unusual;
3053 }
3054 continue;
3055 // optional bool is_protected = 36;
3056 case 36:
3057 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
3058 _Internal::set_has_is_protected(&_impl_._has_bits_);
3059 _impl_.is_protected_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3060 CHK_(ptr);
3061 } else {
3062 goto handle_unusual;
3063 }
3064 continue;
3065 // optional uint64 curr_frame = 37;
3066 case 37:
3067 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
3068 _Internal::set_has_curr_frame(&_impl_._has_bits_);
3069 _impl_.curr_frame_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3070 CHK_(ptr);
3071 } else {
3072 goto handle_unusual;
3073 }
3074 continue;
3075 // repeated .perfetto.protos.BarrierLayerProto barrier_layer = 38;
3076 case 38:
3077 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
3078 ptr -= 2;
3079 do {
3080 ptr += 2;
3081 ptr = ctx->ParseMessage(_internal_add_barrier_layer(), ptr);
3082 CHK_(ptr);
3083 if (!ctx->DataAvailable(ptr)) break;
3084 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<306>(ptr));
3085 } else {
3086 goto handle_unusual;
3087 }
3088 continue;
3089 // optional .perfetto.protos.TransformProto buffer_transform = 39;
3090 case 39:
3091 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
3092 ptr = ctx->ParseMessage(_internal_mutable_buffer_transform(), ptr);
3093 CHK_(ptr);
3094 } else {
3095 goto handle_unusual;
3096 }
3097 continue;
3098 // optional int32 effective_scaling_mode = 40;
3099 case 40:
3100 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
3101 _Internal::set_has_effective_scaling_mode(&_impl_._has_bits_);
3102 _impl_.effective_scaling_mode_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3103 CHK_(ptr);
3104 } else {
3105 goto handle_unusual;
3106 }
3107 continue;
3108 // optional float corner_radius = 41;
3109 case 41:
3110 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 77)) {
3111 _Internal::set_has_corner_radius(&_impl_._has_bits_);
3112 _impl_.corner_radius_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
3113 ptr += sizeof(float);
3114 } else {
3115 goto handle_unusual;
3116 }
3117 continue;
3118 // map<int32, string> metadata = 42;
3119 case 42:
3120 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
3121 ptr -= 2;
3122 do {
3123 ptr += 2;
3124 ptr = ctx->ParseMessage(&_impl_.metadata_, ptr);
3125 CHK_(ptr);
3126 if (!ctx->DataAvailable(ptr)) break;
3127 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<338>(ptr));
3128 } else {
3129 goto handle_unusual;
3130 }
3131 continue;
3132 // optional .perfetto.protos.TransformProto effective_transform = 43;
3133 case 43:
3134 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
3135 ptr = ctx->ParseMessage(_internal_mutable_effective_transform(), ptr);
3136 CHK_(ptr);
3137 } else {
3138 goto handle_unusual;
3139 }
3140 continue;
3141 // optional .perfetto.protos.FloatRectProto source_bounds = 44;
3142 case 44:
3143 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 98)) {
3144 ptr = ctx->ParseMessage(_internal_mutable_source_bounds(), ptr);
3145 CHK_(ptr);
3146 } else {
3147 goto handle_unusual;
3148 }
3149 continue;
3150 // optional .perfetto.protos.FloatRectProto bounds = 45;
3151 case 45:
3152 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 106)) {
3153 ptr = ctx->ParseMessage(_internal_mutable_bounds(), ptr);
3154 CHK_(ptr);
3155 } else {
3156 goto handle_unusual;
3157 }
3158 continue;
3159 // optional .perfetto.protos.FloatRectProto screen_bounds = 46;
3160 case 46:
3161 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 114)) {
3162 ptr = ctx->ParseMessage(_internal_mutable_screen_bounds(), ptr);
3163 CHK_(ptr);
3164 } else {
3165 goto handle_unusual;
3166 }
3167 continue;
3168 // optional .perfetto.protos.InputWindowInfoProto input_window_info = 47;
3169 case 47:
3170 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 122)) {
3171 ptr = ctx->ParseMessage(_internal_mutable_input_window_info(), ptr);
3172 CHK_(ptr);
3173 } else {
3174 goto handle_unusual;
3175 }
3176 continue;
3177 // optional .perfetto.protos.FloatRectProto corner_radius_crop = 48;
3178 case 48:
3179 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 130)) {
3180 ptr = ctx->ParseMessage(_internal_mutable_corner_radius_crop(), ptr);
3181 CHK_(ptr);
3182 } else {
3183 goto handle_unusual;
3184 }
3185 continue;
3186 // optional float shadow_radius = 49;
3187 case 49:
3188 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 141)) {
3189 _Internal::set_has_shadow_radius(&_impl_._has_bits_);
3190 _impl_.shadow_radius_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
3191 ptr += sizeof(float);
3192 } else {
3193 goto handle_unusual;
3194 }
3195 continue;
3196 // optional .perfetto.protos.ColorTransformProto color_transform = 50;
3197 case 50:
3198 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 146)) {
3199 ptr = ctx->ParseMessage(_internal_mutable_color_transform(), ptr);
3200 CHK_(ptr);
3201 } else {
3202 goto handle_unusual;
3203 }
3204 continue;
3205 // optional bool is_relative_of = 51;
3206 case 51:
3207 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 152)) {
3208 _Internal::set_has_is_relative_of(&_impl_._has_bits_);
3209 _impl_.is_relative_of_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3210 CHK_(ptr);
3211 } else {
3212 goto handle_unusual;
3213 }
3214 continue;
3215 // optional int32 background_blur_radius = 52;
3216 case 52:
3217 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 160)) {
3218 _Internal::set_has_background_blur_radius(&_impl_._has_bits_);
3219 _impl_.background_blur_radius_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3220 CHK_(ptr);
3221 } else {
3222 goto handle_unusual;
3223 }
3224 continue;
3225 // optional uint32 owner_uid = 53;
3226 case 53:
3227 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 168)) {
3228 _Internal::set_has_owner_uid(&_impl_._has_bits_);
3229 _impl_.owner_uid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3230 CHK_(ptr);
3231 } else {
3232 goto handle_unusual;
3233 }
3234 continue;
3235 // repeated .perfetto.protos.BlurRegion blur_regions = 54;
3236 case 54:
3237 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 178)) {
3238 ptr -= 2;
3239 do {
3240 ptr += 2;
3241 ptr = ctx->ParseMessage(_internal_add_blur_regions(), ptr);
3242 CHK_(ptr);
3243 if (!ctx->DataAvailable(ptr)) break;
3244 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<434>(ptr));
3245 } else {
3246 goto handle_unusual;
3247 }
3248 continue;
3249 // optional bool is_trusted_overlay = 55;
3250 case 55:
3251 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 184)) {
3252 _Internal::set_has_is_trusted_overlay(&_impl_._has_bits_);
3253 _impl_.is_trusted_overlay_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3254 CHK_(ptr);
3255 } else {
3256 goto handle_unusual;
3257 }
3258 continue;
3259 // optional float requested_corner_radius = 56;
3260 case 56:
3261 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 197)) {
3262 _Internal::set_has_requested_corner_radius(&_impl_._has_bits_);
3263 _impl_.requested_corner_radius_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
3264 ptr += sizeof(float);
3265 } else {
3266 goto handle_unusual;
3267 }
3268 continue;
3269 // optional .perfetto.protos.RectProto destination_frame = 57;
3270 case 57:
3271 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 202)) {
3272 ptr = ctx->ParseMessage(_internal_mutable_destination_frame(), ptr);
3273 CHK_(ptr);
3274 } else {
3275 goto handle_unusual;
3276 }
3277 continue;
3278 // optional uint32 original_id = 58;
3279 case 58:
3280 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 208)) {
3281 _Internal::set_has_original_id(&_impl_._has_bits_);
3282 _impl_.original_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3283 CHK_(ptr);
3284 } else {
3285 goto handle_unusual;
3286 }
3287 continue;
3288 // optional .perfetto.protos.TrustedOverlay trusted_overlay = 59;
3289 case 59:
3290 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 216)) {
3291 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3292 CHK_(ptr);
3293 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::TrustedOverlay_IsValid(val))) {
3294 _internal_set_trusted_overlay(static_cast<::perfetto::protos::TrustedOverlay>(val));
3295 } else {
3296 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(59, val, mutable_unknown_fields());
3297 }
3298 } else {
3299 goto handle_unusual;
3300 }
3301 continue;
3302 default:
3303 goto handle_unusual;
3304 } // switch
3305 handle_unusual:
3306 if ((tag == 0) || ((tag & 7) == 4)) {
3307 CHK_(ptr);
3308 ctx->SetLastTag(tag);
3309 goto message_done;
3310 }
3311 ptr = UnknownFieldParse(
3312 tag,
3313 _internal_metadata_.mutable_unknown_fields<std::string>(),
3314 ptr, ctx);
3315 CHK_(ptr != nullptr);
3316 } // while
3317 message_done:
3318 return ptr;
3319 failure:
3320 ptr = nullptr;
3321 goto message_done;
3322 #undef CHK_
3323 }
3324
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3325 ::uint8_t* LayerProto::_InternalSerialize(
3326 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3327 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.LayerProto)
3328 ::uint32_t cached_has_bits = 0;
3329 (void) cached_has_bits;
3330
3331 cached_has_bits = _impl_._has_bits_[0];
3332 // optional int32 id = 1;
3333 if (cached_has_bits & 0x10000000u) {
3334 target = stream->EnsureSpace(target);
3335 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_id(), target);
3336 }
3337
3338 // optional string name = 2;
3339 if (cached_has_bits & 0x00000001u) {
3340 target = stream->WriteStringMaybeAliased(
3341 2, this->_internal_name(), target);
3342 }
3343
3344 // repeated int32 children = 3 [packed = true];
3345 {
3346 int byte_size = _impl_._children_cached_byte_size_.load(std::memory_order_relaxed);
3347 if (byte_size > 0) {
3348 target = stream->WriteInt32Packed(
3349 3, _internal_children(), byte_size, target);
3350 }
3351 }
3352
3353 // repeated int32 relatives = 4 [packed = true];
3354 {
3355 int byte_size = _impl_._relatives_cached_byte_size_.load(std::memory_order_relaxed);
3356 if (byte_size > 0) {
3357 target = stream->WriteInt32Packed(
3358 4, _internal_relatives(), byte_size, target);
3359 }
3360 }
3361
3362 // optional string type = 5;
3363 if (cached_has_bits & 0x00000002u) {
3364 target = stream->WriteStringMaybeAliased(
3365 5, this->_internal_type(), target);
3366 }
3367
3368 // optional .perfetto.protos.RegionProto transparent_region = 6;
3369 if (cached_has_bits & 0x00000010u) {
3370 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3371 InternalWriteMessage(6, _Internal::transparent_region(this),
3372 _Internal::transparent_region(this).GetCachedSize(), target, stream);
3373 }
3374
3375 // optional .perfetto.protos.RegionProto visible_region = 7;
3376 if (cached_has_bits & 0x00000020u) {
3377 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3378 InternalWriteMessage(7, _Internal::visible_region(this),
3379 _Internal::visible_region(this).GetCachedSize(), target, stream);
3380 }
3381
3382 // optional .perfetto.protos.RegionProto damage_region = 8;
3383 if (cached_has_bits & 0x00000040u) {
3384 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3385 InternalWriteMessage(8, _Internal::damage_region(this),
3386 _Internal::damage_region(this).GetCachedSize(), target, stream);
3387 }
3388
3389 // optional uint32 layer_stack = 9;
3390 if (cached_has_bits & 0x20000000u) {
3391 target = stream->EnsureSpace(target);
3392 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(9, this->_internal_layer_stack(), target);
3393 }
3394
3395 // optional int32 z = 10;
3396 if (cached_has_bits & 0x40000000u) {
3397 target = stream->EnsureSpace(target);
3398 target = ::_pbi::WireFormatLite::WriteInt32ToArray(10, this->_internal_z(), target);
3399 }
3400
3401 // optional .perfetto.protos.PositionProto position = 11;
3402 if (cached_has_bits & 0x00000080u) {
3403 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3404 InternalWriteMessage(11, _Internal::position(this),
3405 _Internal::position(this).GetCachedSize(), target, stream);
3406 }
3407
3408 // optional .perfetto.protos.PositionProto requested_position = 12;
3409 if (cached_has_bits & 0x00000100u) {
3410 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3411 InternalWriteMessage(12, _Internal::requested_position(this),
3412 _Internal::requested_position(this).GetCachedSize(), target, stream);
3413 }
3414
3415 // optional .perfetto.protos.SizeProto size = 13;
3416 if (cached_has_bits & 0x00000200u) {
3417 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3418 InternalWriteMessage(13, _Internal::size(this),
3419 _Internal::size(this).GetCachedSize(), target, stream);
3420 }
3421
3422 // optional .perfetto.protos.RectProto crop = 14;
3423 if (cached_has_bits & 0x00000400u) {
3424 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3425 InternalWriteMessage(14, _Internal::crop(this),
3426 _Internal::crop(this).GetCachedSize(), target, stream);
3427 }
3428
3429 // optional .perfetto.protos.RectProto final_crop = 15 [deprecated = true];
3430 if (cached_has_bits & 0x00000800u) {
3431 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3432 InternalWriteMessage(15, _Internal::final_crop(this),
3433 _Internal::final_crop(this).GetCachedSize(), target, stream);
3434 }
3435
3436 cached_has_bits = _impl_._has_bits_[1];
3437 // optional bool is_opaque = 16;
3438 if (cached_has_bits & 0x00000001u) {
3439 target = stream->EnsureSpace(target);
3440 target = ::_pbi::WireFormatLite::WriteBoolToArray(16, this->_internal_is_opaque(), target);
3441 }
3442
3443 // optional bool invalidate = 17;
3444 if (cached_has_bits & 0x00000002u) {
3445 target = stream->EnsureSpace(target);
3446 target = ::_pbi::WireFormatLite::WriteBoolToArray(17, this->_internal_invalidate(), target);
3447 }
3448
3449 cached_has_bits = _impl_._has_bits_[0];
3450 // optional string dataspace = 18;
3451 if (cached_has_bits & 0x00000004u) {
3452 target = stream->WriteStringMaybeAliased(
3453 18, this->_internal_dataspace(), target);
3454 }
3455
3456 // optional string pixel_format = 19;
3457 if (cached_has_bits & 0x00000008u) {
3458 target = stream->WriteStringMaybeAliased(
3459 19, this->_internal_pixel_format(), target);
3460 }
3461
3462 // optional .perfetto.protos.ColorProto color = 20;
3463 if (cached_has_bits & 0x00001000u) {
3464 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3465 InternalWriteMessage(20, _Internal::color(this),
3466 _Internal::color(this).GetCachedSize(), target, stream);
3467 }
3468
3469 // optional .perfetto.protos.ColorProto requested_color = 21;
3470 if (cached_has_bits & 0x00002000u) {
3471 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3472 InternalWriteMessage(21, _Internal::requested_color(this),
3473 _Internal::requested_color(this).GetCachedSize(), target, stream);
3474 }
3475
3476 // optional uint32 flags = 22;
3477 if (cached_has_bits & 0x80000000u) {
3478 target = stream->EnsureSpace(target);
3479 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(22, this->_internal_flags(), target);
3480 }
3481
3482 // optional .perfetto.protos.TransformProto transform = 23;
3483 if (cached_has_bits & 0x00004000u) {
3484 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3485 InternalWriteMessage(23, _Internal::transform(this),
3486 _Internal::transform(this).GetCachedSize(), target, stream);
3487 }
3488
3489 // optional .perfetto.protos.TransformProto requested_transform = 24;
3490 if (cached_has_bits & 0x00008000u) {
3491 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3492 InternalWriteMessage(24, _Internal::requested_transform(this),
3493 _Internal::requested_transform(this).GetCachedSize(), target, stream);
3494 }
3495
3496 cached_has_bits = _impl_._has_bits_[1];
3497 // optional int32 parent = 25;
3498 if (cached_has_bits & 0x00000010u) {
3499 target = stream->EnsureSpace(target);
3500 target = ::_pbi::WireFormatLite::WriteInt32ToArray(25, this->_internal_parent(), target);
3501 }
3502
3503 // optional int32 z_order_relative_of = 26;
3504 if (cached_has_bits & 0x00000020u) {
3505 target = stream->EnsureSpace(target);
3506 target = ::_pbi::WireFormatLite::WriteInt32ToArray(26, this->_internal_z_order_relative_of(), target);
3507 }
3508
3509 cached_has_bits = _impl_._has_bits_[0];
3510 // optional .perfetto.protos.ActiveBufferProto active_buffer = 27;
3511 if (cached_has_bits & 0x00010000u) {
3512 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3513 InternalWriteMessage(27, _Internal::active_buffer(this),
3514 _Internal::active_buffer(this).GetCachedSize(), target, stream);
3515 }
3516
3517 cached_has_bits = _impl_._has_bits_[1];
3518 // optional int32 queued_frames = 28;
3519 if (cached_has_bits & 0x00000040u) {
3520 target = stream->EnsureSpace(target);
3521 target = ::_pbi::WireFormatLite::WriteInt32ToArray(28, this->_internal_queued_frames(), target);
3522 }
3523
3524 // optional bool refresh_pending = 29;
3525 if (cached_has_bits & 0x00000004u) {
3526 target = stream->EnsureSpace(target);
3527 target = ::_pbi::WireFormatLite::WriteBoolToArray(29, this->_internal_refresh_pending(), target);
3528 }
3529
3530 cached_has_bits = _impl_._has_bits_[0];
3531 // optional .perfetto.protos.RectProto hwc_frame = 30;
3532 if (cached_has_bits & 0x00020000u) {
3533 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3534 InternalWriteMessage(30, _Internal::hwc_frame(this),
3535 _Internal::hwc_frame(this).GetCachedSize(), target, stream);
3536 }
3537
3538 // optional .perfetto.protos.FloatRectProto hwc_crop = 31;
3539 if (cached_has_bits & 0x00040000u) {
3540 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3541 InternalWriteMessage(31, _Internal::hwc_crop(this),
3542 _Internal::hwc_crop(this).GetCachedSize(), target, stream);
3543 }
3544
3545 cached_has_bits = _impl_._has_bits_[1];
3546 // optional int32 hwc_transform = 32;
3547 if (cached_has_bits & 0x00000080u) {
3548 target = stream->EnsureSpace(target);
3549 target = ::_pbi::WireFormatLite::WriteInt32ToArray(32, this->_internal_hwc_transform(), target);
3550 }
3551
3552 // optional int32 window_type = 33 [deprecated = true];
3553 if (cached_has_bits & 0x00000100u) {
3554 target = stream->EnsureSpace(target);
3555 target = ::_pbi::WireFormatLite::WriteInt32ToArray(33, this->_internal_window_type(), target);
3556 }
3557
3558 // optional int32 app_id = 34 [deprecated = true];
3559 if (cached_has_bits & 0x00000200u) {
3560 target = stream->EnsureSpace(target);
3561 target = ::_pbi::WireFormatLite::WriteInt32ToArray(34, this->_internal_app_id(), target);
3562 }
3563
3564 // optional .perfetto.protos.HwcCompositionType hwc_composition_type = 35;
3565 if (cached_has_bits & 0x00000400u) {
3566 target = stream->EnsureSpace(target);
3567 target = ::_pbi::WireFormatLite::WriteEnumToArray(
3568 35, this->_internal_hwc_composition_type(), target);
3569 }
3570
3571 // optional bool is_protected = 36;
3572 if (cached_has_bits & 0x00000008u) {
3573 target = stream->EnsureSpace(target);
3574 target = ::_pbi::WireFormatLite::WriteBoolToArray(36, this->_internal_is_protected(), target);
3575 }
3576
3577 // optional uint64 curr_frame = 37;
3578 if (cached_has_bits & 0x00000800u) {
3579 target = stream->EnsureSpace(target);
3580 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(37, this->_internal_curr_frame(), target);
3581 }
3582
3583 // repeated .perfetto.protos.BarrierLayerProto barrier_layer = 38;
3584 for (unsigned i = 0,
3585 n = static_cast<unsigned>(this->_internal_barrier_layer_size()); i < n; i++) {
3586 const auto& repfield = this->_internal_barrier_layer(i);
3587 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3588 InternalWriteMessage(38, repfield, repfield.GetCachedSize(), target, stream);
3589 }
3590
3591 cached_has_bits = _impl_._has_bits_[0];
3592 // optional .perfetto.protos.TransformProto buffer_transform = 39;
3593 if (cached_has_bits & 0x00080000u) {
3594 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3595 InternalWriteMessage(39, _Internal::buffer_transform(this),
3596 _Internal::buffer_transform(this).GetCachedSize(), target, stream);
3597 }
3598
3599 cached_has_bits = _impl_._has_bits_[1];
3600 // optional int32 effective_scaling_mode = 40;
3601 if (cached_has_bits & 0x00001000u) {
3602 target = stream->EnsureSpace(target);
3603 target = ::_pbi::WireFormatLite::WriteInt32ToArray(40, this->_internal_effective_scaling_mode(), target);
3604 }
3605
3606 // optional float corner_radius = 41;
3607 if (cached_has_bits & 0x00002000u) {
3608 target = stream->EnsureSpace(target);
3609 target = ::_pbi::WireFormatLite::WriteFloatToArray(41, this->_internal_corner_radius(), target);
3610 }
3611
3612 // map<int32, string> metadata = 42;
3613 if (!this->_internal_metadata().empty()) {
3614 using MapType = ::_pb::Map<::int32_t, std::string>;
3615 using WireHelper = LayerProto_MetadataEntry_DoNotUse::Funcs;
3616 const auto& map_field = this->_internal_metadata();
3617 auto check_utf8 = [](const MapType::value_type& entry) {
3618 (void)entry;
3619 };
3620
3621 if (stream->IsSerializationDeterministic() && map_field.size() > 1) {
3622 for (const auto& entry : ::_pbi::MapSorterFlat<MapType>(map_field)) {
3623 target = WireHelper::InternalSerialize(42, entry.first, entry.second, target, stream);
3624 check_utf8(entry);
3625 }
3626 } else {
3627 for (const auto& entry : map_field) {
3628 target = WireHelper::InternalSerialize(42, entry.first, entry.second, target, stream);
3629 check_utf8(entry);
3630 }
3631 }
3632 }
3633
3634 cached_has_bits = _impl_._has_bits_[0];
3635 // optional .perfetto.protos.TransformProto effective_transform = 43;
3636 if (cached_has_bits & 0x00100000u) {
3637 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3638 InternalWriteMessage(43, _Internal::effective_transform(this),
3639 _Internal::effective_transform(this).GetCachedSize(), target, stream);
3640 }
3641
3642 // optional .perfetto.protos.FloatRectProto source_bounds = 44;
3643 if (cached_has_bits & 0x00200000u) {
3644 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3645 InternalWriteMessage(44, _Internal::source_bounds(this),
3646 _Internal::source_bounds(this).GetCachedSize(), target, stream);
3647 }
3648
3649 // optional .perfetto.protos.FloatRectProto bounds = 45;
3650 if (cached_has_bits & 0x00400000u) {
3651 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3652 InternalWriteMessage(45, _Internal::bounds(this),
3653 _Internal::bounds(this).GetCachedSize(), target, stream);
3654 }
3655
3656 // optional .perfetto.protos.FloatRectProto screen_bounds = 46;
3657 if (cached_has_bits & 0x00800000u) {
3658 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3659 InternalWriteMessage(46, _Internal::screen_bounds(this),
3660 _Internal::screen_bounds(this).GetCachedSize(), target, stream);
3661 }
3662
3663 // optional .perfetto.protos.InputWindowInfoProto input_window_info = 47;
3664 if (cached_has_bits & 0x01000000u) {
3665 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3666 InternalWriteMessage(47, _Internal::input_window_info(this),
3667 _Internal::input_window_info(this).GetCachedSize(), target, stream);
3668 }
3669
3670 // optional .perfetto.protos.FloatRectProto corner_radius_crop = 48;
3671 if (cached_has_bits & 0x02000000u) {
3672 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3673 InternalWriteMessage(48, _Internal::corner_radius_crop(this),
3674 _Internal::corner_radius_crop(this).GetCachedSize(), target, stream);
3675 }
3676
3677 cached_has_bits = _impl_._has_bits_[1];
3678 // optional float shadow_radius = 49;
3679 if (cached_has_bits & 0x00004000u) {
3680 target = stream->EnsureSpace(target);
3681 target = ::_pbi::WireFormatLite::WriteFloatToArray(49, this->_internal_shadow_radius(), target);
3682 }
3683
3684 cached_has_bits = _impl_._has_bits_[0];
3685 // optional .perfetto.protos.ColorTransformProto color_transform = 50;
3686 if (cached_has_bits & 0x04000000u) {
3687 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3688 InternalWriteMessage(50, _Internal::color_transform(this),
3689 _Internal::color_transform(this).GetCachedSize(), target, stream);
3690 }
3691
3692 cached_has_bits = _impl_._has_bits_[1];
3693 // optional bool is_relative_of = 51;
3694 if (cached_has_bits & 0x00020000u) {
3695 target = stream->EnsureSpace(target);
3696 target = ::_pbi::WireFormatLite::WriteBoolToArray(51, this->_internal_is_relative_of(), target);
3697 }
3698
3699 // optional int32 background_blur_radius = 52;
3700 if (cached_has_bits & 0x00008000u) {
3701 target = stream->EnsureSpace(target);
3702 target = ::_pbi::WireFormatLite::WriteInt32ToArray(52, this->_internal_background_blur_radius(), target);
3703 }
3704
3705 // optional uint32 owner_uid = 53;
3706 if (cached_has_bits & 0x00010000u) {
3707 target = stream->EnsureSpace(target);
3708 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(53, this->_internal_owner_uid(), target);
3709 }
3710
3711 // repeated .perfetto.protos.BlurRegion blur_regions = 54;
3712 for (unsigned i = 0,
3713 n = static_cast<unsigned>(this->_internal_blur_regions_size()); i < n; i++) {
3714 const auto& repfield = this->_internal_blur_regions(i);
3715 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3716 InternalWriteMessage(54, repfield, repfield.GetCachedSize(), target, stream);
3717 }
3718
3719 // optional bool is_trusted_overlay = 55;
3720 if (cached_has_bits & 0x00040000u) {
3721 target = stream->EnsureSpace(target);
3722 target = ::_pbi::WireFormatLite::WriteBoolToArray(55, this->_internal_is_trusted_overlay(), target);
3723 }
3724
3725 // optional float requested_corner_radius = 56;
3726 if (cached_has_bits & 0x00080000u) {
3727 target = stream->EnsureSpace(target);
3728 target = ::_pbi::WireFormatLite::WriteFloatToArray(56, this->_internal_requested_corner_radius(), target);
3729 }
3730
3731 cached_has_bits = _impl_._has_bits_[0];
3732 // optional .perfetto.protos.RectProto destination_frame = 57;
3733 if (cached_has_bits & 0x08000000u) {
3734 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3735 InternalWriteMessage(57, _Internal::destination_frame(this),
3736 _Internal::destination_frame(this).GetCachedSize(), target, stream);
3737 }
3738
3739 cached_has_bits = _impl_._has_bits_[1];
3740 // optional uint32 original_id = 58;
3741 if (cached_has_bits & 0x00100000u) {
3742 target = stream->EnsureSpace(target);
3743 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(58, this->_internal_original_id(), target);
3744 }
3745
3746 // optional .perfetto.protos.TrustedOverlay trusted_overlay = 59;
3747 if (cached_has_bits & 0x00200000u) {
3748 target = stream->EnsureSpace(target);
3749 target = ::_pbi::WireFormatLite::WriteEnumToArray(
3750 59, this->_internal_trusted_overlay(), target);
3751 }
3752
3753 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3754 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3755 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3756 }
3757 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.LayerProto)
3758 return target;
3759 }
3760
ByteSizeLong() const3761 size_t LayerProto::ByteSizeLong() const {
3762 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.LayerProto)
3763 size_t total_size = 0;
3764
3765 ::uint32_t cached_has_bits = 0;
3766 // Prevent compiler warnings about cached_has_bits being unused
3767 (void) cached_has_bits;
3768
3769 // repeated int32 children = 3 [packed = true];
3770 {
3771 size_t data_size = ::_pbi::WireFormatLite::
3772 Int32Size(this->_impl_.children_);
3773 if (data_size > 0) {
3774 total_size += 1 +
3775 ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
3776 }
3777 int cached_size = ::_pbi::ToCachedSize(data_size);
3778 _impl_._children_cached_byte_size_.store(cached_size,
3779 std::memory_order_relaxed);
3780 total_size += data_size;
3781 }
3782
3783 // repeated int32 relatives = 4 [packed = true];
3784 {
3785 size_t data_size = ::_pbi::WireFormatLite::
3786 Int32Size(this->_impl_.relatives_);
3787 if (data_size > 0) {
3788 total_size += 1 +
3789 ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
3790 }
3791 int cached_size = ::_pbi::ToCachedSize(data_size);
3792 _impl_._relatives_cached_byte_size_.store(cached_size,
3793 std::memory_order_relaxed);
3794 total_size += data_size;
3795 }
3796
3797 // repeated .perfetto.protos.BarrierLayerProto barrier_layer = 38;
3798 total_size += 2UL * this->_internal_barrier_layer_size();
3799 for (const auto& msg : this->_impl_.barrier_layer_) {
3800 total_size +=
3801 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
3802 }
3803
3804 // map<int32, string> metadata = 42;
3805 total_size += 2 *
3806 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_metadata_size());
3807 for (::PROTOBUF_NAMESPACE_ID::Map< ::int32_t, std::string >::const_iterator
3808 it = this->_internal_metadata().begin();
3809 it != this->_internal_metadata().end(); ++it) {
3810 total_size += LayerProto_MetadataEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
3811 }
3812
3813 // repeated .perfetto.protos.BlurRegion blur_regions = 54;
3814 total_size += 2UL * this->_internal_blur_regions_size();
3815 for (const auto& msg : this->_impl_.blur_regions_) {
3816 total_size +=
3817 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
3818 }
3819
3820 cached_has_bits = _impl_._has_bits_[0];
3821 if (cached_has_bits & 0x000000ffu) {
3822 // optional string name = 2;
3823 if (cached_has_bits & 0x00000001u) {
3824 total_size += 1 +
3825 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3826 this->_internal_name());
3827 }
3828
3829 // optional string type = 5;
3830 if (cached_has_bits & 0x00000002u) {
3831 total_size += 1 +
3832 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3833 this->_internal_type());
3834 }
3835
3836 // optional string dataspace = 18;
3837 if (cached_has_bits & 0x00000004u) {
3838 total_size += 2 +
3839 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3840 this->_internal_dataspace());
3841 }
3842
3843 // optional string pixel_format = 19;
3844 if (cached_has_bits & 0x00000008u) {
3845 total_size += 2 +
3846 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3847 this->_internal_pixel_format());
3848 }
3849
3850 // optional .perfetto.protos.RegionProto transparent_region = 6;
3851 if (cached_has_bits & 0x00000010u) {
3852 total_size += 1 +
3853 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3854 *_impl_.transparent_region_);
3855 }
3856
3857 // optional .perfetto.protos.RegionProto visible_region = 7;
3858 if (cached_has_bits & 0x00000020u) {
3859 total_size += 1 +
3860 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3861 *_impl_.visible_region_);
3862 }
3863
3864 // optional .perfetto.protos.RegionProto damage_region = 8;
3865 if (cached_has_bits & 0x00000040u) {
3866 total_size += 1 +
3867 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3868 *_impl_.damage_region_);
3869 }
3870
3871 // optional .perfetto.protos.PositionProto position = 11;
3872 if (cached_has_bits & 0x00000080u) {
3873 total_size += 1 +
3874 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3875 *_impl_.position_);
3876 }
3877
3878 }
3879 if (cached_has_bits & 0x0000ff00u) {
3880 // optional .perfetto.protos.PositionProto requested_position = 12;
3881 if (cached_has_bits & 0x00000100u) {
3882 total_size += 1 +
3883 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3884 *_impl_.requested_position_);
3885 }
3886
3887 // optional .perfetto.protos.SizeProto size = 13;
3888 if (cached_has_bits & 0x00000200u) {
3889 total_size += 1 +
3890 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3891 *_impl_.size_);
3892 }
3893
3894 // optional .perfetto.protos.RectProto crop = 14;
3895 if (cached_has_bits & 0x00000400u) {
3896 total_size += 1 +
3897 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3898 *_impl_.crop_);
3899 }
3900
3901 // optional .perfetto.protos.RectProto final_crop = 15 [deprecated = true];
3902 if (cached_has_bits & 0x00000800u) {
3903 total_size += 1 +
3904 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3905 *_impl_.final_crop_);
3906 }
3907
3908 // optional .perfetto.protos.ColorProto color = 20;
3909 if (cached_has_bits & 0x00001000u) {
3910 total_size += 2 +
3911 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3912 *_impl_.color_);
3913 }
3914
3915 // optional .perfetto.protos.ColorProto requested_color = 21;
3916 if (cached_has_bits & 0x00002000u) {
3917 total_size += 2 +
3918 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3919 *_impl_.requested_color_);
3920 }
3921
3922 // optional .perfetto.protos.TransformProto transform = 23;
3923 if (cached_has_bits & 0x00004000u) {
3924 total_size += 2 +
3925 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3926 *_impl_.transform_);
3927 }
3928
3929 // optional .perfetto.protos.TransformProto requested_transform = 24;
3930 if (cached_has_bits & 0x00008000u) {
3931 total_size += 2 +
3932 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3933 *_impl_.requested_transform_);
3934 }
3935
3936 }
3937 if (cached_has_bits & 0x00ff0000u) {
3938 // optional .perfetto.protos.ActiveBufferProto active_buffer = 27;
3939 if (cached_has_bits & 0x00010000u) {
3940 total_size += 2 +
3941 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3942 *_impl_.active_buffer_);
3943 }
3944
3945 // optional .perfetto.protos.RectProto hwc_frame = 30;
3946 if (cached_has_bits & 0x00020000u) {
3947 total_size += 2 +
3948 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3949 *_impl_.hwc_frame_);
3950 }
3951
3952 // optional .perfetto.protos.FloatRectProto hwc_crop = 31;
3953 if (cached_has_bits & 0x00040000u) {
3954 total_size += 2 +
3955 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3956 *_impl_.hwc_crop_);
3957 }
3958
3959 // optional .perfetto.protos.TransformProto buffer_transform = 39;
3960 if (cached_has_bits & 0x00080000u) {
3961 total_size += 2 +
3962 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3963 *_impl_.buffer_transform_);
3964 }
3965
3966 // optional .perfetto.protos.TransformProto effective_transform = 43;
3967 if (cached_has_bits & 0x00100000u) {
3968 total_size += 2 +
3969 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3970 *_impl_.effective_transform_);
3971 }
3972
3973 // optional .perfetto.protos.FloatRectProto source_bounds = 44;
3974 if (cached_has_bits & 0x00200000u) {
3975 total_size += 2 +
3976 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3977 *_impl_.source_bounds_);
3978 }
3979
3980 // optional .perfetto.protos.FloatRectProto bounds = 45;
3981 if (cached_has_bits & 0x00400000u) {
3982 total_size += 2 +
3983 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3984 *_impl_.bounds_);
3985 }
3986
3987 // optional .perfetto.protos.FloatRectProto screen_bounds = 46;
3988 if (cached_has_bits & 0x00800000u) {
3989 total_size += 2 +
3990 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3991 *_impl_.screen_bounds_);
3992 }
3993
3994 }
3995 if (cached_has_bits & 0xff000000u) {
3996 // optional .perfetto.protos.InputWindowInfoProto input_window_info = 47;
3997 if (cached_has_bits & 0x01000000u) {
3998 total_size += 2 +
3999 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
4000 *_impl_.input_window_info_);
4001 }
4002
4003 // optional .perfetto.protos.FloatRectProto corner_radius_crop = 48;
4004 if (cached_has_bits & 0x02000000u) {
4005 total_size += 2 +
4006 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
4007 *_impl_.corner_radius_crop_);
4008 }
4009
4010 // optional .perfetto.protos.ColorTransformProto color_transform = 50;
4011 if (cached_has_bits & 0x04000000u) {
4012 total_size += 2 +
4013 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
4014 *_impl_.color_transform_);
4015 }
4016
4017 // optional .perfetto.protos.RectProto destination_frame = 57;
4018 if (cached_has_bits & 0x08000000u) {
4019 total_size += 2 +
4020 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
4021 *_impl_.destination_frame_);
4022 }
4023
4024 // optional int32 id = 1;
4025 if (cached_has_bits & 0x10000000u) {
4026 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_id());
4027 }
4028
4029 // optional uint32 layer_stack = 9;
4030 if (cached_has_bits & 0x20000000u) {
4031 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_layer_stack());
4032 }
4033
4034 // optional int32 z = 10;
4035 if (cached_has_bits & 0x40000000u) {
4036 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_z());
4037 }
4038
4039 // optional uint32 flags = 22;
4040 if (cached_has_bits & 0x80000000u) {
4041 total_size += 2 +
4042 ::_pbi::WireFormatLite::UInt32Size(
4043 this->_internal_flags());
4044 }
4045
4046 }
4047 cached_has_bits = _impl_._has_bits_[1];
4048 if (cached_has_bits & 0x000000ffu) {
4049 // optional bool is_opaque = 16;
4050 if (cached_has_bits & 0x00000001u) {
4051 total_size += 2 + 1;
4052 }
4053
4054 // optional bool invalidate = 17;
4055 if (cached_has_bits & 0x00000002u) {
4056 total_size += 2 + 1;
4057 }
4058
4059 // optional bool refresh_pending = 29;
4060 if (cached_has_bits & 0x00000004u) {
4061 total_size += 2 + 1;
4062 }
4063
4064 // optional bool is_protected = 36;
4065 if (cached_has_bits & 0x00000008u) {
4066 total_size += 2 + 1;
4067 }
4068
4069 // optional int32 parent = 25;
4070 if (cached_has_bits & 0x00000010u) {
4071 total_size += 2 +
4072 ::_pbi::WireFormatLite::Int32Size(
4073 this->_internal_parent());
4074 }
4075
4076 // optional int32 z_order_relative_of = 26;
4077 if (cached_has_bits & 0x00000020u) {
4078 total_size += 2 +
4079 ::_pbi::WireFormatLite::Int32Size(
4080 this->_internal_z_order_relative_of());
4081 }
4082
4083 // optional int32 queued_frames = 28;
4084 if (cached_has_bits & 0x00000040u) {
4085 total_size += 2 +
4086 ::_pbi::WireFormatLite::Int32Size(
4087 this->_internal_queued_frames());
4088 }
4089
4090 // optional int32 hwc_transform = 32;
4091 if (cached_has_bits & 0x00000080u) {
4092 total_size += 2 +
4093 ::_pbi::WireFormatLite::Int32Size(
4094 this->_internal_hwc_transform());
4095 }
4096
4097 }
4098 if (cached_has_bits & 0x0000ff00u) {
4099 // optional int32 window_type = 33 [deprecated = true];
4100 if (cached_has_bits & 0x00000100u) {
4101 total_size += 2 +
4102 ::_pbi::WireFormatLite::Int32Size(
4103 this->_internal_window_type());
4104 }
4105
4106 // optional int32 app_id = 34 [deprecated = true];
4107 if (cached_has_bits & 0x00000200u) {
4108 total_size += 2 +
4109 ::_pbi::WireFormatLite::Int32Size(
4110 this->_internal_app_id());
4111 }
4112
4113 // optional .perfetto.protos.HwcCompositionType hwc_composition_type = 35;
4114 if (cached_has_bits & 0x00000400u) {
4115 total_size += 2 +
4116 ::_pbi::WireFormatLite::EnumSize(this->_internal_hwc_composition_type());
4117 }
4118
4119 // optional uint64 curr_frame = 37;
4120 if (cached_has_bits & 0x00000800u) {
4121 total_size += 2 +
4122 ::_pbi::WireFormatLite::UInt64Size(
4123 this->_internal_curr_frame());
4124 }
4125
4126 // optional int32 effective_scaling_mode = 40;
4127 if (cached_has_bits & 0x00001000u) {
4128 total_size += 2 +
4129 ::_pbi::WireFormatLite::Int32Size(
4130 this->_internal_effective_scaling_mode());
4131 }
4132
4133 // optional float corner_radius = 41;
4134 if (cached_has_bits & 0x00002000u) {
4135 total_size += 2 + 4;
4136 }
4137
4138 // optional float shadow_radius = 49;
4139 if (cached_has_bits & 0x00004000u) {
4140 total_size += 2 + 4;
4141 }
4142
4143 // optional int32 background_blur_radius = 52;
4144 if (cached_has_bits & 0x00008000u) {
4145 total_size += 2 +
4146 ::_pbi::WireFormatLite::Int32Size(
4147 this->_internal_background_blur_radius());
4148 }
4149
4150 }
4151 if (cached_has_bits & 0x003f0000u) {
4152 // optional uint32 owner_uid = 53;
4153 if (cached_has_bits & 0x00010000u) {
4154 total_size += 2 +
4155 ::_pbi::WireFormatLite::UInt32Size(
4156 this->_internal_owner_uid());
4157 }
4158
4159 // optional bool is_relative_of = 51;
4160 if (cached_has_bits & 0x00020000u) {
4161 total_size += 2 + 1;
4162 }
4163
4164 // optional bool is_trusted_overlay = 55;
4165 if (cached_has_bits & 0x00040000u) {
4166 total_size += 2 + 1;
4167 }
4168
4169 // optional float requested_corner_radius = 56;
4170 if (cached_has_bits & 0x00080000u) {
4171 total_size += 2 + 4;
4172 }
4173
4174 // optional uint32 original_id = 58;
4175 if (cached_has_bits & 0x00100000u) {
4176 total_size += 2 +
4177 ::_pbi::WireFormatLite::UInt32Size(
4178 this->_internal_original_id());
4179 }
4180
4181 // optional .perfetto.protos.TrustedOverlay trusted_overlay = 59;
4182 if (cached_has_bits & 0x00200000u) {
4183 total_size += 2 +
4184 ::_pbi::WireFormatLite::EnumSize(this->_internal_trusted_overlay());
4185 }
4186
4187 }
4188 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4189 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4190 }
4191 int cached_size = ::_pbi::ToCachedSize(total_size);
4192 SetCachedSize(cached_size);
4193 return total_size;
4194 }
4195
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4196 void LayerProto::CheckTypeAndMergeFrom(
4197 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4198 MergeFrom(*::_pbi::DownCast<const LayerProto*>(
4199 &from));
4200 }
4201
MergeFrom(const LayerProto & from)4202 void LayerProto::MergeFrom(const LayerProto& from) {
4203 LayerProto* const _this = this;
4204 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.LayerProto)
4205 GOOGLE_DCHECK_NE(&from, _this);
4206 ::uint32_t cached_has_bits = 0;
4207 (void) cached_has_bits;
4208
4209 _this->_impl_.children_.MergeFrom(from._impl_.children_);
4210 _this->_impl_.relatives_.MergeFrom(from._impl_.relatives_);
4211 _this->_impl_.barrier_layer_.MergeFrom(from._impl_.barrier_layer_);
4212 _this->_impl_.metadata_.MergeFrom(from._impl_.metadata_);
4213 _this->_impl_.blur_regions_.MergeFrom(from._impl_.blur_regions_);
4214 cached_has_bits = from._impl_._has_bits_[0];
4215 if (cached_has_bits & 0x000000ffu) {
4216 if (cached_has_bits & 0x00000001u) {
4217 _this->_internal_set_name(from._internal_name());
4218 }
4219 if (cached_has_bits & 0x00000002u) {
4220 _this->_internal_set_type(from._internal_type());
4221 }
4222 if (cached_has_bits & 0x00000004u) {
4223 _this->_internal_set_dataspace(from._internal_dataspace());
4224 }
4225 if (cached_has_bits & 0x00000008u) {
4226 _this->_internal_set_pixel_format(from._internal_pixel_format());
4227 }
4228 if (cached_has_bits & 0x00000010u) {
4229 _this->_internal_mutable_transparent_region()->::perfetto::protos::RegionProto::MergeFrom(
4230 from._internal_transparent_region());
4231 }
4232 if (cached_has_bits & 0x00000020u) {
4233 _this->_internal_mutable_visible_region()->::perfetto::protos::RegionProto::MergeFrom(
4234 from._internal_visible_region());
4235 }
4236 if (cached_has_bits & 0x00000040u) {
4237 _this->_internal_mutable_damage_region()->::perfetto::protos::RegionProto::MergeFrom(
4238 from._internal_damage_region());
4239 }
4240 if (cached_has_bits & 0x00000080u) {
4241 _this->_internal_mutable_position()->::perfetto::protos::PositionProto::MergeFrom(
4242 from._internal_position());
4243 }
4244 }
4245 if (cached_has_bits & 0x0000ff00u) {
4246 if (cached_has_bits & 0x00000100u) {
4247 _this->_internal_mutable_requested_position()->::perfetto::protos::PositionProto::MergeFrom(
4248 from._internal_requested_position());
4249 }
4250 if (cached_has_bits & 0x00000200u) {
4251 _this->_internal_mutable_size()->::perfetto::protos::SizeProto::MergeFrom(
4252 from._internal_size());
4253 }
4254 if (cached_has_bits & 0x00000400u) {
4255 _this->_internal_mutable_crop()->::perfetto::protos::RectProto::MergeFrom(
4256 from._internal_crop());
4257 }
4258 if (cached_has_bits & 0x00000800u) {
4259 _this->_internal_mutable_final_crop()->::perfetto::protos::RectProto::MergeFrom(
4260 from._internal_final_crop());
4261 }
4262 if (cached_has_bits & 0x00001000u) {
4263 _this->_internal_mutable_color()->::perfetto::protos::ColorProto::MergeFrom(
4264 from._internal_color());
4265 }
4266 if (cached_has_bits & 0x00002000u) {
4267 _this->_internal_mutable_requested_color()->::perfetto::protos::ColorProto::MergeFrom(
4268 from._internal_requested_color());
4269 }
4270 if (cached_has_bits & 0x00004000u) {
4271 _this->_internal_mutable_transform()->::perfetto::protos::TransformProto::MergeFrom(
4272 from._internal_transform());
4273 }
4274 if (cached_has_bits & 0x00008000u) {
4275 _this->_internal_mutable_requested_transform()->::perfetto::protos::TransformProto::MergeFrom(
4276 from._internal_requested_transform());
4277 }
4278 }
4279 if (cached_has_bits & 0x00ff0000u) {
4280 if (cached_has_bits & 0x00010000u) {
4281 _this->_internal_mutable_active_buffer()->::perfetto::protos::ActiveBufferProto::MergeFrom(
4282 from._internal_active_buffer());
4283 }
4284 if (cached_has_bits & 0x00020000u) {
4285 _this->_internal_mutable_hwc_frame()->::perfetto::protos::RectProto::MergeFrom(
4286 from._internal_hwc_frame());
4287 }
4288 if (cached_has_bits & 0x00040000u) {
4289 _this->_internal_mutable_hwc_crop()->::perfetto::protos::FloatRectProto::MergeFrom(
4290 from._internal_hwc_crop());
4291 }
4292 if (cached_has_bits & 0x00080000u) {
4293 _this->_internal_mutable_buffer_transform()->::perfetto::protos::TransformProto::MergeFrom(
4294 from._internal_buffer_transform());
4295 }
4296 if (cached_has_bits & 0x00100000u) {
4297 _this->_internal_mutable_effective_transform()->::perfetto::protos::TransformProto::MergeFrom(
4298 from._internal_effective_transform());
4299 }
4300 if (cached_has_bits & 0x00200000u) {
4301 _this->_internal_mutable_source_bounds()->::perfetto::protos::FloatRectProto::MergeFrom(
4302 from._internal_source_bounds());
4303 }
4304 if (cached_has_bits & 0x00400000u) {
4305 _this->_internal_mutable_bounds()->::perfetto::protos::FloatRectProto::MergeFrom(
4306 from._internal_bounds());
4307 }
4308 if (cached_has_bits & 0x00800000u) {
4309 _this->_internal_mutable_screen_bounds()->::perfetto::protos::FloatRectProto::MergeFrom(
4310 from._internal_screen_bounds());
4311 }
4312 }
4313 if (cached_has_bits & 0xff000000u) {
4314 if (cached_has_bits & 0x01000000u) {
4315 _this->_internal_mutable_input_window_info()->::perfetto::protos::InputWindowInfoProto::MergeFrom(
4316 from._internal_input_window_info());
4317 }
4318 if (cached_has_bits & 0x02000000u) {
4319 _this->_internal_mutable_corner_radius_crop()->::perfetto::protos::FloatRectProto::MergeFrom(
4320 from._internal_corner_radius_crop());
4321 }
4322 if (cached_has_bits & 0x04000000u) {
4323 _this->_internal_mutable_color_transform()->::perfetto::protos::ColorTransformProto::MergeFrom(
4324 from._internal_color_transform());
4325 }
4326 if (cached_has_bits & 0x08000000u) {
4327 _this->_internal_mutable_destination_frame()->::perfetto::protos::RectProto::MergeFrom(
4328 from._internal_destination_frame());
4329 }
4330 if (cached_has_bits & 0x10000000u) {
4331 _this->_impl_.id_ = from._impl_.id_;
4332 }
4333 if (cached_has_bits & 0x20000000u) {
4334 _this->_impl_.layer_stack_ = from._impl_.layer_stack_;
4335 }
4336 if (cached_has_bits & 0x40000000u) {
4337 _this->_impl_.z_ = from._impl_.z_;
4338 }
4339 if (cached_has_bits & 0x80000000u) {
4340 _this->_impl_.flags_ = from._impl_.flags_;
4341 }
4342 _this->_impl_._has_bits_[0] |= cached_has_bits;
4343 }
4344 cached_has_bits = from._impl_._has_bits_[1];
4345 if (cached_has_bits & 0x000000ffu) {
4346 if (cached_has_bits & 0x00000001u) {
4347 _this->_impl_.is_opaque_ = from._impl_.is_opaque_;
4348 }
4349 if (cached_has_bits & 0x00000002u) {
4350 _this->_impl_.invalidate_ = from._impl_.invalidate_;
4351 }
4352 if (cached_has_bits & 0x00000004u) {
4353 _this->_impl_.refresh_pending_ = from._impl_.refresh_pending_;
4354 }
4355 if (cached_has_bits & 0x00000008u) {
4356 _this->_impl_.is_protected_ = from._impl_.is_protected_;
4357 }
4358 if (cached_has_bits & 0x00000010u) {
4359 _this->_impl_.parent_ = from._impl_.parent_;
4360 }
4361 if (cached_has_bits & 0x00000020u) {
4362 _this->_impl_.z_order_relative_of_ = from._impl_.z_order_relative_of_;
4363 }
4364 if (cached_has_bits & 0x00000040u) {
4365 _this->_impl_.queued_frames_ = from._impl_.queued_frames_;
4366 }
4367 if (cached_has_bits & 0x00000080u) {
4368 _this->_impl_.hwc_transform_ = from._impl_.hwc_transform_;
4369 }
4370 _this->_impl_._has_bits_[1] |= cached_has_bits;
4371 }
4372 if (cached_has_bits & 0x0000ff00u) {
4373 if (cached_has_bits & 0x00000100u) {
4374 _this->_impl_.window_type_ = from._impl_.window_type_;
4375 }
4376 if (cached_has_bits & 0x00000200u) {
4377 _this->_impl_.app_id_ = from._impl_.app_id_;
4378 }
4379 if (cached_has_bits & 0x00000400u) {
4380 _this->_impl_.hwc_composition_type_ = from._impl_.hwc_composition_type_;
4381 }
4382 if (cached_has_bits & 0x00000800u) {
4383 _this->_impl_.curr_frame_ = from._impl_.curr_frame_;
4384 }
4385 if (cached_has_bits & 0x00001000u) {
4386 _this->_impl_.effective_scaling_mode_ = from._impl_.effective_scaling_mode_;
4387 }
4388 if (cached_has_bits & 0x00002000u) {
4389 _this->_impl_.corner_radius_ = from._impl_.corner_radius_;
4390 }
4391 if (cached_has_bits & 0x00004000u) {
4392 _this->_impl_.shadow_radius_ = from._impl_.shadow_radius_;
4393 }
4394 if (cached_has_bits & 0x00008000u) {
4395 _this->_impl_.background_blur_radius_ = from._impl_.background_blur_radius_;
4396 }
4397 _this->_impl_._has_bits_[1] |= cached_has_bits;
4398 }
4399 if (cached_has_bits & 0x003f0000u) {
4400 if (cached_has_bits & 0x00010000u) {
4401 _this->_impl_.owner_uid_ = from._impl_.owner_uid_;
4402 }
4403 if (cached_has_bits & 0x00020000u) {
4404 _this->_impl_.is_relative_of_ = from._impl_.is_relative_of_;
4405 }
4406 if (cached_has_bits & 0x00040000u) {
4407 _this->_impl_.is_trusted_overlay_ = from._impl_.is_trusted_overlay_;
4408 }
4409 if (cached_has_bits & 0x00080000u) {
4410 _this->_impl_.requested_corner_radius_ = from._impl_.requested_corner_radius_;
4411 }
4412 if (cached_has_bits & 0x00100000u) {
4413 _this->_impl_.original_id_ = from._impl_.original_id_;
4414 }
4415 if (cached_has_bits & 0x00200000u) {
4416 _this->_impl_.trusted_overlay_ = from._impl_.trusted_overlay_;
4417 }
4418 _this->_impl_._has_bits_[1] |= cached_has_bits;
4419 }
4420 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4421 }
4422
CopyFrom(const LayerProto & from)4423 void LayerProto::CopyFrom(const LayerProto& from) {
4424 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.LayerProto)
4425 if (&from == this) return;
4426 Clear();
4427 MergeFrom(from);
4428 }
4429
IsInitialized() const4430 bool LayerProto::IsInitialized() const {
4431 return true;
4432 }
4433
InternalSwap(LayerProto * other)4434 void LayerProto::InternalSwap(LayerProto* other) {
4435 using std::swap;
4436 auto* lhs_arena = GetArenaForAllocation();
4437 auto* rhs_arena = other->GetArenaForAllocation();
4438 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4439 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
4440 swap(_impl_._has_bits_[1], other->_impl_._has_bits_[1]);
4441 _impl_.children_.InternalSwap(&other->_impl_.children_);
4442 _impl_.relatives_.InternalSwap(&other->_impl_.relatives_);
4443 _impl_.barrier_layer_.InternalSwap(&other->_impl_.barrier_layer_);
4444 _impl_.metadata_.InternalSwap(&other->_impl_.metadata_);
4445 _impl_.blur_regions_.InternalSwap(&other->_impl_.blur_regions_);
4446 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
4447 &_impl_.name_, lhs_arena,
4448 &other->_impl_.name_, rhs_arena
4449 );
4450 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
4451 &_impl_.type_, lhs_arena,
4452 &other->_impl_.type_, rhs_arena
4453 );
4454 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
4455 &_impl_.dataspace_, lhs_arena,
4456 &other->_impl_.dataspace_, rhs_arena
4457 );
4458 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
4459 &_impl_.pixel_format_, lhs_arena,
4460 &other->_impl_.pixel_format_, rhs_arena
4461 );
4462 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
4463 PROTOBUF_FIELD_OFFSET(LayerProto, _impl_.trusted_overlay_)
4464 + sizeof(LayerProto::_impl_.trusted_overlay_) // NOLINT
4465 - PROTOBUF_FIELD_OFFSET(LayerProto, _impl_.transparent_region_)>(
4466 reinterpret_cast<char*>(&_impl_.transparent_region_),
4467 reinterpret_cast<char*>(&other->_impl_.transparent_region_));
4468 }
4469
GetTypeName() const4470 std::string LayerProto::GetTypeName() const {
4471 return "perfetto.protos.LayerProto";
4472 }
4473
4474
4475 // ===================================================================
4476
4477 class PositionProto::_Internal {
4478 public:
4479 using HasBits = decltype(std::declval<PositionProto>()._impl_._has_bits_);
set_has_x(HasBits * has_bits)4480 static void set_has_x(HasBits* has_bits) {
4481 (*has_bits)[0] |= 1u;
4482 }
set_has_y(HasBits * has_bits)4483 static void set_has_y(HasBits* has_bits) {
4484 (*has_bits)[0] |= 2u;
4485 }
4486 };
4487
PositionProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)4488 PositionProto::PositionProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
4489 bool is_message_owned)
4490 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
4491 SharedCtor(arena, is_message_owned);
4492 // @@protoc_insertion_point(arena_constructor:perfetto.protos.PositionProto)
4493 }
PositionProto(const PositionProto & from)4494 PositionProto::PositionProto(const PositionProto& from)
4495 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
4496 PositionProto* const _this = this; (void)_this;
4497 new (&_impl_) Impl_{
4498 decltype(_impl_._has_bits_){from._impl_._has_bits_}
4499 , /*decltype(_impl_._cached_size_)*/{}
4500 , decltype(_impl_.x_){}
4501 , decltype(_impl_.y_){}};
4502
4503 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4504 ::memcpy(&_impl_.x_, &from._impl_.x_,
4505 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.y_) -
4506 reinterpret_cast<char*>(&_impl_.x_)) + sizeof(_impl_.y_));
4507 // @@protoc_insertion_point(copy_constructor:perfetto.protos.PositionProto)
4508 }
4509
SharedCtor(::_pb::Arena * arena,bool is_message_owned)4510 inline void PositionProto::SharedCtor(
4511 ::_pb::Arena* arena, bool is_message_owned) {
4512 (void)arena;
4513 (void)is_message_owned;
4514 new (&_impl_) Impl_{
4515 decltype(_impl_._has_bits_){}
4516 , /*decltype(_impl_._cached_size_)*/{}
4517 , decltype(_impl_.x_){0}
4518 , decltype(_impl_.y_){0}
4519 };
4520 }
4521
~PositionProto()4522 PositionProto::~PositionProto() {
4523 // @@protoc_insertion_point(destructor:perfetto.protos.PositionProto)
4524 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
4525 (void)arena;
4526 return;
4527 }
4528 SharedDtor();
4529 }
4530
SharedDtor()4531 inline void PositionProto::SharedDtor() {
4532 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
4533 }
4534
SetCachedSize(int size) const4535 void PositionProto::SetCachedSize(int size) const {
4536 _impl_._cached_size_.Set(size);
4537 }
4538
Clear()4539 void PositionProto::Clear() {
4540 // @@protoc_insertion_point(message_clear_start:perfetto.protos.PositionProto)
4541 ::uint32_t cached_has_bits = 0;
4542 // Prevent compiler warnings about cached_has_bits being unused
4543 (void) cached_has_bits;
4544
4545 cached_has_bits = _impl_._has_bits_[0];
4546 if (cached_has_bits & 0x00000003u) {
4547 ::memset(&_impl_.x_, 0, static_cast<size_t>(
4548 reinterpret_cast<char*>(&_impl_.y_) -
4549 reinterpret_cast<char*>(&_impl_.x_)) + sizeof(_impl_.y_));
4550 }
4551 _impl_._has_bits_.Clear();
4552 _internal_metadata_.Clear<std::string>();
4553 }
4554
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)4555 const char* PositionProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
4556 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
4557 _Internal::HasBits has_bits{};
4558 while (!ctx->Done(&ptr)) {
4559 ::uint32_t tag;
4560 ptr = ::_pbi::ReadTag(ptr, &tag);
4561 switch (tag >> 3) {
4562 // optional float x = 1;
4563 case 1:
4564 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 13)) {
4565 _Internal::set_has_x(&has_bits);
4566 _impl_.x_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
4567 ptr += sizeof(float);
4568 } else {
4569 goto handle_unusual;
4570 }
4571 continue;
4572 // optional float y = 2;
4573 case 2:
4574 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 21)) {
4575 _Internal::set_has_y(&has_bits);
4576 _impl_.y_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
4577 ptr += sizeof(float);
4578 } else {
4579 goto handle_unusual;
4580 }
4581 continue;
4582 default:
4583 goto handle_unusual;
4584 } // switch
4585 handle_unusual:
4586 if ((tag == 0) || ((tag & 7) == 4)) {
4587 CHK_(ptr);
4588 ctx->SetLastTag(tag);
4589 goto message_done;
4590 }
4591 ptr = UnknownFieldParse(
4592 tag,
4593 _internal_metadata_.mutable_unknown_fields<std::string>(),
4594 ptr, ctx);
4595 CHK_(ptr != nullptr);
4596 } // while
4597 message_done:
4598 _impl_._has_bits_.Or(has_bits);
4599 return ptr;
4600 failure:
4601 ptr = nullptr;
4602 goto message_done;
4603 #undef CHK_
4604 }
4605
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const4606 ::uint8_t* PositionProto::_InternalSerialize(
4607 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
4608 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.PositionProto)
4609 ::uint32_t cached_has_bits = 0;
4610 (void) cached_has_bits;
4611
4612 cached_has_bits = _impl_._has_bits_[0];
4613 // optional float x = 1;
4614 if (cached_has_bits & 0x00000001u) {
4615 target = stream->EnsureSpace(target);
4616 target = ::_pbi::WireFormatLite::WriteFloatToArray(1, this->_internal_x(), target);
4617 }
4618
4619 // optional float y = 2;
4620 if (cached_has_bits & 0x00000002u) {
4621 target = stream->EnsureSpace(target);
4622 target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_y(), target);
4623 }
4624
4625 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4626 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
4627 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
4628 }
4629 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.PositionProto)
4630 return target;
4631 }
4632
ByteSizeLong() const4633 size_t PositionProto::ByteSizeLong() const {
4634 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.PositionProto)
4635 size_t total_size = 0;
4636
4637 ::uint32_t cached_has_bits = 0;
4638 // Prevent compiler warnings about cached_has_bits being unused
4639 (void) cached_has_bits;
4640
4641 cached_has_bits = _impl_._has_bits_[0];
4642 if (cached_has_bits & 0x00000003u) {
4643 // optional float x = 1;
4644 if (cached_has_bits & 0x00000001u) {
4645 total_size += 1 + 4;
4646 }
4647
4648 // optional float y = 2;
4649 if (cached_has_bits & 0x00000002u) {
4650 total_size += 1 + 4;
4651 }
4652
4653 }
4654 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4655 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4656 }
4657 int cached_size = ::_pbi::ToCachedSize(total_size);
4658 SetCachedSize(cached_size);
4659 return total_size;
4660 }
4661
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4662 void PositionProto::CheckTypeAndMergeFrom(
4663 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4664 MergeFrom(*::_pbi::DownCast<const PositionProto*>(
4665 &from));
4666 }
4667
MergeFrom(const PositionProto & from)4668 void PositionProto::MergeFrom(const PositionProto& from) {
4669 PositionProto* const _this = this;
4670 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.PositionProto)
4671 GOOGLE_DCHECK_NE(&from, _this);
4672 ::uint32_t cached_has_bits = 0;
4673 (void) cached_has_bits;
4674
4675 cached_has_bits = from._impl_._has_bits_[0];
4676 if (cached_has_bits & 0x00000003u) {
4677 if (cached_has_bits & 0x00000001u) {
4678 _this->_impl_.x_ = from._impl_.x_;
4679 }
4680 if (cached_has_bits & 0x00000002u) {
4681 _this->_impl_.y_ = from._impl_.y_;
4682 }
4683 _this->_impl_._has_bits_[0] |= cached_has_bits;
4684 }
4685 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4686 }
4687
CopyFrom(const PositionProto & from)4688 void PositionProto::CopyFrom(const PositionProto& from) {
4689 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.PositionProto)
4690 if (&from == this) return;
4691 Clear();
4692 MergeFrom(from);
4693 }
4694
IsInitialized() const4695 bool PositionProto::IsInitialized() const {
4696 return true;
4697 }
4698
InternalSwap(PositionProto * other)4699 void PositionProto::InternalSwap(PositionProto* other) {
4700 using std::swap;
4701 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4702 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
4703 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
4704 PROTOBUF_FIELD_OFFSET(PositionProto, _impl_.y_)
4705 + sizeof(PositionProto::_impl_.y_) // NOLINT
4706 - PROTOBUF_FIELD_OFFSET(PositionProto, _impl_.x_)>(
4707 reinterpret_cast<char*>(&_impl_.x_),
4708 reinterpret_cast<char*>(&other->_impl_.x_));
4709 }
4710
GetTypeName() const4711 std::string PositionProto::GetTypeName() const {
4712 return "perfetto.protos.PositionProto";
4713 }
4714
4715
4716 // ===================================================================
4717
4718 class FloatRectProto::_Internal {
4719 public:
4720 using HasBits = decltype(std::declval<FloatRectProto>()._impl_._has_bits_);
set_has_left(HasBits * has_bits)4721 static void set_has_left(HasBits* has_bits) {
4722 (*has_bits)[0] |= 1u;
4723 }
set_has_top(HasBits * has_bits)4724 static void set_has_top(HasBits* has_bits) {
4725 (*has_bits)[0] |= 2u;
4726 }
set_has_right(HasBits * has_bits)4727 static void set_has_right(HasBits* has_bits) {
4728 (*has_bits)[0] |= 4u;
4729 }
set_has_bottom(HasBits * has_bits)4730 static void set_has_bottom(HasBits* has_bits) {
4731 (*has_bits)[0] |= 8u;
4732 }
4733 };
4734
FloatRectProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)4735 FloatRectProto::FloatRectProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
4736 bool is_message_owned)
4737 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
4738 SharedCtor(arena, is_message_owned);
4739 // @@protoc_insertion_point(arena_constructor:perfetto.protos.FloatRectProto)
4740 }
FloatRectProto(const FloatRectProto & from)4741 FloatRectProto::FloatRectProto(const FloatRectProto& from)
4742 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
4743 FloatRectProto* const _this = this; (void)_this;
4744 new (&_impl_) Impl_{
4745 decltype(_impl_._has_bits_){from._impl_._has_bits_}
4746 , /*decltype(_impl_._cached_size_)*/{}
4747 , decltype(_impl_.left_){}
4748 , decltype(_impl_.top_){}
4749 , decltype(_impl_.right_){}
4750 , decltype(_impl_.bottom_){}};
4751
4752 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4753 ::memcpy(&_impl_.left_, &from._impl_.left_,
4754 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.bottom_) -
4755 reinterpret_cast<char*>(&_impl_.left_)) + sizeof(_impl_.bottom_));
4756 // @@protoc_insertion_point(copy_constructor:perfetto.protos.FloatRectProto)
4757 }
4758
SharedCtor(::_pb::Arena * arena,bool is_message_owned)4759 inline void FloatRectProto::SharedCtor(
4760 ::_pb::Arena* arena, bool is_message_owned) {
4761 (void)arena;
4762 (void)is_message_owned;
4763 new (&_impl_) Impl_{
4764 decltype(_impl_._has_bits_){}
4765 , /*decltype(_impl_._cached_size_)*/{}
4766 , decltype(_impl_.left_){0}
4767 , decltype(_impl_.top_){0}
4768 , decltype(_impl_.right_){0}
4769 , decltype(_impl_.bottom_){0}
4770 };
4771 }
4772
~FloatRectProto()4773 FloatRectProto::~FloatRectProto() {
4774 // @@protoc_insertion_point(destructor:perfetto.protos.FloatRectProto)
4775 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
4776 (void)arena;
4777 return;
4778 }
4779 SharedDtor();
4780 }
4781
SharedDtor()4782 inline void FloatRectProto::SharedDtor() {
4783 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
4784 }
4785
SetCachedSize(int size) const4786 void FloatRectProto::SetCachedSize(int size) const {
4787 _impl_._cached_size_.Set(size);
4788 }
4789
Clear()4790 void FloatRectProto::Clear() {
4791 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FloatRectProto)
4792 ::uint32_t cached_has_bits = 0;
4793 // Prevent compiler warnings about cached_has_bits being unused
4794 (void) cached_has_bits;
4795
4796 cached_has_bits = _impl_._has_bits_[0];
4797 if (cached_has_bits & 0x0000000fu) {
4798 ::memset(&_impl_.left_, 0, static_cast<size_t>(
4799 reinterpret_cast<char*>(&_impl_.bottom_) -
4800 reinterpret_cast<char*>(&_impl_.left_)) + sizeof(_impl_.bottom_));
4801 }
4802 _impl_._has_bits_.Clear();
4803 _internal_metadata_.Clear<std::string>();
4804 }
4805
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)4806 const char* FloatRectProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
4807 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
4808 _Internal::HasBits has_bits{};
4809 while (!ctx->Done(&ptr)) {
4810 ::uint32_t tag;
4811 ptr = ::_pbi::ReadTag(ptr, &tag);
4812 switch (tag >> 3) {
4813 // optional float left = 1;
4814 case 1:
4815 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 13)) {
4816 _Internal::set_has_left(&has_bits);
4817 _impl_.left_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
4818 ptr += sizeof(float);
4819 } else {
4820 goto handle_unusual;
4821 }
4822 continue;
4823 // optional float top = 2;
4824 case 2:
4825 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 21)) {
4826 _Internal::set_has_top(&has_bits);
4827 _impl_.top_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
4828 ptr += sizeof(float);
4829 } else {
4830 goto handle_unusual;
4831 }
4832 continue;
4833 // optional float right = 3;
4834 case 3:
4835 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 29)) {
4836 _Internal::set_has_right(&has_bits);
4837 _impl_.right_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
4838 ptr += sizeof(float);
4839 } else {
4840 goto handle_unusual;
4841 }
4842 continue;
4843 // optional float bottom = 4;
4844 case 4:
4845 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 37)) {
4846 _Internal::set_has_bottom(&has_bits);
4847 _impl_.bottom_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
4848 ptr += sizeof(float);
4849 } else {
4850 goto handle_unusual;
4851 }
4852 continue;
4853 default:
4854 goto handle_unusual;
4855 } // switch
4856 handle_unusual:
4857 if ((tag == 0) || ((tag & 7) == 4)) {
4858 CHK_(ptr);
4859 ctx->SetLastTag(tag);
4860 goto message_done;
4861 }
4862 ptr = UnknownFieldParse(
4863 tag,
4864 _internal_metadata_.mutable_unknown_fields<std::string>(),
4865 ptr, ctx);
4866 CHK_(ptr != nullptr);
4867 } // while
4868 message_done:
4869 _impl_._has_bits_.Or(has_bits);
4870 return ptr;
4871 failure:
4872 ptr = nullptr;
4873 goto message_done;
4874 #undef CHK_
4875 }
4876
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const4877 ::uint8_t* FloatRectProto::_InternalSerialize(
4878 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
4879 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FloatRectProto)
4880 ::uint32_t cached_has_bits = 0;
4881 (void) cached_has_bits;
4882
4883 cached_has_bits = _impl_._has_bits_[0];
4884 // optional float left = 1;
4885 if (cached_has_bits & 0x00000001u) {
4886 target = stream->EnsureSpace(target);
4887 target = ::_pbi::WireFormatLite::WriteFloatToArray(1, this->_internal_left(), target);
4888 }
4889
4890 // optional float top = 2;
4891 if (cached_has_bits & 0x00000002u) {
4892 target = stream->EnsureSpace(target);
4893 target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_top(), target);
4894 }
4895
4896 // optional float right = 3;
4897 if (cached_has_bits & 0x00000004u) {
4898 target = stream->EnsureSpace(target);
4899 target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_right(), target);
4900 }
4901
4902 // optional float bottom = 4;
4903 if (cached_has_bits & 0x00000008u) {
4904 target = stream->EnsureSpace(target);
4905 target = ::_pbi::WireFormatLite::WriteFloatToArray(4, this->_internal_bottom(), target);
4906 }
4907
4908 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4909 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
4910 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
4911 }
4912 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FloatRectProto)
4913 return target;
4914 }
4915
ByteSizeLong() const4916 size_t FloatRectProto::ByteSizeLong() const {
4917 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FloatRectProto)
4918 size_t total_size = 0;
4919
4920 ::uint32_t cached_has_bits = 0;
4921 // Prevent compiler warnings about cached_has_bits being unused
4922 (void) cached_has_bits;
4923
4924 cached_has_bits = _impl_._has_bits_[0];
4925 if (cached_has_bits & 0x0000000fu) {
4926 // optional float left = 1;
4927 if (cached_has_bits & 0x00000001u) {
4928 total_size += 1 + 4;
4929 }
4930
4931 // optional float top = 2;
4932 if (cached_has_bits & 0x00000002u) {
4933 total_size += 1 + 4;
4934 }
4935
4936 // optional float right = 3;
4937 if (cached_has_bits & 0x00000004u) {
4938 total_size += 1 + 4;
4939 }
4940
4941 // optional float bottom = 4;
4942 if (cached_has_bits & 0x00000008u) {
4943 total_size += 1 + 4;
4944 }
4945
4946 }
4947 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4948 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4949 }
4950 int cached_size = ::_pbi::ToCachedSize(total_size);
4951 SetCachedSize(cached_size);
4952 return total_size;
4953 }
4954
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4955 void FloatRectProto::CheckTypeAndMergeFrom(
4956 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4957 MergeFrom(*::_pbi::DownCast<const FloatRectProto*>(
4958 &from));
4959 }
4960
MergeFrom(const FloatRectProto & from)4961 void FloatRectProto::MergeFrom(const FloatRectProto& from) {
4962 FloatRectProto* const _this = this;
4963 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FloatRectProto)
4964 GOOGLE_DCHECK_NE(&from, _this);
4965 ::uint32_t cached_has_bits = 0;
4966 (void) cached_has_bits;
4967
4968 cached_has_bits = from._impl_._has_bits_[0];
4969 if (cached_has_bits & 0x0000000fu) {
4970 if (cached_has_bits & 0x00000001u) {
4971 _this->_impl_.left_ = from._impl_.left_;
4972 }
4973 if (cached_has_bits & 0x00000002u) {
4974 _this->_impl_.top_ = from._impl_.top_;
4975 }
4976 if (cached_has_bits & 0x00000004u) {
4977 _this->_impl_.right_ = from._impl_.right_;
4978 }
4979 if (cached_has_bits & 0x00000008u) {
4980 _this->_impl_.bottom_ = from._impl_.bottom_;
4981 }
4982 _this->_impl_._has_bits_[0] |= cached_has_bits;
4983 }
4984 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4985 }
4986
CopyFrom(const FloatRectProto & from)4987 void FloatRectProto::CopyFrom(const FloatRectProto& from) {
4988 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FloatRectProto)
4989 if (&from == this) return;
4990 Clear();
4991 MergeFrom(from);
4992 }
4993
IsInitialized() const4994 bool FloatRectProto::IsInitialized() const {
4995 return true;
4996 }
4997
InternalSwap(FloatRectProto * other)4998 void FloatRectProto::InternalSwap(FloatRectProto* other) {
4999 using std::swap;
5000 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
5001 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
5002 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
5003 PROTOBUF_FIELD_OFFSET(FloatRectProto, _impl_.bottom_)
5004 + sizeof(FloatRectProto::_impl_.bottom_) // NOLINT
5005 - PROTOBUF_FIELD_OFFSET(FloatRectProto, _impl_.left_)>(
5006 reinterpret_cast<char*>(&_impl_.left_),
5007 reinterpret_cast<char*>(&other->_impl_.left_));
5008 }
5009
GetTypeName() const5010 std::string FloatRectProto::GetTypeName() const {
5011 return "perfetto.protos.FloatRectProto";
5012 }
5013
5014
5015 // ===================================================================
5016
5017 class ActiveBufferProto::_Internal {
5018 public:
5019 using HasBits = decltype(std::declval<ActiveBufferProto>()._impl_._has_bits_);
set_has_width(HasBits * has_bits)5020 static void set_has_width(HasBits* has_bits) {
5021 (*has_bits)[0] |= 1u;
5022 }
set_has_height(HasBits * has_bits)5023 static void set_has_height(HasBits* has_bits) {
5024 (*has_bits)[0] |= 2u;
5025 }
set_has_stride(HasBits * has_bits)5026 static void set_has_stride(HasBits* has_bits) {
5027 (*has_bits)[0] |= 4u;
5028 }
set_has_format(HasBits * has_bits)5029 static void set_has_format(HasBits* has_bits) {
5030 (*has_bits)[0] |= 8u;
5031 }
set_has_usage(HasBits * has_bits)5032 static void set_has_usage(HasBits* has_bits) {
5033 (*has_bits)[0] |= 16u;
5034 }
5035 };
5036
ActiveBufferProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)5037 ActiveBufferProto::ActiveBufferProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
5038 bool is_message_owned)
5039 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
5040 SharedCtor(arena, is_message_owned);
5041 // @@protoc_insertion_point(arena_constructor:perfetto.protos.ActiveBufferProto)
5042 }
ActiveBufferProto(const ActiveBufferProto & from)5043 ActiveBufferProto::ActiveBufferProto(const ActiveBufferProto& from)
5044 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
5045 ActiveBufferProto* const _this = this; (void)_this;
5046 new (&_impl_) Impl_{
5047 decltype(_impl_._has_bits_){from._impl_._has_bits_}
5048 , /*decltype(_impl_._cached_size_)*/{}
5049 , decltype(_impl_.width_){}
5050 , decltype(_impl_.height_){}
5051 , decltype(_impl_.stride_){}
5052 , decltype(_impl_.format_){}
5053 , decltype(_impl_.usage_){}};
5054
5055 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
5056 ::memcpy(&_impl_.width_, &from._impl_.width_,
5057 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.usage_) -
5058 reinterpret_cast<char*>(&_impl_.width_)) + sizeof(_impl_.usage_));
5059 // @@protoc_insertion_point(copy_constructor:perfetto.protos.ActiveBufferProto)
5060 }
5061
SharedCtor(::_pb::Arena * arena,bool is_message_owned)5062 inline void ActiveBufferProto::SharedCtor(
5063 ::_pb::Arena* arena, bool is_message_owned) {
5064 (void)arena;
5065 (void)is_message_owned;
5066 new (&_impl_) Impl_{
5067 decltype(_impl_._has_bits_){}
5068 , /*decltype(_impl_._cached_size_)*/{}
5069 , decltype(_impl_.width_){0u}
5070 , decltype(_impl_.height_){0u}
5071 , decltype(_impl_.stride_){0u}
5072 , decltype(_impl_.format_){0}
5073 , decltype(_impl_.usage_){::uint64_t{0u}}
5074 };
5075 }
5076
~ActiveBufferProto()5077 ActiveBufferProto::~ActiveBufferProto() {
5078 // @@protoc_insertion_point(destructor:perfetto.protos.ActiveBufferProto)
5079 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
5080 (void)arena;
5081 return;
5082 }
5083 SharedDtor();
5084 }
5085
SharedDtor()5086 inline void ActiveBufferProto::SharedDtor() {
5087 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
5088 }
5089
SetCachedSize(int size) const5090 void ActiveBufferProto::SetCachedSize(int size) const {
5091 _impl_._cached_size_.Set(size);
5092 }
5093
Clear()5094 void ActiveBufferProto::Clear() {
5095 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ActiveBufferProto)
5096 ::uint32_t cached_has_bits = 0;
5097 // Prevent compiler warnings about cached_has_bits being unused
5098 (void) cached_has_bits;
5099
5100 cached_has_bits = _impl_._has_bits_[0];
5101 if (cached_has_bits & 0x0000001fu) {
5102 ::memset(&_impl_.width_, 0, static_cast<size_t>(
5103 reinterpret_cast<char*>(&_impl_.usage_) -
5104 reinterpret_cast<char*>(&_impl_.width_)) + sizeof(_impl_.usage_));
5105 }
5106 _impl_._has_bits_.Clear();
5107 _internal_metadata_.Clear<std::string>();
5108 }
5109
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)5110 const char* ActiveBufferProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
5111 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
5112 _Internal::HasBits has_bits{};
5113 while (!ctx->Done(&ptr)) {
5114 ::uint32_t tag;
5115 ptr = ::_pbi::ReadTag(ptr, &tag);
5116 switch (tag >> 3) {
5117 // optional uint32 width = 1;
5118 case 1:
5119 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
5120 _Internal::set_has_width(&has_bits);
5121 _impl_.width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
5122 CHK_(ptr);
5123 } else {
5124 goto handle_unusual;
5125 }
5126 continue;
5127 // optional uint32 height = 2;
5128 case 2:
5129 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
5130 _Internal::set_has_height(&has_bits);
5131 _impl_.height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
5132 CHK_(ptr);
5133 } else {
5134 goto handle_unusual;
5135 }
5136 continue;
5137 // optional uint32 stride = 3;
5138 case 3:
5139 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
5140 _Internal::set_has_stride(&has_bits);
5141 _impl_.stride_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
5142 CHK_(ptr);
5143 } else {
5144 goto handle_unusual;
5145 }
5146 continue;
5147 // optional int32 format = 4;
5148 case 4:
5149 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
5150 _Internal::set_has_format(&has_bits);
5151 _impl_.format_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
5152 CHK_(ptr);
5153 } else {
5154 goto handle_unusual;
5155 }
5156 continue;
5157 // optional uint64 usage = 5;
5158 case 5:
5159 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
5160 _Internal::set_has_usage(&has_bits);
5161 _impl_.usage_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
5162 CHK_(ptr);
5163 } else {
5164 goto handle_unusual;
5165 }
5166 continue;
5167 default:
5168 goto handle_unusual;
5169 } // switch
5170 handle_unusual:
5171 if ((tag == 0) || ((tag & 7) == 4)) {
5172 CHK_(ptr);
5173 ctx->SetLastTag(tag);
5174 goto message_done;
5175 }
5176 ptr = UnknownFieldParse(
5177 tag,
5178 _internal_metadata_.mutable_unknown_fields<std::string>(),
5179 ptr, ctx);
5180 CHK_(ptr != nullptr);
5181 } // while
5182 message_done:
5183 _impl_._has_bits_.Or(has_bits);
5184 return ptr;
5185 failure:
5186 ptr = nullptr;
5187 goto message_done;
5188 #undef CHK_
5189 }
5190
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const5191 ::uint8_t* ActiveBufferProto::_InternalSerialize(
5192 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
5193 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ActiveBufferProto)
5194 ::uint32_t cached_has_bits = 0;
5195 (void) cached_has_bits;
5196
5197 cached_has_bits = _impl_._has_bits_[0];
5198 // optional uint32 width = 1;
5199 if (cached_has_bits & 0x00000001u) {
5200 target = stream->EnsureSpace(target);
5201 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_width(), target);
5202 }
5203
5204 // optional uint32 height = 2;
5205 if (cached_has_bits & 0x00000002u) {
5206 target = stream->EnsureSpace(target);
5207 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_height(), target);
5208 }
5209
5210 // optional uint32 stride = 3;
5211 if (cached_has_bits & 0x00000004u) {
5212 target = stream->EnsureSpace(target);
5213 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_stride(), target);
5214 }
5215
5216 // optional int32 format = 4;
5217 if (cached_has_bits & 0x00000008u) {
5218 target = stream->EnsureSpace(target);
5219 target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_format(), target);
5220 }
5221
5222 // optional uint64 usage = 5;
5223 if (cached_has_bits & 0x00000010u) {
5224 target = stream->EnsureSpace(target);
5225 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_usage(), target);
5226 }
5227
5228 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
5229 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
5230 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
5231 }
5232 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ActiveBufferProto)
5233 return target;
5234 }
5235
ByteSizeLong() const5236 size_t ActiveBufferProto::ByteSizeLong() const {
5237 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ActiveBufferProto)
5238 size_t total_size = 0;
5239
5240 ::uint32_t cached_has_bits = 0;
5241 // Prevent compiler warnings about cached_has_bits being unused
5242 (void) cached_has_bits;
5243
5244 cached_has_bits = _impl_._has_bits_[0];
5245 if (cached_has_bits & 0x0000001fu) {
5246 // optional uint32 width = 1;
5247 if (cached_has_bits & 0x00000001u) {
5248 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_width());
5249 }
5250
5251 // optional uint32 height = 2;
5252 if (cached_has_bits & 0x00000002u) {
5253 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_height());
5254 }
5255
5256 // optional uint32 stride = 3;
5257 if (cached_has_bits & 0x00000004u) {
5258 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_stride());
5259 }
5260
5261 // optional int32 format = 4;
5262 if (cached_has_bits & 0x00000008u) {
5263 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_format());
5264 }
5265
5266 // optional uint64 usage = 5;
5267 if (cached_has_bits & 0x00000010u) {
5268 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_usage());
5269 }
5270
5271 }
5272 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
5273 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
5274 }
5275 int cached_size = ::_pbi::ToCachedSize(total_size);
5276 SetCachedSize(cached_size);
5277 return total_size;
5278 }
5279
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)5280 void ActiveBufferProto::CheckTypeAndMergeFrom(
5281 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
5282 MergeFrom(*::_pbi::DownCast<const ActiveBufferProto*>(
5283 &from));
5284 }
5285
MergeFrom(const ActiveBufferProto & from)5286 void ActiveBufferProto::MergeFrom(const ActiveBufferProto& from) {
5287 ActiveBufferProto* const _this = this;
5288 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ActiveBufferProto)
5289 GOOGLE_DCHECK_NE(&from, _this);
5290 ::uint32_t cached_has_bits = 0;
5291 (void) cached_has_bits;
5292
5293 cached_has_bits = from._impl_._has_bits_[0];
5294 if (cached_has_bits & 0x0000001fu) {
5295 if (cached_has_bits & 0x00000001u) {
5296 _this->_impl_.width_ = from._impl_.width_;
5297 }
5298 if (cached_has_bits & 0x00000002u) {
5299 _this->_impl_.height_ = from._impl_.height_;
5300 }
5301 if (cached_has_bits & 0x00000004u) {
5302 _this->_impl_.stride_ = from._impl_.stride_;
5303 }
5304 if (cached_has_bits & 0x00000008u) {
5305 _this->_impl_.format_ = from._impl_.format_;
5306 }
5307 if (cached_has_bits & 0x00000010u) {
5308 _this->_impl_.usage_ = from._impl_.usage_;
5309 }
5310 _this->_impl_._has_bits_[0] |= cached_has_bits;
5311 }
5312 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
5313 }
5314
CopyFrom(const ActiveBufferProto & from)5315 void ActiveBufferProto::CopyFrom(const ActiveBufferProto& from) {
5316 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ActiveBufferProto)
5317 if (&from == this) return;
5318 Clear();
5319 MergeFrom(from);
5320 }
5321
IsInitialized() const5322 bool ActiveBufferProto::IsInitialized() const {
5323 return true;
5324 }
5325
InternalSwap(ActiveBufferProto * other)5326 void ActiveBufferProto::InternalSwap(ActiveBufferProto* other) {
5327 using std::swap;
5328 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
5329 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
5330 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
5331 PROTOBUF_FIELD_OFFSET(ActiveBufferProto, _impl_.usage_)
5332 + sizeof(ActiveBufferProto::_impl_.usage_) // NOLINT
5333 - PROTOBUF_FIELD_OFFSET(ActiveBufferProto, _impl_.width_)>(
5334 reinterpret_cast<char*>(&_impl_.width_),
5335 reinterpret_cast<char*>(&other->_impl_.width_));
5336 }
5337
GetTypeName() const5338 std::string ActiveBufferProto::GetTypeName() const {
5339 return "perfetto.protos.ActiveBufferProto";
5340 }
5341
5342
5343 // ===================================================================
5344
5345 class BarrierLayerProto::_Internal {
5346 public:
5347 using HasBits = decltype(std::declval<BarrierLayerProto>()._impl_._has_bits_);
set_has_id(HasBits * has_bits)5348 static void set_has_id(HasBits* has_bits) {
5349 (*has_bits)[0] |= 2u;
5350 }
set_has_frame_number(HasBits * has_bits)5351 static void set_has_frame_number(HasBits* has_bits) {
5352 (*has_bits)[0] |= 1u;
5353 }
5354 };
5355
BarrierLayerProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)5356 BarrierLayerProto::BarrierLayerProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
5357 bool is_message_owned)
5358 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
5359 SharedCtor(arena, is_message_owned);
5360 // @@protoc_insertion_point(arena_constructor:perfetto.protos.BarrierLayerProto)
5361 }
BarrierLayerProto(const BarrierLayerProto & from)5362 BarrierLayerProto::BarrierLayerProto(const BarrierLayerProto& from)
5363 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
5364 BarrierLayerProto* const _this = this; (void)_this;
5365 new (&_impl_) Impl_{
5366 decltype(_impl_._has_bits_){from._impl_._has_bits_}
5367 , /*decltype(_impl_._cached_size_)*/{}
5368 , decltype(_impl_.frame_number_){}
5369 , decltype(_impl_.id_){}};
5370
5371 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
5372 ::memcpy(&_impl_.frame_number_, &from._impl_.frame_number_,
5373 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.id_) -
5374 reinterpret_cast<char*>(&_impl_.frame_number_)) + sizeof(_impl_.id_));
5375 // @@protoc_insertion_point(copy_constructor:perfetto.protos.BarrierLayerProto)
5376 }
5377
SharedCtor(::_pb::Arena * arena,bool is_message_owned)5378 inline void BarrierLayerProto::SharedCtor(
5379 ::_pb::Arena* arena, bool is_message_owned) {
5380 (void)arena;
5381 (void)is_message_owned;
5382 new (&_impl_) Impl_{
5383 decltype(_impl_._has_bits_){}
5384 , /*decltype(_impl_._cached_size_)*/{}
5385 , decltype(_impl_.frame_number_){::uint64_t{0u}}
5386 , decltype(_impl_.id_){0}
5387 };
5388 }
5389
~BarrierLayerProto()5390 BarrierLayerProto::~BarrierLayerProto() {
5391 // @@protoc_insertion_point(destructor:perfetto.protos.BarrierLayerProto)
5392 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
5393 (void)arena;
5394 return;
5395 }
5396 SharedDtor();
5397 }
5398
SharedDtor()5399 inline void BarrierLayerProto::SharedDtor() {
5400 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
5401 }
5402
SetCachedSize(int size) const5403 void BarrierLayerProto::SetCachedSize(int size) const {
5404 _impl_._cached_size_.Set(size);
5405 }
5406
Clear()5407 void BarrierLayerProto::Clear() {
5408 // @@protoc_insertion_point(message_clear_start:perfetto.protos.BarrierLayerProto)
5409 ::uint32_t cached_has_bits = 0;
5410 // Prevent compiler warnings about cached_has_bits being unused
5411 (void) cached_has_bits;
5412
5413 cached_has_bits = _impl_._has_bits_[0];
5414 if (cached_has_bits & 0x00000003u) {
5415 ::memset(&_impl_.frame_number_, 0, static_cast<size_t>(
5416 reinterpret_cast<char*>(&_impl_.id_) -
5417 reinterpret_cast<char*>(&_impl_.frame_number_)) + sizeof(_impl_.id_));
5418 }
5419 _impl_._has_bits_.Clear();
5420 _internal_metadata_.Clear<std::string>();
5421 }
5422
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)5423 const char* BarrierLayerProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
5424 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
5425 _Internal::HasBits has_bits{};
5426 while (!ctx->Done(&ptr)) {
5427 ::uint32_t tag;
5428 ptr = ::_pbi::ReadTag(ptr, &tag);
5429 switch (tag >> 3) {
5430 // optional int32 id = 1;
5431 case 1:
5432 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
5433 _Internal::set_has_id(&has_bits);
5434 _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
5435 CHK_(ptr);
5436 } else {
5437 goto handle_unusual;
5438 }
5439 continue;
5440 // optional uint64 frame_number = 2;
5441 case 2:
5442 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
5443 _Internal::set_has_frame_number(&has_bits);
5444 _impl_.frame_number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
5445 CHK_(ptr);
5446 } else {
5447 goto handle_unusual;
5448 }
5449 continue;
5450 default:
5451 goto handle_unusual;
5452 } // switch
5453 handle_unusual:
5454 if ((tag == 0) || ((tag & 7) == 4)) {
5455 CHK_(ptr);
5456 ctx->SetLastTag(tag);
5457 goto message_done;
5458 }
5459 ptr = UnknownFieldParse(
5460 tag,
5461 _internal_metadata_.mutable_unknown_fields<std::string>(),
5462 ptr, ctx);
5463 CHK_(ptr != nullptr);
5464 } // while
5465 message_done:
5466 _impl_._has_bits_.Or(has_bits);
5467 return ptr;
5468 failure:
5469 ptr = nullptr;
5470 goto message_done;
5471 #undef CHK_
5472 }
5473
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const5474 ::uint8_t* BarrierLayerProto::_InternalSerialize(
5475 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
5476 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.BarrierLayerProto)
5477 ::uint32_t cached_has_bits = 0;
5478 (void) cached_has_bits;
5479
5480 cached_has_bits = _impl_._has_bits_[0];
5481 // optional int32 id = 1;
5482 if (cached_has_bits & 0x00000002u) {
5483 target = stream->EnsureSpace(target);
5484 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_id(), target);
5485 }
5486
5487 // optional uint64 frame_number = 2;
5488 if (cached_has_bits & 0x00000001u) {
5489 target = stream->EnsureSpace(target);
5490 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_frame_number(), target);
5491 }
5492
5493 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
5494 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
5495 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
5496 }
5497 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.BarrierLayerProto)
5498 return target;
5499 }
5500
ByteSizeLong() const5501 size_t BarrierLayerProto::ByteSizeLong() const {
5502 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.BarrierLayerProto)
5503 size_t total_size = 0;
5504
5505 ::uint32_t cached_has_bits = 0;
5506 // Prevent compiler warnings about cached_has_bits being unused
5507 (void) cached_has_bits;
5508
5509 cached_has_bits = _impl_._has_bits_[0];
5510 if (cached_has_bits & 0x00000003u) {
5511 // optional uint64 frame_number = 2;
5512 if (cached_has_bits & 0x00000001u) {
5513 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_frame_number());
5514 }
5515
5516 // optional int32 id = 1;
5517 if (cached_has_bits & 0x00000002u) {
5518 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_id());
5519 }
5520
5521 }
5522 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
5523 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
5524 }
5525 int cached_size = ::_pbi::ToCachedSize(total_size);
5526 SetCachedSize(cached_size);
5527 return total_size;
5528 }
5529
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)5530 void BarrierLayerProto::CheckTypeAndMergeFrom(
5531 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
5532 MergeFrom(*::_pbi::DownCast<const BarrierLayerProto*>(
5533 &from));
5534 }
5535
MergeFrom(const BarrierLayerProto & from)5536 void BarrierLayerProto::MergeFrom(const BarrierLayerProto& from) {
5537 BarrierLayerProto* const _this = this;
5538 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.BarrierLayerProto)
5539 GOOGLE_DCHECK_NE(&from, _this);
5540 ::uint32_t cached_has_bits = 0;
5541 (void) cached_has_bits;
5542
5543 cached_has_bits = from._impl_._has_bits_[0];
5544 if (cached_has_bits & 0x00000003u) {
5545 if (cached_has_bits & 0x00000001u) {
5546 _this->_impl_.frame_number_ = from._impl_.frame_number_;
5547 }
5548 if (cached_has_bits & 0x00000002u) {
5549 _this->_impl_.id_ = from._impl_.id_;
5550 }
5551 _this->_impl_._has_bits_[0] |= cached_has_bits;
5552 }
5553 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
5554 }
5555
CopyFrom(const BarrierLayerProto & from)5556 void BarrierLayerProto::CopyFrom(const BarrierLayerProto& from) {
5557 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.BarrierLayerProto)
5558 if (&from == this) return;
5559 Clear();
5560 MergeFrom(from);
5561 }
5562
IsInitialized() const5563 bool BarrierLayerProto::IsInitialized() const {
5564 return true;
5565 }
5566
InternalSwap(BarrierLayerProto * other)5567 void BarrierLayerProto::InternalSwap(BarrierLayerProto* other) {
5568 using std::swap;
5569 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
5570 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
5571 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
5572 PROTOBUF_FIELD_OFFSET(BarrierLayerProto, _impl_.id_)
5573 + sizeof(BarrierLayerProto::_impl_.id_) // NOLINT
5574 - PROTOBUF_FIELD_OFFSET(BarrierLayerProto, _impl_.frame_number_)>(
5575 reinterpret_cast<char*>(&_impl_.frame_number_),
5576 reinterpret_cast<char*>(&other->_impl_.frame_number_));
5577 }
5578
GetTypeName() const5579 std::string BarrierLayerProto::GetTypeName() const {
5580 return "perfetto.protos.BarrierLayerProto";
5581 }
5582
5583
5584 // @@protoc_insertion_point(namespace_scope)
5585 } // namespace protos
5586 } // namespace perfetto
5587 PROTOBUF_NAMESPACE_OPEN
5588 template<> PROTOBUF_NOINLINE ::perfetto::protos::LayersTraceFileProto*
CreateMaybeMessage(Arena * arena)5589 Arena::CreateMaybeMessage< ::perfetto::protos::LayersTraceFileProto >(Arena* arena) {
5590 return Arena::CreateMessageInternal< ::perfetto::protos::LayersTraceFileProto >(arena);
5591 }
5592 template<> PROTOBUF_NOINLINE ::perfetto::protos::LayersSnapshotProto*
CreateMaybeMessage(Arena * arena)5593 Arena::CreateMaybeMessage< ::perfetto::protos::LayersSnapshotProto >(Arena* arena) {
5594 return Arena::CreateMessageInternal< ::perfetto::protos::LayersSnapshotProto >(arena);
5595 }
5596 template<> PROTOBUF_NOINLINE ::perfetto::protos::LayersProto*
CreateMaybeMessage(Arena * arena)5597 Arena::CreateMaybeMessage< ::perfetto::protos::LayersProto >(Arena* arena) {
5598 return Arena::CreateMessageInternal< ::perfetto::protos::LayersProto >(arena);
5599 }
5600 template<> PROTOBUF_NOINLINE ::perfetto::protos::DisplayProto*
CreateMaybeMessage(Arena * arena)5601 Arena::CreateMaybeMessage< ::perfetto::protos::DisplayProto >(Arena* arena) {
5602 return Arena::CreateMessageInternal< ::perfetto::protos::DisplayProto >(arena);
5603 }
5604 template<> PROTOBUF_NOINLINE ::perfetto::protos::LayerProto_MetadataEntry_DoNotUse*
CreateMaybeMessage(Arena * arena)5605 Arena::CreateMaybeMessage< ::perfetto::protos::LayerProto_MetadataEntry_DoNotUse >(Arena* arena) {
5606 return Arena::CreateMessageInternal< ::perfetto::protos::LayerProto_MetadataEntry_DoNotUse >(arena);
5607 }
5608 template<> PROTOBUF_NOINLINE ::perfetto::protos::LayerProto*
CreateMaybeMessage(Arena * arena)5609 Arena::CreateMaybeMessage< ::perfetto::protos::LayerProto >(Arena* arena) {
5610 return Arena::CreateMessageInternal< ::perfetto::protos::LayerProto >(arena);
5611 }
5612 template<> PROTOBUF_NOINLINE ::perfetto::protos::PositionProto*
CreateMaybeMessage(Arena * arena)5613 Arena::CreateMaybeMessage< ::perfetto::protos::PositionProto >(Arena* arena) {
5614 return Arena::CreateMessageInternal< ::perfetto::protos::PositionProto >(arena);
5615 }
5616 template<> PROTOBUF_NOINLINE ::perfetto::protos::FloatRectProto*
CreateMaybeMessage(Arena * arena)5617 Arena::CreateMaybeMessage< ::perfetto::protos::FloatRectProto >(Arena* arena) {
5618 return Arena::CreateMessageInternal< ::perfetto::protos::FloatRectProto >(arena);
5619 }
5620 template<> PROTOBUF_NOINLINE ::perfetto::protos::ActiveBufferProto*
CreateMaybeMessage(Arena * arena)5621 Arena::CreateMaybeMessage< ::perfetto::protos::ActiveBufferProto >(Arena* arena) {
5622 return Arena::CreateMessageInternal< ::perfetto::protos::ActiveBufferProto >(arena);
5623 }
5624 template<> PROTOBUF_NOINLINE ::perfetto::protos::BarrierLayerProto*
CreateMaybeMessage(Arena * arena)5625 Arena::CreateMaybeMessage< ::perfetto::protos::BarrierLayerProto >(Arena* arena) {
5626 return Arena::CreateMessageInternal< ::perfetto::protos::BarrierLayerProto >(arena);
5627 }
5628 PROTOBUF_NAMESPACE_CLOSE
5629
5630 // @@protoc_insertion_point(global_scope)
5631 #include <google/protobuf/port_undef.inc>
5632