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