Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/layers/PVideoBridgeParent.h"
8 : #ifdef MOZ_CRASHREPORTER
9 : # include "nsXULAppAPI.h"
10 : #endif
11 :
12 : #include "mozilla/layers/PTextureParent.h"
13 :
14 : #include "nsIFile.h"
15 : #include "GeckoProfiler.h"
16 :
17 : namespace mozilla {
18 : namespace layers {
19 :
20 :
21 0 : auto PVideoBridgeParent::RecvPTextureConstructor(
22 : PTextureParent* actor,
23 : const SurfaceDescriptor& aSharedData,
24 : const LayersBackend& aBackend,
25 : const TextureFlags& aTextureFlags,
26 : const uint64_t& aSerial) -> mozilla::ipc::IPCResult
27 : {
28 0 : return IPC_OK();
29 : }
30 :
31 :
32 0 : auto PVideoBridgeParent::ProcessingError(
33 : Result aCode,
34 : const char* aReason) -> void
35 : {
36 0 : }
37 :
38 0 : auto PVideoBridgeParent::ShouldContinueFromReplyTimeout() -> bool
39 : {
40 0 : return true;
41 : }
42 :
43 0 : auto PVideoBridgeParent::EnteredCxxStack() -> void
44 : {
45 0 : }
46 :
47 0 : auto PVideoBridgeParent::ExitedCxxStack() -> void
48 : {
49 0 : }
50 :
51 0 : auto PVideoBridgeParent::EnteredCall() -> void
52 : {
53 0 : }
54 :
55 0 : auto PVideoBridgeParent::ExitedCall() -> void
56 : {
57 0 : }
58 :
59 0 : MOZ_IMPLICIT PVideoBridgeParent::PVideoBridgeParent() :
60 : mozilla::ipc::IToplevelProtocol(PVideoBridgeMsgStart, mozilla::ipc::ParentSide),
61 : mChannel("PVideoBridgeParent", ALLOW_THIS_IN_INITIALIZER_LIST(this)),
62 0 : mState(PVideoBridge::__Start)
63 : {
64 0 : MOZ_COUNT_CTOR(PVideoBridgeParent);
65 0 : }
66 :
67 0 : PVideoBridgeParent::~PVideoBridgeParent()
68 : {
69 0 : MOZ_COUNT_DTOR(PVideoBridgeParent);
70 0 : }
71 :
72 0 : auto PVideoBridgeParent::ManagedPTextureParent(nsTArray<PTextureParent*>& aArr) const -> void
73 : {
74 0 : (mManagedPTextureParent).ToArray(aArr);
75 0 : }
76 :
77 0 : auto PVideoBridgeParent::ManagedPTextureParent() const -> const ManagedContainer<PTextureParent>&
78 : {
79 0 : return mManagedPTextureParent;
80 : }
81 :
82 0 : auto PVideoBridgeParent::GetIPCChannel() -> MessageChannel*
83 : {
84 0 : return (&(mChannel));
85 : }
86 :
87 0 : auto PVideoBridgeParent::GetIPCChannel() const -> const MessageChannel*
88 : {
89 0 : return (&(mChannel));
90 : }
91 :
92 0 : auto PVideoBridgeParent::RemoveManagee(
93 : int32_t aProtocolId,
94 : ProtocolBase* aListener) -> void
95 : {
96 0 : switch (aProtocolId) {
97 : case PTextureMsgStart:
98 : {
99 0 : PTextureParent* actor = static_cast<PTextureParent*>(aListener);
100 0 : auto& container = mManagedPTextureParent;
101 0 : MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
102 :
103 0 : (container).RemoveEntry(actor);
104 0 : DeallocPTextureParent(actor);
105 0 : return;
106 : }
107 : default:
108 : {
109 0 : FatalError("unreached");
110 0 : return;
111 : }
112 : }
113 : }
114 :
115 0 : auto PVideoBridgeParent::OnMessageReceived(const Message& msg__) -> PVideoBridgeParent::Result
116 : {
117 0 : int32_t route__ = (msg__).routing_id();
118 0 : if ((MSG_ROUTING_CONTROL) != (route__)) {
119 0 : ChannelListener* routed__ = Lookup(route__);
120 0 : if ((!(routed__))) {
121 0 : return MsgRouteError;
122 : }
123 0 : return (routed__)->OnMessageReceived(msg__);
124 : }
125 :
126 0 : switch ((msg__).type()) {
127 : case PVideoBridge::Msg_PTextureConstructor__ID:
128 : {
129 0 : if (mozilla::ipc::LoggingEnabledFor("PVideoBridgeParent")) {
130 0 : mozilla::ipc::LogMessageForProtocol("PVideoBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
131 : }
132 0 : AUTO_PROFILER_LABEL("PVideoBridge::Msg_PTextureConstructor", OTHER);
133 :
134 0 : PickleIterator iter__(msg__);
135 : ActorHandle handle__;
136 : PTextureParent* actor;
137 0 : SurfaceDescriptor aSharedData;
138 : LayersBackend aBackend;
139 : TextureFlags aTextureFlags;
140 : uint64_t aSerial;
141 :
142 0 : if ((!(Read((&(handle__)), (&(msg__)), (&(iter__)))))) {
143 0 : FatalError("Error deserializing 'ActorHandle'");
144 0 : return MsgValueError;
145 : }
146 : // Sentinel = 'actor'
147 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
148 0 : mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'");
149 0 : return MsgValueError;
150 : }
151 0 : if ((!(Read((&(aSharedData)), (&(msg__)), (&(iter__)))))) {
152 0 : FatalError("Error deserializing 'SurfaceDescriptor'");
153 0 : return MsgValueError;
154 : }
155 : // Sentinel = 'aSharedData'
156 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3013593029)))) {
157 0 : mozilla::ipc::SentinelReadError("Error deserializing 'SurfaceDescriptor'");
158 0 : return MsgValueError;
159 : }
160 0 : if ((!(Read((&(aBackend)), (&(msg__)), (&(iter__)))))) {
161 0 : FatalError("Error deserializing 'LayersBackend'");
162 0 : return MsgValueError;
163 : }
164 : // Sentinel = 'aBackend'
165 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2878499283)))) {
166 0 : mozilla::ipc::SentinelReadError("Error deserializing 'LayersBackend'");
167 0 : return MsgValueError;
168 : }
169 0 : if ((!(Read((&(aTextureFlags)), (&(msg__)), (&(iter__)))))) {
170 0 : FatalError("Error deserializing 'TextureFlags'");
171 0 : return MsgValueError;
172 : }
173 : // Sentinel = 'aTextureFlags'
174 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3005687826)))) {
175 0 : mozilla::ipc::SentinelReadError("Error deserializing 'TextureFlags'");
176 0 : return MsgValueError;
177 : }
178 0 : if ((!(Read((&(aSerial)), (&(msg__)), (&(iter__)))))) {
179 0 : FatalError("Error deserializing 'uint64_t'");
180 0 : return MsgValueError;
181 : }
182 : // Sentinel = 'aSerial'
183 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1247987114)))) {
184 0 : mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
185 0 : return MsgValueError;
186 : }
187 0 : (msg__).EndRead(iter__, (msg__).type());
188 0 : PVideoBridge::Transition(PVideoBridge::Msg_PTextureConstructor__ID, (&(mState)));
189 0 : actor = AllocPTextureParent(aSharedData, aBackend, aTextureFlags, aSerial);
190 0 : if ((!(actor))) {
191 0 : NS_WARNING("Error constructing actor PTextureParent");
192 0 : return MsgValueError;
193 : }
194 0 : (actor)->SetManager(this);
195 0 : RegisterID(actor, (handle__).mId);
196 0 : (actor)->SetIPCChannel(GetIPCChannel());
197 0 : (mManagedPTextureParent).PutEntry(actor);
198 0 : (actor)->mState = mozilla::layers::PTexture::__Start;
199 :
200 0 : if ((!(RecvPTextureConstructor(mozilla::Move(actor), mozilla::Move(aSharedData), mozilla::Move(aBackend), mozilla::Move(aTextureFlags), mozilla::Move(aSerial))))) {
201 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
202 : // Error handled in mozilla::ipc::IPCResult
203 0 : return MsgProcessingError;
204 : }
205 :
206 0 : return MsgProcessed;
207 : }
208 : default:
209 : {
210 0 : return MsgNotKnown;
211 : }
212 : case SHMEM_CREATED_MESSAGE_TYPE:
213 : {
214 0 : if ((!(ShmemCreated(msg__)))) {
215 0 : return MsgPayloadError;
216 : }
217 0 : return MsgProcessed;
218 : }
219 : case SHMEM_DESTROYED_MESSAGE_TYPE:
220 : {
221 0 : if ((!(ShmemDestroyed(msg__)))) {
222 0 : return MsgPayloadError;
223 : }
224 0 : return MsgProcessed;
225 : }
226 : }
227 : }
228 :
229 0 : auto PVideoBridgeParent::OnMessageReceived(
230 : const Message& msg__,
231 : Message*& reply__) -> PVideoBridgeParent::Result
232 : {
233 0 : int32_t route__ = (msg__).routing_id();
234 0 : if ((MSG_ROUTING_CONTROL) != (route__)) {
235 0 : ChannelListener* routed__ = Lookup(route__);
236 0 : if ((!(routed__))) {
237 0 : return MsgRouteError;
238 : }
239 0 : return (routed__)->OnMessageReceived(msg__, reply__);
240 : }
241 :
242 0 : return MsgNotKnown;
243 : }
244 :
245 0 : auto PVideoBridgeParent::OnCallReceived(
246 : const Message& msg__,
247 : Message*& reply__) -> PVideoBridgeParent::Result
248 : {
249 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
250 : return MsgNotKnown;
251 : }
252 :
253 0 : auto PVideoBridgeParent::GetProtocolTypeId() -> int32_t
254 : {
255 0 : return PVideoBridgeMsgStart;
256 : }
257 :
258 0 : auto PVideoBridgeParent::OnChannelClose() -> void
259 : {
260 0 : DestroySubtree(NormalShutdown);
261 0 : DeallocSubtree();
262 0 : DeallocShmems();
263 0 : DeallocPVideoBridgeParent();
264 0 : }
265 :
266 0 : auto PVideoBridgeParent::OnChannelError() -> void
267 : {
268 0 : DestroySubtree(AbnormalShutdown);
269 0 : DeallocSubtree();
270 0 : DeallocShmems();
271 0 : DeallocPVideoBridgeParent();
272 0 : }
273 :
274 0 : auto PVideoBridgeParent::ProtocolName() const -> const char*
275 : {
276 0 : return "PVideoBridgeParent";
277 : }
278 :
279 0 : auto PVideoBridgeParent::DestroySubtree(ActorDestroyReason why) -> void
280 : {
281 0 : ActorDestroyReason subtreewhy = (((why) == (Deletion)) || ((why) == (FailedConstructor)) ? AncestorDeletion : why);
282 :
283 : {
284 : // Recursively shutting down PTexture kids
285 0 : nsTArray<PTextureParent*> kids;
286 : // Accumulate kids into a stable structure to iterate over
287 0 : ManagedPTextureParent(kids);
288 0 : for (auto& kid : kids) {
289 : // Guarding against a child removing a sibling from the list during the iteration.
290 0 : if ((mManagedPTextureParent).Contains(kid)) {
291 0 : (kid)->DestroySubtree(subtreewhy);
292 : }
293 : }
294 : }
295 :
296 : // Reject owning pending promises.
297 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
298 :
299 : // Finally, destroy "us".
300 0 : ActorDestroy(why);
301 0 : }
302 :
303 0 : auto PVideoBridgeParent::DeallocSubtree() -> void
304 : {
305 : {
306 : // Recursively deleting PTexture kids
307 0 : for (auto iter = (mManagedPTextureParent).Iter(); (!((iter).Done())); (iter).Next()) {
308 0 : (((iter).Get())->GetKey())->DeallocSubtree();
309 : }
310 :
311 0 : for (auto iter = (mManagedPTextureParent).Iter(); (!((iter).Done())); (iter).Next()) {
312 0 : DeallocPTextureParent(((iter).Get())->GetKey());
313 : }
314 0 : (mManagedPTextureParent).Clear();
315 : }
316 0 : }
317 :
318 0 : auto PVideoBridgeParent::DeallocPVideoBridgeParent() -> void
319 : {
320 0 : }
321 :
322 0 : auto PVideoBridgeParent::Write(
323 : const EGLImageDescriptor& v__,
324 : Message* msg__) -> void
325 : {
326 0 : Write((v__).image(), msg__);
327 : // Sentinel = 'image'
328 0 : (msg__)->WriteSentinel(103190282);
329 0 : Write((v__).fence(), msg__);
330 : // Sentinel = 'fence'
331 0 : (msg__)->WriteSentinel(1225633926);
332 0 : Write((v__).size(), msg__);
333 : // Sentinel = 'size'
334 0 : (msg__)->WriteSentinel(931048223);
335 0 : Write((v__).hasAlpha(), msg__);
336 : // Sentinel = 'hasAlpha'
337 0 : (msg__)->WriteSentinel(309498444);
338 0 : }
339 :
340 0 : auto PVideoBridgeParent::Read(
341 : EGLImageDescriptor* v__,
342 : const Message* msg__,
343 : PickleIterator* iter__) -> bool
344 : {
345 0 : if ((!(Read((&((v__)->image())), msg__, iter__)))) {
346 0 : FatalError("Error deserializing 'image' (uintptr_t) member of 'EGLImageDescriptor'");
347 0 : return false;
348 : }
349 : // Sentinel = 'image'
350 0 : if ((!((msg__)->ReadSentinel(iter__, 103190282)))) {
351 0 : mozilla::ipc::SentinelReadError("Error deserializing 'image' (uintptr_t) member of 'EGLImageDescriptor'");
352 0 : return false;
353 : }
354 0 : if ((!(Read((&((v__)->fence())), msg__, iter__)))) {
355 0 : FatalError("Error deserializing 'fence' (uintptr_t) member of 'EGLImageDescriptor'");
356 0 : return false;
357 : }
358 : // Sentinel = 'fence'
359 0 : if ((!((msg__)->ReadSentinel(iter__, 1225633926)))) {
360 0 : mozilla::ipc::SentinelReadError("Error deserializing 'fence' (uintptr_t) member of 'EGLImageDescriptor'");
361 0 : return false;
362 : }
363 0 : if ((!(Read((&((v__)->size())), msg__, iter__)))) {
364 0 : FatalError("Error deserializing 'size' (IntSize) member of 'EGLImageDescriptor'");
365 0 : return false;
366 : }
367 : // Sentinel = 'size'
368 0 : if ((!((msg__)->ReadSentinel(iter__, 931048223)))) {
369 0 : mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'EGLImageDescriptor'");
370 0 : return false;
371 : }
372 0 : if ((!(Read((&((v__)->hasAlpha())), msg__, iter__)))) {
373 0 : FatalError("Error deserializing 'hasAlpha' (bool) member of 'EGLImageDescriptor'");
374 0 : return false;
375 : }
376 : // Sentinel = 'hasAlpha'
377 0 : if ((!((msg__)->ReadSentinel(iter__, 309498444)))) {
378 0 : mozilla::ipc::SentinelReadError("Error deserializing 'hasAlpha' (bool) member of 'EGLImageDescriptor'");
379 0 : return false;
380 : }
381 0 : return true;
382 : }
383 :
384 0 : auto PVideoBridgeParent::Write(
385 : const SurfaceDescriptor& v__,
386 : Message* msg__) -> void
387 : {
388 : typedef SurfaceDescriptor type__;
389 0 : Write(int((v__).type()), msg__);
390 : // Sentinel = 'SurfaceDescriptor'
391 0 : (msg__)->WriteSentinel(1058499359);
392 :
393 0 : switch ((v__).type()) {
394 : case type__::TSurfaceDescriptorBuffer:
395 : {
396 0 : Write((v__).get_SurfaceDescriptorBuffer(), msg__);
397 : // Sentinel = 'TSurfaceDescriptorBuffer'
398 0 : (msg__)->WriteSentinel(2202696360);
399 0 : return;
400 : }
401 : case type__::TSurfaceDescriptorDIB:
402 : {
403 0 : Write((v__).get_SurfaceDescriptorDIB(), msg__);
404 : // Sentinel = 'TSurfaceDescriptorDIB'
405 0 : (msg__)->WriteSentinel(998410538);
406 0 : return;
407 : }
408 : case type__::TSurfaceDescriptorD3D10:
409 : {
410 0 : Write((v__).get_SurfaceDescriptorD3D10(), msg__);
411 : // Sentinel = 'TSurfaceDescriptorD3D10'
412 0 : (msg__)->WriteSentinel(2753564567);
413 0 : return;
414 : }
415 : case type__::TSurfaceDescriptorFileMapping:
416 : {
417 0 : Write((v__).get_SurfaceDescriptorFileMapping(), msg__);
418 : // Sentinel = 'TSurfaceDescriptorFileMapping'
419 0 : (msg__)->WriteSentinel(722196935);
420 0 : return;
421 : }
422 : case type__::TSurfaceDescriptorDXGIYCbCr:
423 : {
424 0 : Write((v__).get_SurfaceDescriptorDXGIYCbCr(), msg__);
425 : // Sentinel = 'TSurfaceDescriptorDXGIYCbCr'
426 0 : (msg__)->WriteSentinel(3061212892);
427 0 : return;
428 : }
429 : case type__::TSurfaceDescriptorX11:
430 : {
431 0 : Write((v__).get_SurfaceDescriptorX11(), msg__);
432 : // Sentinel = 'TSurfaceDescriptorX11'
433 0 : (msg__)->WriteSentinel(3923930613);
434 0 : return;
435 : }
436 : case type__::TSurfaceTextureDescriptor:
437 : {
438 0 : Write((v__).get_SurfaceTextureDescriptor(), msg__);
439 : // Sentinel = 'TSurfaceTextureDescriptor'
440 0 : (msg__)->WriteSentinel(2253946800);
441 0 : return;
442 : }
443 : case type__::TEGLImageDescriptor:
444 : {
445 0 : Write((v__).get_EGLImageDescriptor(), msg__);
446 : // Sentinel = 'TEGLImageDescriptor'
447 0 : (msg__)->WriteSentinel(2680446099);
448 0 : return;
449 : }
450 : case type__::TSurfaceDescriptorMacIOSurface:
451 : {
452 0 : Write((v__).get_SurfaceDescriptorMacIOSurface(), msg__);
453 : // Sentinel = 'TSurfaceDescriptorMacIOSurface'
454 0 : (msg__)->WriteSentinel(4267688786);
455 0 : return;
456 : }
457 : case type__::TSurfaceDescriptorSharedGLTexture:
458 : {
459 0 : Write((v__).get_SurfaceDescriptorSharedGLTexture(), msg__);
460 : // Sentinel = 'TSurfaceDescriptorSharedGLTexture'
461 0 : (msg__)->WriteSentinel(4169514976);
462 0 : return;
463 : }
464 : case type__::TSurfaceDescriptorGPUVideo:
465 : {
466 0 : Write((v__).get_SurfaceDescriptorGPUVideo(), msg__);
467 : // Sentinel = 'TSurfaceDescriptorGPUVideo'
468 0 : (msg__)->WriteSentinel(2406892431);
469 0 : return;
470 : }
471 : case type__::Tnull_t:
472 : {
473 0 : Write((v__).get_null_t(), msg__);
474 : // Sentinel = 'Tnull_t'
475 0 : (msg__)->WriteSentinel(3731137201);
476 0 : return;
477 : }
478 : default:
479 : {
480 0 : FatalError("unknown union type");
481 0 : return;
482 : }
483 : }
484 : }
485 :
486 0 : auto PVideoBridgeParent::Read(
487 : SurfaceDescriptor* v__,
488 : const Message* msg__,
489 : PickleIterator* iter__) -> bool
490 : {
491 : typedef SurfaceDescriptor type__;
492 : int type;
493 0 : if ((!(Read((&(type)), msg__, iter__)))) {
494 0 : mozilla::ipc::UnionTypeReadError("SurfaceDescriptor");
495 0 : return false;
496 : }
497 : // Sentinel = 'SurfaceDescriptor'
498 0 : if ((!((msg__)->ReadSentinel(iter__, 1058499359)))) {
499 0 : mozilla::ipc::SentinelReadError("SurfaceDescriptor");
500 0 : return false;
501 : }
502 :
503 0 : switch (type) {
504 : case type__::TSurfaceDescriptorBuffer:
505 : {
506 0 : SurfaceDescriptorBuffer tmp = SurfaceDescriptorBuffer();
507 0 : (*(v__)) = tmp;
508 0 : if ((!(Read((&((v__)->get_SurfaceDescriptorBuffer())), msg__, iter__)))) {
509 0 : FatalError("Error deserializing Union type");
510 0 : return false;
511 : }
512 : // Sentinel = 'TSurfaceDescriptorBuffer'
513 0 : if ((!((msg__)->ReadSentinel(iter__, 2202696360)))) {
514 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
515 0 : return false;
516 : }
517 0 : return true;
518 : }
519 : case type__::TSurfaceDescriptorDIB:
520 : {
521 0 : SurfaceDescriptorDIB tmp = SurfaceDescriptorDIB();
522 0 : (*(v__)) = tmp;
523 0 : if ((!(Read((&((v__)->get_SurfaceDescriptorDIB())), msg__, iter__)))) {
524 0 : FatalError("Error deserializing Union type");
525 0 : return false;
526 : }
527 : // Sentinel = 'TSurfaceDescriptorDIB'
528 0 : if ((!((msg__)->ReadSentinel(iter__, 998410538)))) {
529 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
530 0 : return false;
531 : }
532 0 : return true;
533 : }
534 : case type__::TSurfaceDescriptorD3D10:
535 : {
536 0 : SurfaceDescriptorD3D10 tmp = SurfaceDescriptorD3D10();
537 0 : (*(v__)) = tmp;
538 0 : if ((!(Read((&((v__)->get_SurfaceDescriptorD3D10())), msg__, iter__)))) {
539 0 : FatalError("Error deserializing Union type");
540 0 : return false;
541 : }
542 : // Sentinel = 'TSurfaceDescriptorD3D10'
543 0 : if ((!((msg__)->ReadSentinel(iter__, 2753564567)))) {
544 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
545 0 : return false;
546 : }
547 0 : return true;
548 : }
549 : case type__::TSurfaceDescriptorFileMapping:
550 : {
551 0 : SurfaceDescriptorFileMapping tmp = SurfaceDescriptorFileMapping();
552 0 : (*(v__)) = tmp;
553 0 : if ((!(Read((&((v__)->get_SurfaceDescriptorFileMapping())), msg__, iter__)))) {
554 0 : FatalError("Error deserializing Union type");
555 0 : return false;
556 : }
557 : // Sentinel = 'TSurfaceDescriptorFileMapping'
558 0 : if ((!((msg__)->ReadSentinel(iter__, 722196935)))) {
559 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
560 0 : return false;
561 : }
562 0 : return true;
563 : }
564 : case type__::TSurfaceDescriptorDXGIYCbCr:
565 : {
566 0 : SurfaceDescriptorDXGIYCbCr tmp = SurfaceDescriptorDXGIYCbCr();
567 0 : (*(v__)) = tmp;
568 0 : if ((!(Read((&((v__)->get_SurfaceDescriptorDXGIYCbCr())), msg__, iter__)))) {
569 0 : FatalError("Error deserializing Union type");
570 0 : return false;
571 : }
572 : // Sentinel = 'TSurfaceDescriptorDXGIYCbCr'
573 0 : if ((!((msg__)->ReadSentinel(iter__, 3061212892)))) {
574 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
575 0 : return false;
576 : }
577 0 : return true;
578 : }
579 : case type__::TSurfaceDescriptorX11:
580 : {
581 0 : SurfaceDescriptorX11 tmp = SurfaceDescriptorX11();
582 0 : (*(v__)) = tmp;
583 0 : if ((!(Read((&((v__)->get_SurfaceDescriptorX11())), msg__, iter__)))) {
584 0 : FatalError("Error deserializing Union type");
585 0 : return false;
586 : }
587 : // Sentinel = 'TSurfaceDescriptorX11'
588 0 : if ((!((msg__)->ReadSentinel(iter__, 3923930613)))) {
589 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
590 0 : return false;
591 : }
592 0 : return true;
593 : }
594 : case type__::TSurfaceTextureDescriptor:
595 : {
596 0 : SurfaceTextureDescriptor tmp = SurfaceTextureDescriptor();
597 0 : (*(v__)) = tmp;
598 0 : if ((!(Read((&((v__)->get_SurfaceTextureDescriptor())), msg__, iter__)))) {
599 0 : FatalError("Error deserializing Union type");
600 0 : return false;
601 : }
602 : // Sentinel = 'TSurfaceTextureDescriptor'
603 0 : if ((!((msg__)->ReadSentinel(iter__, 2253946800)))) {
604 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
605 0 : return false;
606 : }
607 0 : return true;
608 : }
609 : case type__::TEGLImageDescriptor:
610 : {
611 0 : EGLImageDescriptor tmp = EGLImageDescriptor();
612 0 : (*(v__)) = tmp;
613 0 : if ((!(Read((&((v__)->get_EGLImageDescriptor())), msg__, iter__)))) {
614 0 : FatalError("Error deserializing Union type");
615 0 : return false;
616 : }
617 : // Sentinel = 'TEGLImageDescriptor'
618 0 : if ((!((msg__)->ReadSentinel(iter__, 2680446099)))) {
619 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
620 0 : return false;
621 : }
622 0 : return true;
623 : }
624 : case type__::TSurfaceDescriptorMacIOSurface:
625 : {
626 0 : SurfaceDescriptorMacIOSurface tmp = SurfaceDescriptorMacIOSurface();
627 0 : (*(v__)) = tmp;
628 0 : if ((!(Read((&((v__)->get_SurfaceDescriptorMacIOSurface())), msg__, iter__)))) {
629 0 : FatalError("Error deserializing Union type");
630 0 : return false;
631 : }
632 : // Sentinel = 'TSurfaceDescriptorMacIOSurface'
633 0 : if ((!((msg__)->ReadSentinel(iter__, 4267688786)))) {
634 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
635 0 : return false;
636 : }
637 0 : return true;
638 : }
639 : case type__::TSurfaceDescriptorSharedGLTexture:
640 : {
641 0 : SurfaceDescriptorSharedGLTexture tmp = SurfaceDescriptorSharedGLTexture();
642 0 : (*(v__)) = tmp;
643 0 : if ((!(Read((&((v__)->get_SurfaceDescriptorSharedGLTexture())), msg__, iter__)))) {
644 0 : FatalError("Error deserializing Union type");
645 0 : return false;
646 : }
647 : // Sentinel = 'TSurfaceDescriptorSharedGLTexture'
648 0 : if ((!((msg__)->ReadSentinel(iter__, 4169514976)))) {
649 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
650 0 : return false;
651 : }
652 0 : return true;
653 : }
654 : case type__::TSurfaceDescriptorGPUVideo:
655 : {
656 0 : SurfaceDescriptorGPUVideo tmp = SurfaceDescriptorGPUVideo();
657 0 : (*(v__)) = tmp;
658 0 : if ((!(Read((&((v__)->get_SurfaceDescriptorGPUVideo())), msg__, iter__)))) {
659 0 : FatalError("Error deserializing Union type");
660 0 : return false;
661 : }
662 : // Sentinel = 'TSurfaceDescriptorGPUVideo'
663 0 : if ((!((msg__)->ReadSentinel(iter__, 2406892431)))) {
664 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
665 0 : return false;
666 : }
667 0 : return true;
668 : }
669 : case type__::Tnull_t:
670 : {
671 : null_t tmp = null_t();
672 0 : (*(v__)) = tmp;
673 0 : if ((!(Read((&((v__)->get_null_t())), msg__, iter__)))) {
674 0 : FatalError("Error deserializing Union type");
675 0 : return false;
676 : }
677 : // Sentinel = 'Tnull_t'
678 0 : if ((!((msg__)->ReadSentinel(iter__, 3731137201)))) {
679 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
680 0 : return false;
681 : }
682 0 : return true;
683 : }
684 : default:
685 : {
686 0 : FatalError("unknown union type");
687 0 : return false;
688 : }
689 : }
690 : }
691 :
692 0 : auto PVideoBridgeParent::Write(
693 : const MemoryOrShmem& v__,
694 : Message* msg__) -> void
695 : {
696 : typedef MemoryOrShmem type__;
697 0 : Write(int((v__).type()), msg__);
698 : // Sentinel = 'MemoryOrShmem'
699 0 : (msg__)->WriteSentinel(3227621763);
700 :
701 0 : switch ((v__).type()) {
702 : case type__::Tuintptr_t:
703 : {
704 0 : Write((v__).get_uintptr_t(), msg__);
705 : // Sentinel = 'Tuintptr_t'
706 0 : (msg__)->WriteSentinel(3218141805);
707 0 : return;
708 : }
709 : case type__::TShmem:
710 : {
711 0 : Write((v__).get_Shmem(), msg__);
712 : // Sentinel = 'TShmem'
713 0 : (msg__)->WriteSentinel(3517971266);
714 0 : return;
715 : }
716 : default:
717 : {
718 0 : FatalError("unknown union type");
719 0 : return;
720 : }
721 : }
722 : }
723 :
724 0 : auto PVideoBridgeParent::Read(
725 : MemoryOrShmem* v__,
726 : const Message* msg__,
727 : PickleIterator* iter__) -> bool
728 : {
729 : typedef MemoryOrShmem type__;
730 : int type;
731 0 : if ((!(Read((&(type)), msg__, iter__)))) {
732 0 : mozilla::ipc::UnionTypeReadError("MemoryOrShmem");
733 0 : return false;
734 : }
735 : // Sentinel = 'MemoryOrShmem'
736 0 : if ((!((msg__)->ReadSentinel(iter__, 3227621763)))) {
737 0 : mozilla::ipc::SentinelReadError("MemoryOrShmem");
738 0 : return false;
739 : }
740 :
741 0 : switch (type) {
742 : case type__::Tuintptr_t:
743 : {
744 0 : uintptr_t tmp = uintptr_t();
745 0 : (*(v__)) = tmp;
746 0 : if ((!(Read((&((v__)->get_uintptr_t())), msg__, iter__)))) {
747 0 : FatalError("Error deserializing Union type");
748 0 : return false;
749 : }
750 : // Sentinel = 'Tuintptr_t'
751 0 : if ((!((msg__)->ReadSentinel(iter__, 3218141805)))) {
752 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
753 0 : return false;
754 : }
755 0 : return true;
756 : }
757 : case type__::TShmem:
758 : {
759 0 : Shmem tmp = Shmem();
760 0 : (*(v__)) = tmp;
761 0 : if ((!(Read((&((v__)->get_Shmem())), msg__, iter__)))) {
762 0 : FatalError("Error deserializing Union type");
763 0 : return false;
764 : }
765 : // Sentinel = 'TShmem'
766 0 : if ((!((msg__)->ReadSentinel(iter__, 3517971266)))) {
767 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
768 0 : return false;
769 : }
770 0 : return true;
771 : }
772 : default:
773 : {
774 0 : FatalError("unknown union type");
775 0 : return false;
776 : }
777 : }
778 : }
779 :
780 0 : auto PVideoBridgeParent::Write(
781 : const SurfaceDescriptorBuffer& v__,
782 : Message* msg__) -> void
783 : {
784 0 : Write((v__).desc(), msg__);
785 : // Sentinel = 'desc'
786 0 : (msg__)->WriteSentinel(3761872479);
787 0 : Write((v__).data(), msg__);
788 : // Sentinel = 'data'
789 0 : (msg__)->WriteSentinel(843352540);
790 0 : }
791 :
792 0 : auto PVideoBridgeParent::Read(
793 : SurfaceDescriptorBuffer* v__,
794 : const Message* msg__,
795 : PickleIterator* iter__) -> bool
796 : {
797 0 : if ((!(Read((&((v__)->desc())), msg__, iter__)))) {
798 0 : FatalError("Error deserializing 'desc' (BufferDescriptor) member of 'SurfaceDescriptorBuffer'");
799 0 : return false;
800 : }
801 : // Sentinel = 'desc'
802 0 : if ((!((msg__)->ReadSentinel(iter__, 3761872479)))) {
803 0 : mozilla::ipc::SentinelReadError("Error deserializing 'desc' (BufferDescriptor) member of 'SurfaceDescriptorBuffer'");
804 0 : return false;
805 : }
806 0 : if ((!(Read((&((v__)->data())), msg__, iter__)))) {
807 0 : FatalError("Error deserializing 'data' (MemoryOrShmem) member of 'SurfaceDescriptorBuffer'");
808 0 : return false;
809 : }
810 : // Sentinel = 'data'
811 0 : if ((!((msg__)->ReadSentinel(iter__, 843352540)))) {
812 0 : mozilla::ipc::SentinelReadError("Error deserializing 'data' (MemoryOrShmem) member of 'SurfaceDescriptorBuffer'");
813 0 : return false;
814 : }
815 0 : return true;
816 : }
817 :
818 0 : auto PVideoBridgeParent::Write(
819 : const SurfaceDescriptorDXGIYCbCr& v__,
820 : Message* msg__) -> void
821 : {
822 0 : Write((v__).handleY(), msg__);
823 : // Sentinel = 'handleY'
824 0 : (msg__)->WriteSentinel(2719705368);
825 0 : Write((v__).handleCb(), msg__);
826 : // Sentinel = 'handleCb'
827 0 : (msg__)->WriteSentinel(2777335333);
828 0 : Write((v__).handleCr(), msg__);
829 : // Sentinel = 'handleCr'
830 0 : (msg__)->WriteSentinel(2777335349);
831 0 : Write((v__).size(), msg__);
832 : // Sentinel = 'size'
833 0 : (msg__)->WriteSentinel(931048223);
834 0 : Write((v__).sizeY(), msg__);
835 : // Sentinel = 'sizeY'
836 0 : (msg__)->WriteSentinel(886619725);
837 0 : Write((v__).sizeCbCr(), msg__);
838 : // Sentinel = 'sizeCbCr'
839 0 : (msg__)->WriteSentinel(2196484423);
840 0 : }
841 :
842 0 : auto PVideoBridgeParent::Read(
843 : SurfaceDescriptorDXGIYCbCr* v__,
844 : const Message* msg__,
845 : PickleIterator* iter__) -> bool
846 : {
847 0 : if ((!(Read((&((v__)->handleY())), msg__, iter__)))) {
848 0 : FatalError("Error deserializing 'handleY' (WindowsHandle) member of 'SurfaceDescriptorDXGIYCbCr'");
849 0 : return false;
850 : }
851 : // Sentinel = 'handleY'
852 0 : if ((!((msg__)->ReadSentinel(iter__, 2719705368)))) {
853 0 : mozilla::ipc::SentinelReadError("Error deserializing 'handleY' (WindowsHandle) member of 'SurfaceDescriptorDXGIYCbCr'");
854 0 : return false;
855 : }
856 0 : if ((!(Read((&((v__)->handleCb())), msg__, iter__)))) {
857 0 : FatalError("Error deserializing 'handleCb' (WindowsHandle) member of 'SurfaceDescriptorDXGIYCbCr'");
858 0 : return false;
859 : }
860 : // Sentinel = 'handleCb'
861 0 : if ((!((msg__)->ReadSentinel(iter__, 2777335333)))) {
862 0 : mozilla::ipc::SentinelReadError("Error deserializing 'handleCb' (WindowsHandle) member of 'SurfaceDescriptorDXGIYCbCr'");
863 0 : return false;
864 : }
865 0 : if ((!(Read((&((v__)->handleCr())), msg__, iter__)))) {
866 0 : FatalError("Error deserializing 'handleCr' (WindowsHandle) member of 'SurfaceDescriptorDXGIYCbCr'");
867 0 : return false;
868 : }
869 : // Sentinel = 'handleCr'
870 0 : if ((!((msg__)->ReadSentinel(iter__, 2777335349)))) {
871 0 : mozilla::ipc::SentinelReadError("Error deserializing 'handleCr' (WindowsHandle) member of 'SurfaceDescriptorDXGIYCbCr'");
872 0 : return false;
873 : }
874 0 : if ((!(Read((&((v__)->size())), msg__, iter__)))) {
875 0 : FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'");
876 0 : return false;
877 : }
878 : // Sentinel = 'size'
879 0 : if ((!((msg__)->ReadSentinel(iter__, 931048223)))) {
880 0 : mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'");
881 0 : return false;
882 : }
883 0 : if ((!(Read((&((v__)->sizeY())), msg__, iter__)))) {
884 0 : FatalError("Error deserializing 'sizeY' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'");
885 0 : return false;
886 : }
887 : // Sentinel = 'sizeY'
888 0 : if ((!((msg__)->ReadSentinel(iter__, 886619725)))) {
889 0 : mozilla::ipc::SentinelReadError("Error deserializing 'sizeY' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'");
890 0 : return false;
891 : }
892 0 : if ((!(Read((&((v__)->sizeCbCr())), msg__, iter__)))) {
893 0 : FatalError("Error deserializing 'sizeCbCr' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'");
894 0 : return false;
895 : }
896 : // Sentinel = 'sizeCbCr'
897 0 : if ((!((msg__)->ReadSentinel(iter__, 2196484423)))) {
898 0 : mozilla::ipc::SentinelReadError("Error deserializing 'sizeCbCr' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'");
899 0 : return false;
900 : }
901 0 : return true;
902 : }
903 :
904 0 : auto PVideoBridgeParent::Write(
905 : const SurfaceDescriptorDIB& v__,
906 : Message* msg__) -> void
907 : {
908 0 : Write((v__).surface(), msg__);
909 : // Sentinel = 'surface'
910 0 : (msg__)->WriteSentinel(2386836878);
911 0 : }
912 :
913 0 : auto PVideoBridgeParent::Read(
914 : SurfaceDescriptorDIB* v__,
915 : const Message* msg__,
916 : PickleIterator* iter__) -> bool
917 : {
918 0 : if ((!(Read((&((v__)->surface())), msg__, iter__)))) {
919 0 : FatalError("Error deserializing 'surface' (uintptr_t) member of 'SurfaceDescriptorDIB'");
920 0 : return false;
921 : }
922 : // Sentinel = 'surface'
923 0 : if ((!((msg__)->ReadSentinel(iter__, 2386836878)))) {
924 0 : mozilla::ipc::SentinelReadError("Error deserializing 'surface' (uintptr_t) member of 'SurfaceDescriptorDIB'");
925 0 : return false;
926 : }
927 0 : return true;
928 : }
929 :
930 0 : auto PVideoBridgeParent::Write(
931 : const RGBDescriptor& v__,
932 : Message* msg__) -> void
933 : {
934 0 : Write((v__).size(), msg__);
935 : // Sentinel = 'size'
936 0 : (msg__)->WriteSentinel(931048223);
937 0 : Write((v__).format(), msg__);
938 : // Sentinel = 'format'
939 0 : (msg__)->WriteSentinel(2052265543);
940 0 : Write((v__).hasIntermediateBuffer(), msg__);
941 : // Sentinel = 'hasIntermediateBuffer'
942 0 : (msg__)->WriteSentinel(985857996);
943 0 : }
944 :
945 0 : auto PVideoBridgeParent::Read(
946 : RGBDescriptor* v__,
947 : const Message* msg__,
948 : PickleIterator* iter__) -> bool
949 : {
950 0 : if ((!(Read((&((v__)->size())), msg__, iter__)))) {
951 0 : FatalError("Error deserializing 'size' (IntSize) member of 'RGBDescriptor'");
952 0 : return false;
953 : }
954 : // Sentinel = 'size'
955 0 : if ((!((msg__)->ReadSentinel(iter__, 931048223)))) {
956 0 : mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'RGBDescriptor'");
957 0 : return false;
958 : }
959 0 : if ((!(Read((&((v__)->format())), msg__, iter__)))) {
960 0 : FatalError("Error deserializing 'format' (SurfaceFormat) member of 'RGBDescriptor'");
961 0 : return false;
962 : }
963 : // Sentinel = 'format'
964 0 : if ((!((msg__)->ReadSentinel(iter__, 2052265543)))) {
965 0 : mozilla::ipc::SentinelReadError("Error deserializing 'format' (SurfaceFormat) member of 'RGBDescriptor'");
966 0 : return false;
967 : }
968 0 : if ((!(Read((&((v__)->hasIntermediateBuffer())), msg__, iter__)))) {
969 0 : FatalError("Error deserializing 'hasIntermediateBuffer' (bool) member of 'RGBDescriptor'");
970 0 : return false;
971 : }
972 : // Sentinel = 'hasIntermediateBuffer'
973 0 : if ((!((msg__)->ReadSentinel(iter__, 985857996)))) {
974 0 : mozilla::ipc::SentinelReadError("Error deserializing 'hasIntermediateBuffer' (bool) member of 'RGBDescriptor'");
975 0 : return false;
976 : }
977 0 : return true;
978 : }
979 :
980 0 : auto PVideoBridgeParent::Write(
981 : const SurfaceTextureDescriptor& v__,
982 : Message* msg__) -> void
983 : {
984 0 : Write((v__).handle(), msg__);
985 : // Sentinel = 'handle'
986 0 : (msg__)->WriteSentinel(453975108);
987 0 : Write((v__).size(), msg__);
988 : // Sentinel = 'size'
989 0 : (msg__)->WriteSentinel(931048223);
990 0 : Write((v__).continuous(), msg__);
991 : // Sentinel = 'continuous'
992 0 : (msg__)->WriteSentinel(2103626571);
993 0 : }
994 :
995 0 : auto PVideoBridgeParent::Read(
996 : SurfaceTextureDescriptor* v__,
997 : const Message* msg__,
998 : PickleIterator* iter__) -> bool
999 : {
1000 0 : if ((!(Read((&((v__)->handle())), msg__, iter__)))) {
1001 0 : FatalError("Error deserializing 'handle' (uint64_t) member of 'SurfaceTextureDescriptor'");
1002 0 : return false;
1003 : }
1004 : // Sentinel = 'handle'
1005 0 : if ((!((msg__)->ReadSentinel(iter__, 453975108)))) {
1006 0 : mozilla::ipc::SentinelReadError("Error deserializing 'handle' (uint64_t) member of 'SurfaceTextureDescriptor'");
1007 0 : return false;
1008 : }
1009 0 : if ((!(Read((&((v__)->size())), msg__, iter__)))) {
1010 0 : FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceTextureDescriptor'");
1011 0 : return false;
1012 : }
1013 : // Sentinel = 'size'
1014 0 : if ((!((msg__)->ReadSentinel(iter__, 931048223)))) {
1015 0 : mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceTextureDescriptor'");
1016 0 : return false;
1017 : }
1018 0 : if ((!(Read((&((v__)->continuous())), msg__, iter__)))) {
1019 0 : FatalError("Error deserializing 'continuous' (bool) member of 'SurfaceTextureDescriptor'");
1020 0 : return false;
1021 : }
1022 : // Sentinel = 'continuous'
1023 0 : if ((!((msg__)->ReadSentinel(iter__, 2103626571)))) {
1024 0 : mozilla::ipc::SentinelReadError("Error deserializing 'continuous' (bool) member of 'SurfaceTextureDescriptor'");
1025 0 : return false;
1026 : }
1027 0 : return true;
1028 : }
1029 :
1030 0 : auto PVideoBridgeParent::Write(
1031 : const SurfaceDescriptorFileMapping& v__,
1032 : Message* msg__) -> void
1033 : {
1034 0 : Write((v__).handle(), msg__);
1035 : // Sentinel = 'handle'
1036 0 : (msg__)->WriteSentinel(453975108);
1037 0 : Write((v__).format(), msg__);
1038 : // Sentinel = 'format'
1039 0 : (msg__)->WriteSentinel(2052265543);
1040 0 : Write((v__).size(), msg__);
1041 : // Sentinel = 'size'
1042 0 : (msg__)->WriteSentinel(931048223);
1043 0 : }
1044 :
1045 0 : auto PVideoBridgeParent::Read(
1046 : SurfaceDescriptorFileMapping* v__,
1047 : const Message* msg__,
1048 : PickleIterator* iter__) -> bool
1049 : {
1050 0 : if ((!(Read((&((v__)->handle())), msg__, iter__)))) {
1051 0 : FatalError("Error deserializing 'handle' (WindowsHandle) member of 'SurfaceDescriptorFileMapping'");
1052 0 : return false;
1053 : }
1054 : // Sentinel = 'handle'
1055 0 : if ((!((msg__)->ReadSentinel(iter__, 453975108)))) {
1056 0 : mozilla::ipc::SentinelReadError("Error deserializing 'handle' (WindowsHandle) member of 'SurfaceDescriptorFileMapping'");
1057 0 : return false;
1058 : }
1059 0 : if ((!(Read((&((v__)->format())), msg__, iter__)))) {
1060 0 : FatalError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorFileMapping'");
1061 0 : return false;
1062 : }
1063 : // Sentinel = 'format'
1064 0 : if ((!((msg__)->ReadSentinel(iter__, 2052265543)))) {
1065 0 : mozilla::ipc::SentinelReadError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorFileMapping'");
1066 0 : return false;
1067 : }
1068 0 : if ((!(Read((&((v__)->size())), msg__, iter__)))) {
1069 0 : FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorFileMapping'");
1070 0 : return false;
1071 : }
1072 : // Sentinel = 'size'
1073 0 : if ((!((msg__)->ReadSentinel(iter__, 931048223)))) {
1074 0 : mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorFileMapping'");
1075 0 : return false;
1076 : }
1077 0 : return true;
1078 : }
1079 :
1080 0 : auto PVideoBridgeParent::Write(
1081 : const SurfaceDescriptorSharedGLTexture& v__,
1082 : Message* msg__) -> void
1083 : {
1084 0 : Write((v__).texture(), msg__);
1085 : // Sentinel = 'texture'
1086 0 : (msg__)->WriteSentinel(3654462510);
1087 0 : Write((v__).target(), msg__);
1088 : // Sentinel = 'target'
1089 0 : (msg__)->WriteSentinel(2226365285);
1090 0 : Write((v__).fence(), msg__);
1091 : // Sentinel = 'fence'
1092 0 : (msg__)->WriteSentinel(1225633926);
1093 0 : Write((v__).size(), msg__);
1094 : // Sentinel = 'size'
1095 0 : (msg__)->WriteSentinel(931048223);
1096 0 : Write((v__).hasAlpha(), msg__);
1097 : // Sentinel = 'hasAlpha'
1098 0 : (msg__)->WriteSentinel(309498444);
1099 0 : }
1100 :
1101 0 : auto PVideoBridgeParent::Read(
1102 : SurfaceDescriptorSharedGLTexture* v__,
1103 : const Message* msg__,
1104 : PickleIterator* iter__) -> bool
1105 : {
1106 0 : if ((!(Read((&((v__)->texture())), msg__, iter__)))) {
1107 0 : FatalError("Error deserializing 'texture' (uint32_t) member of 'SurfaceDescriptorSharedGLTexture'");
1108 0 : return false;
1109 : }
1110 : // Sentinel = 'texture'
1111 0 : if ((!((msg__)->ReadSentinel(iter__, 3654462510)))) {
1112 0 : mozilla::ipc::SentinelReadError("Error deserializing 'texture' (uint32_t) member of 'SurfaceDescriptorSharedGLTexture'");
1113 0 : return false;
1114 : }
1115 0 : if ((!(Read((&((v__)->target())), msg__, iter__)))) {
1116 0 : FatalError("Error deserializing 'target' (uint32_t) member of 'SurfaceDescriptorSharedGLTexture'");
1117 0 : return false;
1118 : }
1119 : // Sentinel = 'target'
1120 0 : if ((!((msg__)->ReadSentinel(iter__, 2226365285)))) {
1121 0 : mozilla::ipc::SentinelReadError("Error deserializing 'target' (uint32_t) member of 'SurfaceDescriptorSharedGLTexture'");
1122 0 : return false;
1123 : }
1124 0 : if ((!(Read((&((v__)->fence())), msg__, iter__)))) {
1125 0 : FatalError("Error deserializing 'fence' (uintptr_t) member of 'SurfaceDescriptorSharedGLTexture'");
1126 0 : return false;
1127 : }
1128 : // Sentinel = 'fence'
1129 0 : if ((!((msg__)->ReadSentinel(iter__, 1225633926)))) {
1130 0 : mozilla::ipc::SentinelReadError("Error deserializing 'fence' (uintptr_t) member of 'SurfaceDescriptorSharedGLTexture'");
1131 0 : return false;
1132 : }
1133 0 : if ((!(Read((&((v__)->size())), msg__, iter__)))) {
1134 0 : FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorSharedGLTexture'");
1135 0 : return false;
1136 : }
1137 : // Sentinel = 'size'
1138 0 : if ((!((msg__)->ReadSentinel(iter__, 931048223)))) {
1139 0 : mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorSharedGLTexture'");
1140 0 : return false;
1141 : }
1142 0 : if ((!(Read((&((v__)->hasAlpha())), msg__, iter__)))) {
1143 0 : FatalError("Error deserializing 'hasAlpha' (bool) member of 'SurfaceDescriptorSharedGLTexture'");
1144 0 : return false;
1145 : }
1146 : // Sentinel = 'hasAlpha'
1147 0 : if ((!((msg__)->ReadSentinel(iter__, 309498444)))) {
1148 0 : mozilla::ipc::SentinelReadError("Error deserializing 'hasAlpha' (bool) member of 'SurfaceDescriptorSharedGLTexture'");
1149 0 : return false;
1150 : }
1151 0 : return true;
1152 : }
1153 :
1154 0 : auto PVideoBridgeParent::Write(
1155 : const SurfaceDescriptorMacIOSurface& v__,
1156 : Message* msg__) -> void
1157 : {
1158 0 : Write((v__).surfaceId(), msg__);
1159 : // Sentinel = 'surfaceId'
1160 0 : (msg__)->WriteSentinel(4108848731);
1161 0 : Write((v__).scaleFactor(), msg__);
1162 : // Sentinel = 'scaleFactor'
1163 0 : (msg__)->WriteSentinel(1184637148);
1164 0 : Write((v__).isOpaque(), msg__);
1165 : // Sentinel = 'isOpaque'
1166 0 : (msg__)->WriteSentinel(3519081617);
1167 0 : }
1168 :
1169 0 : auto PVideoBridgeParent::Read(
1170 : SurfaceDescriptorMacIOSurface* v__,
1171 : const Message* msg__,
1172 : PickleIterator* iter__) -> bool
1173 : {
1174 0 : if ((!(Read((&((v__)->surfaceId())), msg__, iter__)))) {
1175 0 : FatalError("Error deserializing 'surfaceId' (uint32_t) member of 'SurfaceDescriptorMacIOSurface'");
1176 0 : return false;
1177 : }
1178 : // Sentinel = 'surfaceId'
1179 0 : if ((!((msg__)->ReadSentinel(iter__, 4108848731)))) {
1180 0 : mozilla::ipc::SentinelReadError("Error deserializing 'surfaceId' (uint32_t) member of 'SurfaceDescriptorMacIOSurface'");
1181 0 : return false;
1182 : }
1183 0 : if ((!(Read((&((v__)->scaleFactor())), msg__, iter__)))) {
1184 0 : FatalError("Error deserializing 'scaleFactor' (double) member of 'SurfaceDescriptorMacIOSurface'");
1185 0 : return false;
1186 : }
1187 : // Sentinel = 'scaleFactor'
1188 0 : if ((!((msg__)->ReadSentinel(iter__, 1184637148)))) {
1189 0 : mozilla::ipc::SentinelReadError("Error deserializing 'scaleFactor' (double) member of 'SurfaceDescriptorMacIOSurface'");
1190 0 : return false;
1191 : }
1192 0 : if ((!(Read((&((v__)->isOpaque())), msg__, iter__)))) {
1193 0 : FatalError("Error deserializing 'isOpaque' (bool) member of 'SurfaceDescriptorMacIOSurface'");
1194 0 : return false;
1195 : }
1196 : // Sentinel = 'isOpaque'
1197 0 : if ((!((msg__)->ReadSentinel(iter__, 3519081617)))) {
1198 0 : mozilla::ipc::SentinelReadError("Error deserializing 'isOpaque' (bool) member of 'SurfaceDescriptorMacIOSurface'");
1199 0 : return false;
1200 : }
1201 0 : return true;
1202 : }
1203 :
1204 0 : auto PVideoBridgeParent::Write(
1205 : const SurfaceDescriptorGPUVideo& v__,
1206 : Message* msg__) -> void
1207 : {
1208 0 : Write((v__).handle(), msg__);
1209 : // Sentinel = 'handle'
1210 0 : (msg__)->WriteSentinel(453975108);
1211 0 : }
1212 :
1213 0 : auto PVideoBridgeParent::Read(
1214 : SurfaceDescriptorGPUVideo* v__,
1215 : const Message* msg__,
1216 : PickleIterator* iter__) -> bool
1217 : {
1218 0 : if ((!(Read((&((v__)->handle())), msg__, iter__)))) {
1219 0 : FatalError("Error deserializing 'handle' (uint64_t) member of 'SurfaceDescriptorGPUVideo'");
1220 0 : return false;
1221 : }
1222 : // Sentinel = 'handle'
1223 0 : if ((!((msg__)->ReadSentinel(iter__, 453975108)))) {
1224 0 : mozilla::ipc::SentinelReadError("Error deserializing 'handle' (uint64_t) member of 'SurfaceDescriptorGPUVideo'");
1225 0 : return false;
1226 : }
1227 0 : return true;
1228 : }
1229 :
1230 0 : auto PVideoBridgeParent::Write(
1231 : const SurfaceDescriptorD3D10& v__,
1232 : Message* msg__) -> void
1233 : {
1234 0 : Write((v__).handle(), msg__);
1235 : // Sentinel = 'handle'
1236 0 : (msg__)->WriteSentinel(453975108);
1237 0 : Write((v__).format(), msg__);
1238 : // Sentinel = 'format'
1239 0 : (msg__)->WriteSentinel(2052265543);
1240 0 : Write((v__).size(), msg__);
1241 : // Sentinel = 'size'
1242 0 : (msg__)->WriteSentinel(931048223);
1243 0 : }
1244 :
1245 0 : auto PVideoBridgeParent::Read(
1246 : SurfaceDescriptorD3D10* v__,
1247 : const Message* msg__,
1248 : PickleIterator* iter__) -> bool
1249 : {
1250 0 : if ((!(Read((&((v__)->handle())), msg__, iter__)))) {
1251 0 : FatalError("Error deserializing 'handle' (WindowsHandle) member of 'SurfaceDescriptorD3D10'");
1252 0 : return false;
1253 : }
1254 : // Sentinel = 'handle'
1255 0 : if ((!((msg__)->ReadSentinel(iter__, 453975108)))) {
1256 0 : mozilla::ipc::SentinelReadError("Error deserializing 'handle' (WindowsHandle) member of 'SurfaceDescriptorD3D10'");
1257 0 : return false;
1258 : }
1259 0 : if ((!(Read((&((v__)->format())), msg__, iter__)))) {
1260 0 : FatalError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorD3D10'");
1261 0 : return false;
1262 : }
1263 : // Sentinel = 'format'
1264 0 : if ((!((msg__)->ReadSentinel(iter__, 2052265543)))) {
1265 0 : mozilla::ipc::SentinelReadError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorD3D10'");
1266 0 : return false;
1267 : }
1268 0 : if ((!(Read((&((v__)->size())), msg__, iter__)))) {
1269 0 : FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorD3D10'");
1270 0 : return false;
1271 : }
1272 : // Sentinel = 'size'
1273 0 : if ((!((msg__)->ReadSentinel(iter__, 931048223)))) {
1274 0 : mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorD3D10'");
1275 0 : return false;
1276 : }
1277 0 : return true;
1278 : }
1279 :
1280 0 : auto PVideoBridgeParent::Write(
1281 : const BufferDescriptor& v__,
1282 : Message* msg__) -> void
1283 : {
1284 : typedef BufferDescriptor type__;
1285 0 : Write(int((v__).type()), msg__);
1286 : // Sentinel = 'BufferDescriptor'
1287 0 : (msg__)->WriteSentinel(764535685);
1288 :
1289 0 : switch ((v__).type()) {
1290 : case type__::TRGBDescriptor:
1291 : {
1292 0 : Write((v__).get_RGBDescriptor(), msg__);
1293 : // Sentinel = 'TRGBDescriptor'
1294 0 : (msg__)->WriteSentinel(2888062100);
1295 0 : return;
1296 : }
1297 : case type__::TYCbCrDescriptor:
1298 : {
1299 0 : Write((v__).get_YCbCrDescriptor(), msg__);
1300 : // Sentinel = 'TYCbCrDescriptor'
1301 0 : (msg__)->WriteSentinel(3533945878);
1302 0 : return;
1303 : }
1304 : default:
1305 : {
1306 0 : FatalError("unknown union type");
1307 0 : return;
1308 : }
1309 : }
1310 : }
1311 :
1312 0 : auto PVideoBridgeParent::Read(
1313 : BufferDescriptor* v__,
1314 : const Message* msg__,
1315 : PickleIterator* iter__) -> bool
1316 : {
1317 : typedef BufferDescriptor type__;
1318 : int type;
1319 0 : if ((!(Read((&(type)), msg__, iter__)))) {
1320 0 : mozilla::ipc::UnionTypeReadError("BufferDescriptor");
1321 0 : return false;
1322 : }
1323 : // Sentinel = 'BufferDescriptor'
1324 0 : if ((!((msg__)->ReadSentinel(iter__, 764535685)))) {
1325 0 : mozilla::ipc::SentinelReadError("BufferDescriptor");
1326 0 : return false;
1327 : }
1328 :
1329 0 : switch (type) {
1330 : case type__::TRGBDescriptor:
1331 : {
1332 0 : RGBDescriptor tmp = RGBDescriptor();
1333 0 : (*(v__)) = tmp;
1334 0 : if ((!(Read((&((v__)->get_RGBDescriptor())), msg__, iter__)))) {
1335 0 : FatalError("Error deserializing Union type");
1336 0 : return false;
1337 : }
1338 : // Sentinel = 'TRGBDescriptor'
1339 0 : if ((!((msg__)->ReadSentinel(iter__, 2888062100)))) {
1340 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1341 0 : return false;
1342 : }
1343 0 : return true;
1344 : }
1345 : case type__::TYCbCrDescriptor:
1346 : {
1347 0 : YCbCrDescriptor tmp = YCbCrDescriptor();
1348 0 : (*(v__)) = tmp;
1349 0 : if ((!(Read((&((v__)->get_YCbCrDescriptor())), msg__, iter__)))) {
1350 0 : FatalError("Error deserializing Union type");
1351 0 : return false;
1352 : }
1353 : // Sentinel = 'TYCbCrDescriptor'
1354 0 : if ((!((msg__)->ReadSentinel(iter__, 3533945878)))) {
1355 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1356 0 : return false;
1357 : }
1358 0 : return true;
1359 : }
1360 : default:
1361 : {
1362 0 : FatalError("unknown union type");
1363 0 : return false;
1364 : }
1365 : }
1366 : }
1367 :
1368 0 : auto PVideoBridgeParent::Write(
1369 : const YCbCrDescriptor& v__,
1370 : Message* msg__) -> void
1371 : {
1372 0 : Write((v__).ySize(), msg__);
1373 : // Sentinel = 'ySize'
1374 0 : (msg__)->WriteSentinel(313512843);
1375 0 : Write((v__).cbCrSize(), msg__);
1376 : // Sentinel = 'cbCrSize'
1377 0 : (msg__)->WriteSentinel(2601117167);
1378 0 : Write((v__).yOffset(), msg__);
1379 : // Sentinel = 'yOffset'
1380 0 : (msg__)->WriteSentinel(983795183);
1381 0 : Write((v__).cbOffset(), msg__);
1382 : // Sentinel = 'cbOffset'
1383 0 : (msg__)->WriteSentinel(4197159602);
1384 0 : Write((v__).crOffset(), msg__);
1385 : // Sentinel = 'crOffset'
1386 0 : (msg__)->WriteSentinel(1739681986);
1387 0 : Write((v__).stereoMode(), msg__);
1388 : // Sentinel = 'stereoMode'
1389 0 : (msg__)->WriteSentinel(2234072623);
1390 0 : Write((v__).yUVColorSpace(), msg__);
1391 : // Sentinel = 'yUVColorSpace'
1392 0 : (msg__)->WriteSentinel(1051398544);
1393 0 : Write((v__).hasIntermediateBuffer(), msg__);
1394 : // Sentinel = 'hasIntermediateBuffer'
1395 0 : (msg__)->WriteSentinel(985857996);
1396 0 : }
1397 :
1398 0 : auto PVideoBridgeParent::Read(
1399 : YCbCrDescriptor* v__,
1400 : const Message* msg__,
1401 : PickleIterator* iter__) -> bool
1402 : {
1403 0 : if ((!(Read((&((v__)->ySize())), msg__, iter__)))) {
1404 0 : FatalError("Error deserializing 'ySize' (IntSize) member of 'YCbCrDescriptor'");
1405 0 : return false;
1406 : }
1407 : // Sentinel = 'ySize'
1408 0 : if ((!((msg__)->ReadSentinel(iter__, 313512843)))) {
1409 0 : mozilla::ipc::SentinelReadError("Error deserializing 'ySize' (IntSize) member of 'YCbCrDescriptor'");
1410 0 : return false;
1411 : }
1412 0 : if ((!(Read((&((v__)->cbCrSize())), msg__, iter__)))) {
1413 0 : FatalError("Error deserializing 'cbCrSize' (IntSize) member of 'YCbCrDescriptor'");
1414 0 : return false;
1415 : }
1416 : // Sentinel = 'cbCrSize'
1417 0 : if ((!((msg__)->ReadSentinel(iter__, 2601117167)))) {
1418 0 : mozilla::ipc::SentinelReadError("Error deserializing 'cbCrSize' (IntSize) member of 'YCbCrDescriptor'");
1419 0 : return false;
1420 : }
1421 0 : if ((!(Read((&((v__)->yOffset())), msg__, iter__)))) {
1422 0 : FatalError("Error deserializing 'yOffset' (uint32_t) member of 'YCbCrDescriptor'");
1423 0 : return false;
1424 : }
1425 : // Sentinel = 'yOffset'
1426 0 : if ((!((msg__)->ReadSentinel(iter__, 983795183)))) {
1427 0 : mozilla::ipc::SentinelReadError("Error deserializing 'yOffset' (uint32_t) member of 'YCbCrDescriptor'");
1428 0 : return false;
1429 : }
1430 0 : if ((!(Read((&((v__)->cbOffset())), msg__, iter__)))) {
1431 0 : FatalError("Error deserializing 'cbOffset' (uint32_t) member of 'YCbCrDescriptor'");
1432 0 : return false;
1433 : }
1434 : // Sentinel = 'cbOffset'
1435 0 : if ((!((msg__)->ReadSentinel(iter__, 4197159602)))) {
1436 0 : mozilla::ipc::SentinelReadError("Error deserializing 'cbOffset' (uint32_t) member of 'YCbCrDescriptor'");
1437 0 : return false;
1438 : }
1439 0 : if ((!(Read((&((v__)->crOffset())), msg__, iter__)))) {
1440 0 : FatalError("Error deserializing 'crOffset' (uint32_t) member of 'YCbCrDescriptor'");
1441 0 : return false;
1442 : }
1443 : // Sentinel = 'crOffset'
1444 0 : if ((!((msg__)->ReadSentinel(iter__, 1739681986)))) {
1445 0 : mozilla::ipc::SentinelReadError("Error deserializing 'crOffset' (uint32_t) member of 'YCbCrDescriptor'");
1446 0 : return false;
1447 : }
1448 0 : if ((!(Read((&((v__)->stereoMode())), msg__, iter__)))) {
1449 0 : FatalError("Error deserializing 'stereoMode' (StereoMode) member of 'YCbCrDescriptor'");
1450 0 : return false;
1451 : }
1452 : // Sentinel = 'stereoMode'
1453 0 : if ((!((msg__)->ReadSentinel(iter__, 2234072623)))) {
1454 0 : mozilla::ipc::SentinelReadError("Error deserializing 'stereoMode' (StereoMode) member of 'YCbCrDescriptor'");
1455 0 : return false;
1456 : }
1457 0 : if ((!(Read((&((v__)->yUVColorSpace())), msg__, iter__)))) {
1458 0 : FatalError("Error deserializing 'yUVColorSpace' (YUVColorSpace) member of 'YCbCrDescriptor'");
1459 0 : return false;
1460 : }
1461 : // Sentinel = 'yUVColorSpace'
1462 0 : if ((!((msg__)->ReadSentinel(iter__, 1051398544)))) {
1463 0 : mozilla::ipc::SentinelReadError("Error deserializing 'yUVColorSpace' (YUVColorSpace) member of 'YCbCrDescriptor'");
1464 0 : return false;
1465 : }
1466 0 : if ((!(Read((&((v__)->hasIntermediateBuffer())), msg__, iter__)))) {
1467 0 : FatalError("Error deserializing 'hasIntermediateBuffer' (bool) member of 'YCbCrDescriptor'");
1468 0 : return false;
1469 : }
1470 : // Sentinel = 'hasIntermediateBuffer'
1471 0 : if ((!((msg__)->ReadSentinel(iter__, 985857996)))) {
1472 0 : mozilla::ipc::SentinelReadError("Error deserializing 'hasIntermediateBuffer' (bool) member of 'YCbCrDescriptor'");
1473 0 : return false;
1474 : }
1475 0 : return true;
1476 : }
1477 :
1478 0 : auto PVideoBridgeParent::Write(
1479 : const PTextureParent* v__,
1480 : Message* msg__,
1481 : bool nullable__) -> void
1482 : {
1483 : int32_t id;
1484 0 : if ((!(v__))) {
1485 0 : if ((!(nullable__))) {
1486 0 : FatalError("NULL actor value passed to non-nullable param");
1487 : }
1488 0 : id = 0;
1489 : }
1490 : else {
1491 0 : id = (v__)->Id();
1492 0 : if ((1) == (id)) {
1493 0 : FatalError("actor has been |delete|d");
1494 : }
1495 : }
1496 :
1497 0 : Write(id, msg__);
1498 0 : }
1499 :
1500 0 : auto PVideoBridgeParent::Read(
1501 : PTextureParent** v__,
1502 : const Message* msg__,
1503 : PickleIterator* iter__,
1504 : bool nullable__) -> bool
1505 : {
1506 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PTexture", PTextureMsgStart);
1507 0 : if ((actor).isNothing()) {
1508 0 : return false;
1509 : }
1510 :
1511 0 : (*(v__)) = static_cast<PTextureParent*>((actor).value());
1512 0 : return true;
1513 : }
1514 :
1515 0 : auto PVideoBridgeParent::Write(
1516 : Shmem& v__,
1517 : Message* msg__) -> void
1518 : {
1519 0 : IPC::WriteParam(msg__, v__);
1520 0 : (v__).RevokeRights(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
1521 0 : (v__).forget(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
1522 0 : }
1523 :
1524 0 : auto PVideoBridgeParent::Read(
1525 : Shmem* v__,
1526 : const Message* msg__,
1527 : PickleIterator* iter__) -> bool
1528 : {
1529 0 : Shmem tmp;
1530 0 : if ((!(IPC::ReadParam(msg__, iter__, (&(tmp)))))) {
1531 0 : return false;
1532 : }
1533 :
1534 0 : Shmem::id_t shmemid = (tmp).Id(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
1535 0 : Shmem::SharedMemory* rawmem = LookupSharedMemory(shmemid);
1536 0 : if (rawmem) {
1537 0 : (*(v__)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), rawmem, shmemid);
1538 0 : return true;
1539 : }
1540 0 : (*(v__)) = Shmem();
1541 0 : return true;
1542 : }
1543 :
1544 :
1545 :
1546 : } // namespace layers
1547 : } // namespace mozilla
|