/work/obj-fuzz/ipc/ipdl/LayersSurfaces.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | // |
2 | | // Automatically generated by ipdlc. |
3 | | // Edit at your own risk |
4 | | // |
5 | | |
6 | | |
7 | | #include "mozilla/layers/LayersSurfaces.h" |
8 | | |
9 | | |
10 | | //----------------------------------------------------------------------------- |
11 | | // Method definitions for the IPDL type |union OverlayHandle| |
12 | | // |
13 | | namespace mozilla { |
14 | | namespace layers { |
15 | | auto OverlayHandle::MaybeDestroy(Type aNewType) -> bool |
16 | 0 | { |
17 | 0 | if ((mType) == (T__None)) { |
18 | 0 | return true; |
19 | 0 | } |
20 | 0 | if ((mType) == (aNewType)) { |
21 | 0 | return false; |
22 | 0 | } |
23 | 0 | switch (mType) { |
24 | 0 | case Tint32_t: |
25 | 0 | { |
26 | 0 | (ptr_int32_t())->~int32_t__tdef(); |
27 | 0 | break; |
28 | 0 | } |
29 | 0 | case Tnull_t: |
30 | 0 | { |
31 | 0 | (ptr_null_t())->~null_t__tdef(); |
32 | 0 | break; |
33 | 0 | } |
34 | 0 | default: |
35 | 0 | { |
36 | 0 | mozilla::ipc::LogicError("not reached"); |
37 | 0 | break; |
38 | 0 | } |
39 | 0 | } |
40 | 0 | return true; |
41 | 0 | } |
42 | | |
43 | | MOZ_IMPLICIT OverlayHandle::OverlayHandle(const int32_t& aOther) |
44 | 0 | { |
45 | 0 | new (mozilla::KnownNotNull, ptr_int32_t()) int32_t(aOther); |
46 | 0 | mType = Tint32_t; |
47 | 0 | } |
48 | | |
49 | | MOZ_IMPLICIT OverlayHandle::OverlayHandle(int32_t&& aOther) |
50 | 0 | { |
51 | 0 | new (mozilla::KnownNotNull, ptr_int32_t()) int32_t(std::move(aOther)); |
52 | 0 | mType = Tint32_t; |
53 | 0 | } |
54 | | |
55 | | MOZ_IMPLICIT OverlayHandle::OverlayHandle(const null_t& aOther) |
56 | 0 | { |
57 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t(aOther); |
58 | 0 | mType = Tnull_t; |
59 | 0 | } |
60 | | |
61 | | MOZ_IMPLICIT OverlayHandle::OverlayHandle(null_t&& aOther) |
62 | 0 | { |
63 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t(std::move(aOther)); |
64 | 0 | mType = Tnull_t; |
65 | 0 | } |
66 | | |
67 | | MOZ_IMPLICIT OverlayHandle::OverlayHandle(const OverlayHandle& aOther) |
68 | 0 | { |
69 | 0 | (aOther).AssertSanity(); |
70 | 0 | switch ((aOther).type()) { |
71 | 0 | case Tint32_t: |
72 | 0 | { |
73 | 0 | new (mozilla::KnownNotNull, ptr_int32_t()) int32_t((aOther).get_int32_t()); |
74 | 0 | break; |
75 | 0 | } |
76 | 0 | case Tnull_t: |
77 | 0 | { |
78 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t((aOther).get_null_t()); |
79 | 0 | break; |
80 | 0 | } |
81 | 0 | case T__None: |
82 | 0 | { |
83 | 0 | break; |
84 | 0 | } |
85 | 0 | default: |
86 | 0 | { |
87 | 0 | mozilla::ipc::LogicError("unreached"); |
88 | 0 | return; |
89 | 0 | } |
90 | 0 | } |
91 | 0 | mType = (aOther).type(); |
92 | 0 | } |
93 | | |
94 | | MOZ_IMPLICIT OverlayHandle::OverlayHandle(OverlayHandle&& aOther) |
95 | 0 | { |
96 | 0 | (aOther).AssertSanity(); |
97 | 0 | Type t = (aOther).type(); |
98 | 0 | switch (t) { |
99 | 0 | case Tint32_t: |
100 | 0 | { |
101 | 0 | new (mozilla::KnownNotNull, ptr_int32_t()) int32_t(std::move((aOther).get_int32_t())); |
102 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
103 | 0 | break; |
104 | 0 | } |
105 | 0 | case Tnull_t: |
106 | 0 | { |
107 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t(std::move((aOther).get_null_t())); |
108 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
109 | 0 | break; |
110 | 0 | } |
111 | 0 | case T__None: |
112 | 0 | { |
113 | 0 | break; |
114 | 0 | } |
115 | 0 | default: |
116 | 0 | { |
117 | 0 | mozilla::ipc::LogicError("unreached"); |
118 | 0 | return; |
119 | 0 | } |
120 | 0 | } |
121 | 0 | (aOther).mType = T__None; |
122 | 0 | mType = t; |
123 | 0 | } |
124 | | |
125 | | OverlayHandle::~OverlayHandle() |
126 | 0 | { |
127 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
128 | 0 | } |
129 | | |
130 | | auto OverlayHandle::operator=(const int32_t& aRhs) -> OverlayHandle& |
131 | 0 | { |
132 | 0 | if (MaybeDestroy(Tint32_t)) { |
133 | 0 | new (mozilla::KnownNotNull, ptr_int32_t()) int32_t; |
134 | 0 | } |
135 | 0 | (*(ptr_int32_t())) = aRhs; |
136 | 0 | mType = Tint32_t; |
137 | 0 | return (*(this)); |
138 | 0 | } |
139 | | |
140 | | auto OverlayHandle::operator=(int32_t&& aRhs) -> OverlayHandle& |
141 | 0 | { |
142 | 0 | if (MaybeDestroy(Tint32_t)) { |
143 | 0 | new (mozilla::KnownNotNull, ptr_int32_t()) int32_t; |
144 | 0 | } |
145 | 0 | (*(ptr_int32_t())) = std::move(aRhs); |
146 | 0 | mType = Tint32_t; |
147 | 0 | return (*(this)); |
148 | 0 | } |
149 | | |
150 | | auto OverlayHandle::operator=(const null_t& aRhs) -> OverlayHandle& |
151 | 0 | { |
152 | 0 | if (MaybeDestroy(Tnull_t)) { |
153 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t; |
154 | 0 | } |
155 | 0 | (*(ptr_null_t())) = aRhs; |
156 | 0 | mType = Tnull_t; |
157 | 0 | return (*(this)); |
158 | 0 | } |
159 | | |
160 | | auto OverlayHandle::operator=(null_t&& aRhs) -> OverlayHandle& |
161 | 0 | { |
162 | 0 | if (MaybeDestroy(Tnull_t)) { |
163 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t; |
164 | 0 | } |
165 | 0 | (*(ptr_null_t())) = std::move(aRhs); |
166 | 0 | mType = Tnull_t; |
167 | 0 | return (*(this)); |
168 | 0 | } |
169 | | |
170 | | auto OverlayHandle::operator=(const OverlayHandle& aRhs) -> OverlayHandle& |
171 | 0 | { |
172 | 0 | (aRhs).AssertSanity(); |
173 | 0 | Type t = (aRhs).type(); |
174 | 0 | switch (t) { |
175 | 0 | case Tint32_t: |
176 | 0 | { |
177 | 0 | if (MaybeDestroy(t)) { |
178 | 0 | new (mozilla::KnownNotNull, ptr_int32_t()) int32_t; |
179 | 0 | } |
180 | 0 | (*(ptr_int32_t())) = (aRhs).get_int32_t(); |
181 | 0 | break; |
182 | 0 | } |
183 | 0 | case Tnull_t: |
184 | 0 | { |
185 | 0 | if (MaybeDestroy(t)) { |
186 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t; |
187 | 0 | } |
188 | 0 | (*(ptr_null_t())) = (aRhs).get_null_t(); |
189 | 0 | break; |
190 | 0 | } |
191 | 0 | case T__None: |
192 | 0 | { |
193 | 0 | static_cast<void>(MaybeDestroy(t)); |
194 | 0 | break; |
195 | 0 | } |
196 | 0 | default: |
197 | 0 | { |
198 | 0 | mozilla::ipc::LogicError("unreached"); |
199 | 0 | break; |
200 | 0 | } |
201 | 0 | } |
202 | 0 | mType = t; |
203 | 0 | return (*(this)); |
204 | 0 | } |
205 | | |
206 | | auto OverlayHandle::operator=(OverlayHandle&& aRhs) -> OverlayHandle& |
207 | 0 | { |
208 | 0 | (aRhs).AssertSanity(); |
209 | 0 | Type t = (aRhs).type(); |
210 | 0 | switch (t) { |
211 | 0 | case Tint32_t: |
212 | 0 | { |
213 | 0 | if (MaybeDestroy(t)) { |
214 | 0 | new (mozilla::KnownNotNull, ptr_int32_t()) int32_t; |
215 | 0 | } |
216 | 0 | (*(ptr_int32_t())) = std::move((aRhs).get_int32_t()); |
217 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
218 | 0 | break; |
219 | 0 | } |
220 | 0 | case Tnull_t: |
221 | 0 | { |
222 | 0 | if (MaybeDestroy(t)) { |
223 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t; |
224 | 0 | } |
225 | 0 | (*(ptr_null_t())) = std::move((aRhs).get_null_t()); |
226 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
227 | 0 | break; |
228 | 0 | } |
229 | 0 | case T__None: |
230 | 0 | { |
231 | 0 | static_cast<void>(MaybeDestroy(t)); |
232 | 0 | break; |
233 | 0 | } |
234 | 0 | default: |
235 | 0 | { |
236 | 0 | mozilla::ipc::LogicError("unreached"); |
237 | 0 | break; |
238 | 0 | } |
239 | 0 | } |
240 | 0 | (aRhs).mType = T__None; |
241 | 0 | mType = t; |
242 | 0 | return (*(this)); |
243 | 0 | } |
244 | | |
245 | | auto OverlayHandle::operator==(const int32_t& aRhs) const -> bool |
246 | 0 | { |
247 | 0 | return (get_int32_t()) == (aRhs); |
248 | 0 | } |
249 | | |
250 | | auto OverlayHandle::operator==(const null_t& aRhs) const -> bool |
251 | 0 | { |
252 | 0 | return (get_null_t()) == (aRhs); |
253 | 0 | } |
254 | | |
255 | | auto OverlayHandle::operator==(const OverlayHandle& aRhs) const -> bool |
256 | 0 | { |
257 | 0 | if ((type()) != ((aRhs).type())) { |
258 | 0 | return false; |
259 | 0 | } |
260 | 0 | |
261 | 0 | switch (type()) { |
262 | 0 | case Tint32_t: |
263 | 0 | { |
264 | 0 | return (get_int32_t()) == ((aRhs).get_int32_t()); |
265 | 0 | } |
266 | 0 | case Tnull_t: |
267 | 0 | { |
268 | 0 | return (get_null_t()) == ((aRhs).get_null_t()); |
269 | 0 | } |
270 | 0 | default: |
271 | 0 | { |
272 | 0 | mozilla::ipc::LogicError("unreached"); |
273 | 0 | return false; |
274 | 0 | } |
275 | 0 | } |
276 | 0 | } |
277 | | |
278 | | auto OverlayHandle::get(int32_t* aOutValue) const -> void |
279 | 0 | { |
280 | 0 | (*(aOutValue)) = get_int32_t(); |
281 | 0 | } |
282 | | |
283 | | auto OverlayHandle::get(null_t* aOutValue) const -> void |
284 | 0 | { |
285 | 0 | (*(aOutValue)) = get_null_t(); |
286 | 0 | } |
287 | | |
288 | | } // namespace layers |
289 | | } // namespace mozilla |
290 | | |
291 | | namespace mozilla { |
292 | | namespace ipc { |
293 | | auto IPDLParamTraits<mozilla::layers::OverlayHandle>::Write( |
294 | | IPC::Message* aMsg, |
295 | | mozilla::ipc::IProtocol* aActor, |
296 | | const paramType& aVar) -> void |
297 | | { |
298 | | typedef mozilla::layers::OverlayHandle union__; |
299 | | int type; |
300 | | type = (aVar).type(); |
301 | | WriteIPDLParam(aMsg, aActor, type); |
302 | | // Sentinel = 'OverlayHandle' |
303 | | (aMsg)->WriteSentinel(1474767663); |
304 | | |
305 | | switch (type) { |
306 | | case union__::Tint32_t: |
307 | | { |
308 | | WriteIPDLParam(aMsg, aActor, (aVar).get_int32_t()); |
309 | | // Sentinel = 'Tint32_t' |
310 | | (aMsg)->WriteSentinel(4219052577); |
311 | | return; |
312 | | } |
313 | | case union__::Tnull_t: |
314 | | { |
315 | | WriteIPDLParam(aMsg, aActor, (aVar).get_null_t()); |
316 | | // Sentinel = 'Tnull_t' |
317 | | (aMsg)->WriteSentinel(3731137201); |
318 | | return; |
319 | | } |
320 | | default: |
321 | | { |
322 | | (aActor)->FatalError("unknown union type"); |
323 | | return; |
324 | | } |
325 | | } |
326 | | } |
327 | | |
328 | | auto IPDLParamTraits<mozilla::layers::OverlayHandle>::Read( |
329 | | const IPC::Message* aMsg, |
330 | | PickleIterator* aIter, |
331 | | mozilla::ipc::IProtocol* aActor, |
332 | | paramType* aVar) -> bool |
333 | 0 | { |
334 | 0 | typedef mozilla::layers::OverlayHandle union__; |
335 | 0 | int type; |
336 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) { |
337 | 0 | (aActor)->FatalError("Error deserializing type of union OverlayHandle"); |
338 | 0 | return false; |
339 | 0 | } |
340 | 0 | // Sentinel = 'OverlayHandle' |
341 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1474767663)))) { |
342 | 0 | mozilla::ipc::SentinelReadError("Error deserializing type of union OverlayHandle"); |
343 | 0 | return false; |
344 | 0 | } |
345 | 0 | |
346 | 0 | switch (type) { |
347 | 0 | case union__::Tint32_t: |
348 | 0 | { |
349 | 0 | int32_t tmp = int32_t(); |
350 | 0 | (*(aVar)) = tmp; |
351 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_int32_t())))))) { |
352 | 0 | (aActor)->FatalError("Error deserializing variant Tint32_t of union OverlayHandle"); |
353 | 0 | return false; |
354 | 0 | } |
355 | 0 | // Sentinel = 'Tint32_t' |
356 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 4219052577)))) { |
357 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant Tint32_t of union OverlayHandle"); |
358 | 0 | return false; |
359 | 0 | } |
360 | 0 | return true; |
361 | 0 | } |
362 | 0 | case union__::Tnull_t: |
363 | 0 | { |
364 | 0 | mozilla::null_t tmp = mozilla::null_t(); |
365 | 0 | (*(aVar)) = tmp; |
366 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_null_t())))))) { |
367 | 0 | (aActor)->FatalError("Error deserializing variant Tnull_t of union OverlayHandle"); |
368 | 0 | return false; |
369 | 0 | } |
370 | 0 | // Sentinel = 'Tnull_t' |
371 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3731137201)))) { |
372 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant Tnull_t of union OverlayHandle"); |
373 | 0 | return false; |
374 | 0 | } |
375 | 0 | return true; |
376 | 0 | } |
377 | 0 | default: |
378 | 0 | { |
379 | 0 | (aActor)->FatalError("unknown union type"); |
380 | 0 | return false; |
381 | 0 | } |
382 | 0 | } |
383 | 0 | } |
384 | | |
385 | | } // namespace ipc |
386 | | } // namespace mozilla |
387 | | |
388 | | //----------------------------------------------------------------------------- |
389 | | // Method definitions for the IPDL type |struct OverlaySource| |
390 | | // |
391 | | namespace mozilla { |
392 | | namespace layers { |
393 | | auto OverlaySource::operator==(const OverlaySource& _o) const -> bool |
394 | 0 | { |
395 | 0 | if ((!((handle()) == ((_o).handle())))) { |
396 | 0 | return false; |
397 | 0 | } |
398 | 0 | if ((!((size()) == ((_o).size())))) { |
399 | 0 | return false; |
400 | 0 | } |
401 | 0 | return true; |
402 | 0 | } |
403 | | |
404 | | auto OverlaySource::operator!=(const OverlaySource& _o) const -> bool |
405 | 0 | { |
406 | 0 | return (!(operator==(_o))); |
407 | 0 | } |
408 | | |
409 | | } // namespace layers |
410 | | } // namespace mozilla |
411 | | |
412 | | namespace mozilla { |
413 | | namespace ipc { |
414 | | auto IPDLParamTraits<mozilla::layers::OverlaySource>::Write( |
415 | | IPC::Message* aMsg, |
416 | | mozilla::ipc::IProtocol* aActor, |
417 | | const paramType& aVar) -> void |
418 | 0 | { |
419 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).handle()); |
420 | 0 | // Sentinel = 'handle' |
421 | 0 | (aMsg)->WriteSentinel(453975108); |
422 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).size()); |
423 | 0 | // Sentinel = 'size' |
424 | 0 | (aMsg)->WriteSentinel(931048223); |
425 | 0 | } |
426 | | |
427 | | auto IPDLParamTraits<mozilla::layers::OverlaySource>::Read( |
428 | | const IPC::Message* aMsg, |
429 | | PickleIterator* aIter, |
430 | | mozilla::ipc::IProtocol* aActor, |
431 | | paramType* aVar) -> bool |
432 | 0 | { |
433 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->handle())))))) { |
434 | 0 | (aActor)->FatalError("Error deserializing 'handle' (OverlayHandle) member of 'OverlaySource'"); |
435 | 0 | return false; |
436 | 0 | } |
437 | 0 | // Sentinel = 'handle' |
438 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 453975108)))) { |
439 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'handle' (OverlayHandle) member of 'OverlaySource'"); |
440 | 0 | return false; |
441 | 0 | } |
442 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->size())))))) { |
443 | 0 | (aActor)->FatalError("Error deserializing 'size' (IntSize) member of 'OverlaySource'"); |
444 | 0 | return false; |
445 | 0 | } |
446 | 0 | // Sentinel = 'size' |
447 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 931048223)))) { |
448 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'OverlaySource'"); |
449 | 0 | return false; |
450 | 0 | } |
451 | 0 | return true; |
452 | 0 | } |
453 | | |
454 | | } // namespace ipc |
455 | | } // namespace mozilla |
456 | | |
457 | | //----------------------------------------------------------------------------- |
458 | | // Method definitions for the IPDL type |struct SurfaceDescriptorFileMapping| |
459 | | // |
460 | | namespace mozilla { |
461 | | namespace layers { |
462 | | auto SurfaceDescriptorFileMapping::operator==(const SurfaceDescriptorFileMapping& _o) const -> bool |
463 | 0 | { |
464 | 0 | if ((!((handle()) == ((_o).handle())))) { |
465 | 0 | return false; |
466 | 0 | } |
467 | 0 | if ((!((format()) == ((_o).format())))) { |
468 | 0 | return false; |
469 | 0 | } |
470 | 0 | if ((!((size()) == ((_o).size())))) { |
471 | 0 | return false; |
472 | 0 | } |
473 | 0 | return true; |
474 | 0 | } |
475 | | |
476 | | auto SurfaceDescriptorFileMapping::operator!=(const SurfaceDescriptorFileMapping& _o) const -> bool |
477 | 0 | { |
478 | 0 | return (!(operator==(_o))); |
479 | 0 | } |
480 | | |
481 | | } // namespace layers |
482 | | } // namespace mozilla |
483 | | |
484 | | namespace mozilla { |
485 | | namespace ipc { |
486 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorFileMapping>::Write( |
487 | | IPC::Message* aMsg, |
488 | | mozilla::ipc::IProtocol* aActor, |
489 | | const paramType& aVar) -> void |
490 | 0 | { |
491 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).handle()); |
492 | 0 | // Sentinel = 'handle' |
493 | 0 | (aMsg)->WriteSentinel(453975108); |
494 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).format()); |
495 | 0 | // Sentinel = 'format' |
496 | 0 | (aMsg)->WriteSentinel(2052265543); |
497 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).size()); |
498 | 0 | // Sentinel = 'size' |
499 | 0 | (aMsg)->WriteSentinel(931048223); |
500 | 0 | } |
501 | | |
502 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorFileMapping>::Read( |
503 | | const IPC::Message* aMsg, |
504 | | PickleIterator* aIter, |
505 | | mozilla::ipc::IProtocol* aActor, |
506 | | paramType* aVar) -> bool |
507 | 0 | { |
508 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->handle())))))) { |
509 | 0 | (aActor)->FatalError("Error deserializing 'handle' (WindowsHandle) member of 'SurfaceDescriptorFileMapping'"); |
510 | 0 | return false; |
511 | 0 | } |
512 | 0 | // Sentinel = 'handle' |
513 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 453975108)))) { |
514 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'handle' (WindowsHandle) member of 'SurfaceDescriptorFileMapping'"); |
515 | 0 | return false; |
516 | 0 | } |
517 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->format())))))) { |
518 | 0 | (aActor)->FatalError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorFileMapping'"); |
519 | 0 | return false; |
520 | 0 | } |
521 | 0 | // Sentinel = 'format' |
522 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2052265543)))) { |
523 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorFileMapping'"); |
524 | 0 | return false; |
525 | 0 | } |
526 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->size())))))) { |
527 | 0 | (aActor)->FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorFileMapping'"); |
528 | 0 | return false; |
529 | 0 | } |
530 | 0 | // Sentinel = 'size' |
531 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 931048223)))) { |
532 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorFileMapping'"); |
533 | 0 | return false; |
534 | 0 | } |
535 | 0 | return true; |
536 | 0 | } |
537 | | |
538 | | } // namespace ipc |
539 | | } // namespace mozilla |
540 | | |
541 | | //----------------------------------------------------------------------------- |
542 | | // Method definitions for the IPDL type |struct SurfaceDescriptorDIB| |
543 | | // |
544 | | namespace mozilla { |
545 | | namespace layers { |
546 | | auto SurfaceDescriptorDIB::operator==(const SurfaceDescriptorDIB& _o) const -> bool |
547 | 0 | { |
548 | 0 | if ((!((surface()) == ((_o).surface())))) { |
549 | 0 | return false; |
550 | 0 | } |
551 | 0 | return true; |
552 | 0 | } |
553 | | |
554 | | auto SurfaceDescriptorDIB::operator!=(const SurfaceDescriptorDIB& _o) const -> bool |
555 | 0 | { |
556 | 0 | return (!(operator==(_o))); |
557 | 0 | } |
558 | | |
559 | | } // namespace layers |
560 | | } // namespace mozilla |
561 | | |
562 | | namespace mozilla { |
563 | | namespace ipc { |
564 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorDIB>::Write( |
565 | | IPC::Message* aMsg, |
566 | | mozilla::ipc::IProtocol* aActor, |
567 | | const paramType& aVar) -> void |
568 | 0 | { |
569 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).surface()); |
570 | 0 | // Sentinel = 'surface' |
571 | 0 | (aMsg)->WriteSentinel(2386836878); |
572 | 0 | } |
573 | | |
574 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorDIB>::Read( |
575 | | const IPC::Message* aMsg, |
576 | | PickleIterator* aIter, |
577 | | mozilla::ipc::IProtocol* aActor, |
578 | | paramType* aVar) -> bool |
579 | 0 | { |
580 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->surface())))))) { |
581 | 0 | (aActor)->FatalError("Error deserializing 'surface' (uintptr_t) member of 'SurfaceDescriptorDIB'"); |
582 | 0 | return false; |
583 | 0 | } |
584 | 0 | // Sentinel = 'surface' |
585 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2386836878)))) { |
586 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'surface' (uintptr_t) member of 'SurfaceDescriptorDIB'"); |
587 | 0 | return false; |
588 | 0 | } |
589 | 0 | return true; |
590 | 0 | } |
591 | | |
592 | | } // namespace ipc |
593 | | } // namespace mozilla |
594 | | |
595 | | //----------------------------------------------------------------------------- |
596 | | // Method definitions for the IPDL type |struct SurfaceDescriptorD3D10| |
597 | | // |
598 | | namespace mozilla { |
599 | | namespace layers { |
600 | | auto SurfaceDescriptorD3D10::operator==(const SurfaceDescriptorD3D10& _o) const -> bool |
601 | 0 | { |
602 | 0 | if ((!((handle()) == ((_o).handle())))) { |
603 | 0 | return false; |
604 | 0 | } |
605 | 0 | if ((!((format()) == ((_o).format())))) { |
606 | 0 | return false; |
607 | 0 | } |
608 | 0 | if ((!((size()) == ((_o).size())))) { |
609 | 0 | return false; |
610 | 0 | } |
611 | 0 | return true; |
612 | 0 | } |
613 | | |
614 | | auto SurfaceDescriptorD3D10::operator!=(const SurfaceDescriptorD3D10& _o) const -> bool |
615 | 0 | { |
616 | 0 | return (!(operator==(_o))); |
617 | 0 | } |
618 | | |
619 | | } // namespace layers |
620 | | } // namespace mozilla |
621 | | |
622 | | namespace mozilla { |
623 | | namespace ipc { |
624 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorD3D10>::Write( |
625 | | IPC::Message* aMsg, |
626 | | mozilla::ipc::IProtocol* aActor, |
627 | | const paramType& aVar) -> void |
628 | 0 | { |
629 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).handle()); |
630 | 0 | // Sentinel = 'handle' |
631 | 0 | (aMsg)->WriteSentinel(453975108); |
632 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).format()); |
633 | 0 | // Sentinel = 'format' |
634 | 0 | (aMsg)->WriteSentinel(2052265543); |
635 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).size()); |
636 | 0 | // Sentinel = 'size' |
637 | 0 | (aMsg)->WriteSentinel(931048223); |
638 | 0 | } |
639 | | |
640 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorD3D10>::Read( |
641 | | const IPC::Message* aMsg, |
642 | | PickleIterator* aIter, |
643 | | mozilla::ipc::IProtocol* aActor, |
644 | | paramType* aVar) -> bool |
645 | 0 | { |
646 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->handle())))))) { |
647 | 0 | (aActor)->FatalError("Error deserializing 'handle' (WindowsHandle) member of 'SurfaceDescriptorD3D10'"); |
648 | 0 | return false; |
649 | 0 | } |
650 | 0 | // Sentinel = 'handle' |
651 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 453975108)))) { |
652 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'handle' (WindowsHandle) member of 'SurfaceDescriptorD3D10'"); |
653 | 0 | return false; |
654 | 0 | } |
655 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->format())))))) { |
656 | 0 | (aActor)->FatalError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorD3D10'"); |
657 | 0 | return false; |
658 | 0 | } |
659 | 0 | // Sentinel = 'format' |
660 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2052265543)))) { |
661 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorD3D10'"); |
662 | 0 | return false; |
663 | 0 | } |
664 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->size())))))) { |
665 | 0 | (aActor)->FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorD3D10'"); |
666 | 0 | return false; |
667 | 0 | } |
668 | 0 | // Sentinel = 'size' |
669 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 931048223)))) { |
670 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorD3D10'"); |
671 | 0 | return false; |
672 | 0 | } |
673 | 0 | return true; |
674 | 0 | } |
675 | | |
676 | | } // namespace ipc |
677 | | } // namespace mozilla |
678 | | |
679 | | //----------------------------------------------------------------------------- |
680 | | // Method definitions for the IPDL type |struct SurfaceDescriptorDXGIYCbCr| |
681 | | // |
682 | | namespace mozilla { |
683 | | namespace layers { |
684 | | auto SurfaceDescriptorDXGIYCbCr::operator==(const SurfaceDescriptorDXGIYCbCr& _o) const -> bool |
685 | 0 | { |
686 | 0 | if ((!((handleY()) == ((_o).handleY())))) { |
687 | 0 | return false; |
688 | 0 | } |
689 | 0 | if ((!((handleCb()) == ((_o).handleCb())))) { |
690 | 0 | return false; |
691 | 0 | } |
692 | 0 | if ((!((handleCr()) == ((_o).handleCr())))) { |
693 | 0 | return false; |
694 | 0 | } |
695 | 0 | if ((!((size()) == ((_o).size())))) { |
696 | 0 | return false; |
697 | 0 | } |
698 | 0 | if ((!((sizeY()) == ((_o).sizeY())))) { |
699 | 0 | return false; |
700 | 0 | } |
701 | 0 | if ((!((sizeCbCr()) == ((_o).sizeCbCr())))) { |
702 | 0 | return false; |
703 | 0 | } |
704 | 0 | if ((!((yUVColorSpace()) == ((_o).yUVColorSpace())))) { |
705 | 0 | return false; |
706 | 0 | } |
707 | 0 | return true; |
708 | 0 | } |
709 | | |
710 | | auto SurfaceDescriptorDXGIYCbCr::operator!=(const SurfaceDescriptorDXGIYCbCr& _o) const -> bool |
711 | 0 | { |
712 | 0 | return (!(operator==(_o))); |
713 | 0 | } |
714 | | |
715 | | } // namespace layers |
716 | | } // namespace mozilla |
717 | | |
718 | | namespace mozilla { |
719 | | namespace ipc { |
720 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorDXGIYCbCr>::Write( |
721 | | IPC::Message* aMsg, |
722 | | mozilla::ipc::IProtocol* aActor, |
723 | | const paramType& aVar) -> void |
724 | 0 | { |
725 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).handleY()); |
726 | 0 | // Sentinel = 'handleY' |
727 | 0 | (aMsg)->WriteSentinel(2719705368); |
728 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).handleCb()); |
729 | 0 | // Sentinel = 'handleCb' |
730 | 0 | (aMsg)->WriteSentinel(2777335333); |
731 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).handleCr()); |
732 | 0 | // Sentinel = 'handleCr' |
733 | 0 | (aMsg)->WriteSentinel(2777335349); |
734 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).size()); |
735 | 0 | // Sentinel = 'size' |
736 | 0 | (aMsg)->WriteSentinel(931048223); |
737 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).sizeY()); |
738 | 0 | // Sentinel = 'sizeY' |
739 | 0 | (aMsg)->WriteSentinel(886619725); |
740 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).sizeCbCr()); |
741 | 0 | // Sentinel = 'sizeCbCr' |
742 | 0 | (aMsg)->WriteSentinel(2196484423); |
743 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).yUVColorSpace()); |
744 | 0 | // Sentinel = 'yUVColorSpace' |
745 | 0 | (aMsg)->WriteSentinel(1051398544); |
746 | 0 | } |
747 | | |
748 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorDXGIYCbCr>::Read( |
749 | | const IPC::Message* aMsg, |
750 | | PickleIterator* aIter, |
751 | | mozilla::ipc::IProtocol* aActor, |
752 | | paramType* aVar) -> bool |
753 | 0 | { |
754 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->handleY())))))) { |
755 | 0 | (aActor)->FatalError("Error deserializing 'handleY' (WindowsHandle) member of 'SurfaceDescriptorDXGIYCbCr'"); |
756 | 0 | return false; |
757 | 0 | } |
758 | 0 | // Sentinel = 'handleY' |
759 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2719705368)))) { |
760 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'handleY' (WindowsHandle) member of 'SurfaceDescriptorDXGIYCbCr'"); |
761 | 0 | return false; |
762 | 0 | } |
763 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->handleCb())))))) { |
764 | 0 | (aActor)->FatalError("Error deserializing 'handleCb' (WindowsHandle) member of 'SurfaceDescriptorDXGIYCbCr'"); |
765 | 0 | return false; |
766 | 0 | } |
767 | 0 | // Sentinel = 'handleCb' |
768 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2777335333)))) { |
769 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'handleCb' (WindowsHandle) member of 'SurfaceDescriptorDXGIYCbCr'"); |
770 | 0 | return false; |
771 | 0 | } |
772 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->handleCr())))))) { |
773 | 0 | (aActor)->FatalError("Error deserializing 'handleCr' (WindowsHandle) member of 'SurfaceDescriptorDXGIYCbCr'"); |
774 | 0 | return false; |
775 | 0 | } |
776 | 0 | // Sentinel = 'handleCr' |
777 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2777335349)))) { |
778 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'handleCr' (WindowsHandle) member of 'SurfaceDescriptorDXGIYCbCr'"); |
779 | 0 | return false; |
780 | 0 | } |
781 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->size())))))) { |
782 | 0 | (aActor)->FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'"); |
783 | 0 | return false; |
784 | 0 | } |
785 | 0 | // Sentinel = 'size' |
786 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 931048223)))) { |
787 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'"); |
788 | 0 | return false; |
789 | 0 | } |
790 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->sizeY())))))) { |
791 | 0 | (aActor)->FatalError("Error deserializing 'sizeY' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'"); |
792 | 0 | return false; |
793 | 0 | } |
794 | 0 | // Sentinel = 'sizeY' |
795 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 886619725)))) { |
796 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'sizeY' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'"); |
797 | 0 | return false; |
798 | 0 | } |
799 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->sizeCbCr())))))) { |
800 | 0 | (aActor)->FatalError("Error deserializing 'sizeCbCr' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'"); |
801 | 0 | return false; |
802 | 0 | } |
803 | 0 | // Sentinel = 'sizeCbCr' |
804 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2196484423)))) { |
805 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'sizeCbCr' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'"); |
806 | 0 | return false; |
807 | 0 | } |
808 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->yUVColorSpace())))))) { |
809 | 0 | (aActor)->FatalError("Error deserializing 'yUVColorSpace' (YUVColorSpace) member of 'SurfaceDescriptorDXGIYCbCr'"); |
810 | 0 | return false; |
811 | 0 | } |
812 | 0 | // Sentinel = 'yUVColorSpace' |
813 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1051398544)))) { |
814 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'yUVColorSpace' (YUVColorSpace) member of 'SurfaceDescriptorDXGIYCbCr'"); |
815 | 0 | return false; |
816 | 0 | } |
817 | 0 | return true; |
818 | 0 | } |
819 | | |
820 | | } // namespace ipc |
821 | | } // namespace mozilla |
822 | | |
823 | | //----------------------------------------------------------------------------- |
824 | | // Method definitions for the IPDL type |struct SurfaceDescriptorMacIOSurface| |
825 | | // |
826 | | namespace mozilla { |
827 | | namespace layers { |
828 | | auto SurfaceDescriptorMacIOSurface::operator==(const SurfaceDescriptorMacIOSurface& _o) const -> bool |
829 | 0 | { |
830 | 0 | if ((!((surfaceId()) == ((_o).surfaceId())))) { |
831 | 0 | return false; |
832 | 0 | } |
833 | 0 | if ((!((scaleFactor()) == ((_o).scaleFactor())))) { |
834 | 0 | return false; |
835 | 0 | } |
836 | 0 | if ((!((isOpaque()) == ((_o).isOpaque())))) { |
837 | 0 | return false; |
838 | 0 | } |
839 | 0 | return true; |
840 | 0 | } |
841 | | |
842 | | auto SurfaceDescriptorMacIOSurface::operator!=(const SurfaceDescriptorMacIOSurface& _o) const -> bool |
843 | 0 | { |
844 | 0 | return (!(operator==(_o))); |
845 | 0 | } |
846 | | |
847 | | } // namespace layers |
848 | | } // namespace mozilla |
849 | | |
850 | | namespace mozilla { |
851 | | namespace ipc { |
852 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorMacIOSurface>::Write( |
853 | | IPC::Message* aMsg, |
854 | | mozilla::ipc::IProtocol* aActor, |
855 | | const paramType& aVar) -> void |
856 | 0 | { |
857 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).surfaceId()); |
858 | 0 | // Sentinel = 'surfaceId' |
859 | 0 | (aMsg)->WriteSentinel(4108848731); |
860 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).scaleFactor()); |
861 | 0 | // Sentinel = 'scaleFactor' |
862 | 0 | (aMsg)->WriteSentinel(1184637148); |
863 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).isOpaque()); |
864 | 0 | // Sentinel = 'isOpaque' |
865 | 0 | (aMsg)->WriteSentinel(3519081617); |
866 | 0 | } |
867 | | |
868 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorMacIOSurface>::Read( |
869 | | const IPC::Message* aMsg, |
870 | | PickleIterator* aIter, |
871 | | mozilla::ipc::IProtocol* aActor, |
872 | | paramType* aVar) -> bool |
873 | 0 | { |
874 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->surfaceId())))))) { |
875 | 0 | (aActor)->FatalError("Error deserializing 'surfaceId' (uint32_t) member of 'SurfaceDescriptorMacIOSurface'"); |
876 | 0 | return false; |
877 | 0 | } |
878 | 0 | // Sentinel = 'surfaceId' |
879 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 4108848731)))) { |
880 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'surfaceId' (uint32_t) member of 'SurfaceDescriptorMacIOSurface'"); |
881 | 0 | return false; |
882 | 0 | } |
883 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->scaleFactor())))))) { |
884 | 0 | (aActor)->FatalError("Error deserializing 'scaleFactor' (double) member of 'SurfaceDescriptorMacIOSurface'"); |
885 | 0 | return false; |
886 | 0 | } |
887 | 0 | // Sentinel = 'scaleFactor' |
888 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1184637148)))) { |
889 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'scaleFactor' (double) member of 'SurfaceDescriptorMacIOSurface'"); |
890 | 0 | return false; |
891 | 0 | } |
892 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->isOpaque())))))) { |
893 | 0 | (aActor)->FatalError("Error deserializing 'isOpaque' (bool) member of 'SurfaceDescriptorMacIOSurface'"); |
894 | 0 | return false; |
895 | 0 | } |
896 | 0 | // Sentinel = 'isOpaque' |
897 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3519081617)))) { |
898 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'isOpaque' (bool) member of 'SurfaceDescriptorMacIOSurface'"); |
899 | 0 | return false; |
900 | 0 | } |
901 | 0 | return true; |
902 | 0 | } |
903 | | |
904 | | } // namespace ipc |
905 | | } // namespace mozilla |
906 | | |
907 | | //----------------------------------------------------------------------------- |
908 | | // Method definitions for the IPDL type |struct SurfaceTextureDescriptor| |
909 | | // |
910 | | namespace mozilla { |
911 | | namespace layers { |
912 | | auto SurfaceTextureDescriptor::operator==(const SurfaceTextureDescriptor& _o) const -> bool |
913 | 0 | { |
914 | 0 | if ((!((handle()) == ((_o).handle())))) { |
915 | 0 | return false; |
916 | 0 | } |
917 | 0 | if ((!((size()) == ((_o).size())))) { |
918 | 0 | return false; |
919 | 0 | } |
920 | 0 | if ((!((format()) == ((_o).format())))) { |
921 | 0 | return false; |
922 | 0 | } |
923 | 0 | if ((!((continuous()) == ((_o).continuous())))) { |
924 | 0 | return false; |
925 | 0 | } |
926 | 0 | if ((!((ignoreTransform()) == ((_o).ignoreTransform())))) { |
927 | 0 | return false; |
928 | 0 | } |
929 | 0 | return true; |
930 | 0 | } |
931 | | |
932 | | auto SurfaceTextureDescriptor::operator!=(const SurfaceTextureDescriptor& _o) const -> bool |
933 | 0 | { |
934 | 0 | return (!(operator==(_o))); |
935 | 0 | } |
936 | | |
937 | | } // namespace layers |
938 | | } // namespace mozilla |
939 | | |
940 | | namespace mozilla { |
941 | | namespace ipc { |
942 | | auto IPDLParamTraits<mozilla::layers::SurfaceTextureDescriptor>::Write( |
943 | | IPC::Message* aMsg, |
944 | | mozilla::ipc::IProtocol* aActor, |
945 | | const paramType& aVar) -> void |
946 | 0 | { |
947 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).handle()); |
948 | 0 | // Sentinel = 'handle' |
949 | 0 | (aMsg)->WriteSentinel(453975108); |
950 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).size()); |
951 | 0 | // Sentinel = 'size' |
952 | 0 | (aMsg)->WriteSentinel(931048223); |
953 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).format()); |
954 | 0 | // Sentinel = 'format' |
955 | 0 | (aMsg)->WriteSentinel(2052265543); |
956 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).continuous()); |
957 | 0 | // Sentinel = 'continuous' |
958 | 0 | (aMsg)->WriteSentinel(2103626571); |
959 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).ignoreTransform()); |
960 | 0 | // Sentinel = 'ignoreTransform' |
961 | 0 | (aMsg)->WriteSentinel(3914789313); |
962 | 0 | } |
963 | | |
964 | | auto IPDLParamTraits<mozilla::layers::SurfaceTextureDescriptor>::Read( |
965 | | const IPC::Message* aMsg, |
966 | | PickleIterator* aIter, |
967 | | mozilla::ipc::IProtocol* aActor, |
968 | | paramType* aVar) -> bool |
969 | 0 | { |
970 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->handle())))))) { |
971 | 0 | (aActor)->FatalError("Error deserializing 'handle' (uint64_t) member of 'SurfaceTextureDescriptor'"); |
972 | 0 | return false; |
973 | 0 | } |
974 | 0 | // Sentinel = 'handle' |
975 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 453975108)))) { |
976 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'handle' (uint64_t) member of 'SurfaceTextureDescriptor'"); |
977 | 0 | return false; |
978 | 0 | } |
979 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->size())))))) { |
980 | 0 | (aActor)->FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceTextureDescriptor'"); |
981 | 0 | return false; |
982 | 0 | } |
983 | 0 | // Sentinel = 'size' |
984 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 931048223)))) { |
985 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceTextureDescriptor'"); |
986 | 0 | return false; |
987 | 0 | } |
988 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->format())))))) { |
989 | 0 | (aActor)->FatalError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceTextureDescriptor'"); |
990 | 0 | return false; |
991 | 0 | } |
992 | 0 | // Sentinel = 'format' |
993 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2052265543)))) { |
994 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceTextureDescriptor'"); |
995 | 0 | return false; |
996 | 0 | } |
997 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->continuous())))))) { |
998 | 0 | (aActor)->FatalError("Error deserializing 'continuous' (bool) member of 'SurfaceTextureDescriptor'"); |
999 | 0 | return false; |
1000 | 0 | } |
1001 | 0 | // Sentinel = 'continuous' |
1002 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2103626571)))) { |
1003 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'continuous' (bool) member of 'SurfaceTextureDescriptor'"); |
1004 | 0 | return false; |
1005 | 0 | } |
1006 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->ignoreTransform())))))) { |
1007 | 0 | (aActor)->FatalError("Error deserializing 'ignoreTransform' (bool) member of 'SurfaceTextureDescriptor'"); |
1008 | 0 | return false; |
1009 | 0 | } |
1010 | 0 | // Sentinel = 'ignoreTransform' |
1011 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3914789313)))) { |
1012 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ignoreTransform' (bool) member of 'SurfaceTextureDescriptor'"); |
1013 | 0 | return false; |
1014 | 0 | } |
1015 | 0 | return true; |
1016 | 0 | } |
1017 | | |
1018 | | } // namespace ipc |
1019 | | } // namespace mozilla |
1020 | | |
1021 | | //----------------------------------------------------------------------------- |
1022 | | // Method definitions for the IPDL type |struct EGLImageDescriptor| |
1023 | | // |
1024 | | namespace mozilla { |
1025 | | namespace layers { |
1026 | | auto EGLImageDescriptor::operator==(const EGLImageDescriptor& _o) const -> bool |
1027 | 0 | { |
1028 | 0 | if ((!((image()) == ((_o).image())))) { |
1029 | 0 | return false; |
1030 | 0 | } |
1031 | 0 | if ((!((fence()) == ((_o).fence())))) { |
1032 | 0 | return false; |
1033 | 0 | } |
1034 | 0 | if ((!((size()) == ((_o).size())))) { |
1035 | 0 | return false; |
1036 | 0 | } |
1037 | 0 | if ((!((hasAlpha()) == ((_o).hasAlpha())))) { |
1038 | 0 | return false; |
1039 | 0 | } |
1040 | 0 | return true; |
1041 | 0 | } |
1042 | | |
1043 | | auto EGLImageDescriptor::operator!=(const EGLImageDescriptor& _o) const -> bool |
1044 | 0 | { |
1045 | 0 | return (!(operator==(_o))); |
1046 | 0 | } |
1047 | | |
1048 | | } // namespace layers |
1049 | | } // namespace mozilla |
1050 | | |
1051 | | namespace mozilla { |
1052 | | namespace ipc { |
1053 | | auto IPDLParamTraits<mozilla::layers::EGLImageDescriptor>::Write( |
1054 | | IPC::Message* aMsg, |
1055 | | mozilla::ipc::IProtocol* aActor, |
1056 | | const paramType& aVar) -> void |
1057 | 0 | { |
1058 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).image()); |
1059 | 0 | // Sentinel = 'image' |
1060 | 0 | (aMsg)->WriteSentinel(103190282); |
1061 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).fence()); |
1062 | 0 | // Sentinel = 'fence' |
1063 | 0 | (aMsg)->WriteSentinel(1225633926); |
1064 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).size()); |
1065 | 0 | // Sentinel = 'size' |
1066 | 0 | (aMsg)->WriteSentinel(931048223); |
1067 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).hasAlpha()); |
1068 | 0 | // Sentinel = 'hasAlpha' |
1069 | 0 | (aMsg)->WriteSentinel(309498444); |
1070 | 0 | } |
1071 | | |
1072 | | auto IPDLParamTraits<mozilla::layers::EGLImageDescriptor>::Read( |
1073 | | const IPC::Message* aMsg, |
1074 | | PickleIterator* aIter, |
1075 | | mozilla::ipc::IProtocol* aActor, |
1076 | | paramType* aVar) -> bool |
1077 | 0 | { |
1078 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->image())))))) { |
1079 | 0 | (aActor)->FatalError("Error deserializing 'image' (uintptr_t) member of 'EGLImageDescriptor'"); |
1080 | 0 | return false; |
1081 | 0 | } |
1082 | 0 | // Sentinel = 'image' |
1083 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 103190282)))) { |
1084 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'image' (uintptr_t) member of 'EGLImageDescriptor'"); |
1085 | 0 | return false; |
1086 | 0 | } |
1087 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->fence())))))) { |
1088 | 0 | (aActor)->FatalError("Error deserializing 'fence' (uintptr_t) member of 'EGLImageDescriptor'"); |
1089 | 0 | return false; |
1090 | 0 | } |
1091 | 0 | // Sentinel = 'fence' |
1092 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1225633926)))) { |
1093 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'fence' (uintptr_t) member of 'EGLImageDescriptor'"); |
1094 | 0 | return false; |
1095 | 0 | } |
1096 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->size())))))) { |
1097 | 0 | (aActor)->FatalError("Error deserializing 'size' (IntSize) member of 'EGLImageDescriptor'"); |
1098 | 0 | return false; |
1099 | 0 | } |
1100 | 0 | // Sentinel = 'size' |
1101 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 931048223)))) { |
1102 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'EGLImageDescriptor'"); |
1103 | 0 | return false; |
1104 | 0 | } |
1105 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->hasAlpha())))))) { |
1106 | 0 | (aActor)->FatalError("Error deserializing 'hasAlpha' (bool) member of 'EGLImageDescriptor'"); |
1107 | 0 | return false; |
1108 | 0 | } |
1109 | 0 | // Sentinel = 'hasAlpha' |
1110 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 309498444)))) { |
1111 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'hasAlpha' (bool) member of 'EGLImageDescriptor'"); |
1112 | 0 | return false; |
1113 | 0 | } |
1114 | 0 | return true; |
1115 | 0 | } |
1116 | | |
1117 | | } // namespace ipc |
1118 | | } // namespace mozilla |
1119 | | |
1120 | | //----------------------------------------------------------------------------- |
1121 | | // Method definitions for the IPDL type |struct SurfaceDescriptorSharedGLTexture| |
1122 | | // |
1123 | | namespace mozilla { |
1124 | | namespace layers { |
1125 | | auto SurfaceDescriptorSharedGLTexture::operator==(const SurfaceDescriptorSharedGLTexture& _o) const -> bool |
1126 | 0 | { |
1127 | 0 | if ((!((texture()) == ((_o).texture())))) { |
1128 | 0 | return false; |
1129 | 0 | } |
1130 | 0 | if ((!((target()) == ((_o).target())))) { |
1131 | 0 | return false; |
1132 | 0 | } |
1133 | 0 | if ((!((fence()) == ((_o).fence())))) { |
1134 | 0 | return false; |
1135 | 0 | } |
1136 | 0 | if ((!((size()) == ((_o).size())))) { |
1137 | 0 | return false; |
1138 | 0 | } |
1139 | 0 | if ((!((hasAlpha()) == ((_o).hasAlpha())))) { |
1140 | 0 | return false; |
1141 | 0 | } |
1142 | 0 | return true; |
1143 | 0 | } |
1144 | | |
1145 | | auto SurfaceDescriptorSharedGLTexture::operator!=(const SurfaceDescriptorSharedGLTexture& _o) const -> bool |
1146 | 0 | { |
1147 | 0 | return (!(operator==(_o))); |
1148 | 0 | } |
1149 | | |
1150 | | } // namespace layers |
1151 | | } // namespace mozilla |
1152 | | |
1153 | | namespace mozilla { |
1154 | | namespace ipc { |
1155 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorSharedGLTexture>::Write( |
1156 | | IPC::Message* aMsg, |
1157 | | mozilla::ipc::IProtocol* aActor, |
1158 | | const paramType& aVar) -> void |
1159 | 0 | { |
1160 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).texture()); |
1161 | 0 | // Sentinel = 'texture' |
1162 | 0 | (aMsg)->WriteSentinel(3654462510); |
1163 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).target()); |
1164 | 0 | // Sentinel = 'target' |
1165 | 0 | (aMsg)->WriteSentinel(2226365285); |
1166 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).fence()); |
1167 | 0 | // Sentinel = 'fence' |
1168 | 0 | (aMsg)->WriteSentinel(1225633926); |
1169 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).size()); |
1170 | 0 | // Sentinel = 'size' |
1171 | 0 | (aMsg)->WriteSentinel(931048223); |
1172 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).hasAlpha()); |
1173 | 0 | // Sentinel = 'hasAlpha' |
1174 | 0 | (aMsg)->WriteSentinel(309498444); |
1175 | 0 | } |
1176 | | |
1177 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorSharedGLTexture>::Read( |
1178 | | const IPC::Message* aMsg, |
1179 | | PickleIterator* aIter, |
1180 | | mozilla::ipc::IProtocol* aActor, |
1181 | | paramType* aVar) -> bool |
1182 | 0 | { |
1183 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->texture())))))) { |
1184 | 0 | (aActor)->FatalError("Error deserializing 'texture' (uint32_t) member of 'SurfaceDescriptorSharedGLTexture'"); |
1185 | 0 | return false; |
1186 | 0 | } |
1187 | 0 | // Sentinel = 'texture' |
1188 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3654462510)))) { |
1189 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'texture' (uint32_t) member of 'SurfaceDescriptorSharedGLTexture'"); |
1190 | 0 | return false; |
1191 | 0 | } |
1192 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->target())))))) { |
1193 | 0 | (aActor)->FatalError("Error deserializing 'target' (uint32_t) member of 'SurfaceDescriptorSharedGLTexture'"); |
1194 | 0 | return false; |
1195 | 0 | } |
1196 | 0 | // Sentinel = 'target' |
1197 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2226365285)))) { |
1198 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'target' (uint32_t) member of 'SurfaceDescriptorSharedGLTexture'"); |
1199 | 0 | return false; |
1200 | 0 | } |
1201 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->fence())))))) { |
1202 | 0 | (aActor)->FatalError("Error deserializing 'fence' (uintptr_t) member of 'SurfaceDescriptorSharedGLTexture'"); |
1203 | 0 | return false; |
1204 | 0 | } |
1205 | 0 | // Sentinel = 'fence' |
1206 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1225633926)))) { |
1207 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'fence' (uintptr_t) member of 'SurfaceDescriptorSharedGLTexture'"); |
1208 | 0 | return false; |
1209 | 0 | } |
1210 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->size())))))) { |
1211 | 0 | (aActor)->FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorSharedGLTexture'"); |
1212 | 0 | return false; |
1213 | 0 | } |
1214 | 0 | // Sentinel = 'size' |
1215 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 931048223)))) { |
1216 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorSharedGLTexture'"); |
1217 | 0 | return false; |
1218 | 0 | } |
1219 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->hasAlpha())))))) { |
1220 | 0 | (aActor)->FatalError("Error deserializing 'hasAlpha' (bool) member of 'SurfaceDescriptorSharedGLTexture'"); |
1221 | 0 | return false; |
1222 | 0 | } |
1223 | 0 | // Sentinel = 'hasAlpha' |
1224 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 309498444)))) { |
1225 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'hasAlpha' (bool) member of 'SurfaceDescriptorSharedGLTexture'"); |
1226 | 0 | return false; |
1227 | 0 | } |
1228 | 0 | return true; |
1229 | 0 | } |
1230 | | |
1231 | | } // namespace ipc |
1232 | | } // namespace mozilla |
1233 | | |
1234 | | //----------------------------------------------------------------------------- |
1235 | | // Method definitions for the IPDL type |union GPUVideoSubDescriptor| |
1236 | | // |
1237 | | namespace mozilla { |
1238 | | namespace layers { |
1239 | | auto GPUVideoSubDescriptor::MaybeDestroy(Type aNewType) -> bool |
1240 | 0 | { |
1241 | 0 | if ((mType) == (T__None)) { |
1242 | 0 | return true; |
1243 | 0 | } |
1244 | 0 | if ((mType) == (aNewType)) { |
1245 | 0 | return false; |
1246 | 0 | } |
1247 | 0 | switch (mType) { |
1248 | 0 | case TSurfaceDescriptorD3D10: |
1249 | 0 | { |
1250 | 0 | (ptr_SurfaceDescriptorD3D10())->~SurfaceDescriptorD3D10__tdef(); |
1251 | 0 | break; |
1252 | 0 | } |
1253 | 0 | case TSurfaceDescriptorDXGIYCbCr: |
1254 | 0 | { |
1255 | 0 | (ptr_SurfaceDescriptorDXGIYCbCr())->~SurfaceDescriptorDXGIYCbCr__tdef(); |
1256 | 0 | break; |
1257 | 0 | } |
1258 | 0 | case Tnull_t: |
1259 | 0 | { |
1260 | 0 | (ptr_null_t())->~null_t__tdef(); |
1261 | 0 | break; |
1262 | 0 | } |
1263 | 0 | default: |
1264 | 0 | { |
1265 | 0 | mozilla::ipc::LogicError("not reached"); |
1266 | 0 | break; |
1267 | 0 | } |
1268 | 0 | } |
1269 | 0 | return true; |
1270 | 0 | } |
1271 | | |
1272 | | MOZ_IMPLICIT GPUVideoSubDescriptor::GPUVideoSubDescriptor(const SurfaceDescriptorD3D10& aOther) |
1273 | 0 | { |
1274 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10(aOther); |
1275 | 0 | mType = TSurfaceDescriptorD3D10; |
1276 | 0 | } |
1277 | | |
1278 | | MOZ_IMPLICIT GPUVideoSubDescriptor::GPUVideoSubDescriptor(SurfaceDescriptorD3D10&& aOther) |
1279 | 0 | { |
1280 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10(std::move(aOther)); |
1281 | 0 | mType = TSurfaceDescriptorD3D10; |
1282 | 0 | } |
1283 | | |
1284 | | MOZ_IMPLICIT GPUVideoSubDescriptor::GPUVideoSubDescriptor(const SurfaceDescriptorDXGIYCbCr& aOther) |
1285 | 0 | { |
1286 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr(aOther); |
1287 | 0 | mType = TSurfaceDescriptorDXGIYCbCr; |
1288 | 0 | } |
1289 | | |
1290 | | MOZ_IMPLICIT GPUVideoSubDescriptor::GPUVideoSubDescriptor(SurfaceDescriptorDXGIYCbCr&& aOther) |
1291 | 0 | { |
1292 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr(std::move(aOther)); |
1293 | 0 | mType = TSurfaceDescriptorDXGIYCbCr; |
1294 | 0 | } |
1295 | | |
1296 | | MOZ_IMPLICIT GPUVideoSubDescriptor::GPUVideoSubDescriptor(const null_t& aOther) |
1297 | 0 | { |
1298 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t(aOther); |
1299 | 0 | mType = Tnull_t; |
1300 | 0 | } |
1301 | | |
1302 | | MOZ_IMPLICIT GPUVideoSubDescriptor::GPUVideoSubDescriptor(null_t&& aOther) |
1303 | 0 | { |
1304 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t(std::move(aOther)); |
1305 | 0 | mType = Tnull_t; |
1306 | 0 | } |
1307 | | |
1308 | | MOZ_IMPLICIT GPUVideoSubDescriptor::GPUVideoSubDescriptor(const GPUVideoSubDescriptor& aOther) |
1309 | 0 | { |
1310 | 0 | (aOther).AssertSanity(); |
1311 | 0 | switch ((aOther).type()) { |
1312 | 0 | case TSurfaceDescriptorD3D10: |
1313 | 0 | { |
1314 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10((aOther).get_SurfaceDescriptorD3D10()); |
1315 | 0 | break; |
1316 | 0 | } |
1317 | 0 | case TSurfaceDescriptorDXGIYCbCr: |
1318 | 0 | { |
1319 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr((aOther).get_SurfaceDescriptorDXGIYCbCr()); |
1320 | 0 | break; |
1321 | 0 | } |
1322 | 0 | case Tnull_t: |
1323 | 0 | { |
1324 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t((aOther).get_null_t()); |
1325 | 0 | break; |
1326 | 0 | } |
1327 | 0 | case T__None: |
1328 | 0 | { |
1329 | 0 | break; |
1330 | 0 | } |
1331 | 0 | default: |
1332 | 0 | { |
1333 | 0 | mozilla::ipc::LogicError("unreached"); |
1334 | 0 | return; |
1335 | 0 | } |
1336 | 0 | } |
1337 | 0 | mType = (aOther).type(); |
1338 | 0 | } |
1339 | | |
1340 | | MOZ_IMPLICIT GPUVideoSubDescriptor::GPUVideoSubDescriptor(GPUVideoSubDescriptor&& aOther) |
1341 | 0 | { |
1342 | 0 | (aOther).AssertSanity(); |
1343 | 0 | Type t = (aOther).type(); |
1344 | 0 | switch (t) { |
1345 | 0 | case TSurfaceDescriptorD3D10: |
1346 | 0 | { |
1347 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10(std::move((aOther).get_SurfaceDescriptorD3D10())); |
1348 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
1349 | 0 | break; |
1350 | 0 | } |
1351 | 0 | case TSurfaceDescriptorDXGIYCbCr: |
1352 | 0 | { |
1353 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr(std::move((aOther).get_SurfaceDescriptorDXGIYCbCr())); |
1354 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
1355 | 0 | break; |
1356 | 0 | } |
1357 | 0 | case Tnull_t: |
1358 | 0 | { |
1359 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t(std::move((aOther).get_null_t())); |
1360 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
1361 | 0 | break; |
1362 | 0 | } |
1363 | 0 | case T__None: |
1364 | 0 | { |
1365 | 0 | break; |
1366 | 0 | } |
1367 | 0 | default: |
1368 | 0 | { |
1369 | 0 | mozilla::ipc::LogicError("unreached"); |
1370 | 0 | return; |
1371 | 0 | } |
1372 | 0 | } |
1373 | 0 | (aOther).mType = T__None; |
1374 | 0 | mType = t; |
1375 | 0 | } |
1376 | | |
1377 | | GPUVideoSubDescriptor::~GPUVideoSubDescriptor() |
1378 | 0 | { |
1379 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
1380 | 0 | } |
1381 | | |
1382 | | auto GPUVideoSubDescriptor::operator=(const SurfaceDescriptorD3D10& aRhs) -> GPUVideoSubDescriptor& |
1383 | 0 | { |
1384 | 0 | if (MaybeDestroy(TSurfaceDescriptorD3D10)) { |
1385 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10; |
1386 | 0 | } |
1387 | 0 | (*(ptr_SurfaceDescriptorD3D10())) = aRhs; |
1388 | 0 | mType = TSurfaceDescriptorD3D10; |
1389 | 0 | return (*(this)); |
1390 | 0 | } |
1391 | | |
1392 | | auto GPUVideoSubDescriptor::operator=(SurfaceDescriptorD3D10&& aRhs) -> GPUVideoSubDescriptor& |
1393 | 0 | { |
1394 | 0 | if (MaybeDestroy(TSurfaceDescriptorD3D10)) { |
1395 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10; |
1396 | 0 | } |
1397 | 0 | (*(ptr_SurfaceDescriptorD3D10())) = std::move(aRhs); |
1398 | 0 | mType = TSurfaceDescriptorD3D10; |
1399 | 0 | return (*(this)); |
1400 | 0 | } |
1401 | | |
1402 | | auto GPUVideoSubDescriptor::operator=(const SurfaceDescriptorDXGIYCbCr& aRhs) -> GPUVideoSubDescriptor& |
1403 | 0 | { |
1404 | 0 | if (MaybeDestroy(TSurfaceDescriptorDXGIYCbCr)) { |
1405 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr; |
1406 | 0 | } |
1407 | 0 | (*(ptr_SurfaceDescriptorDXGIYCbCr())) = aRhs; |
1408 | 0 | mType = TSurfaceDescriptorDXGIYCbCr; |
1409 | 0 | return (*(this)); |
1410 | 0 | } |
1411 | | |
1412 | | auto GPUVideoSubDescriptor::operator=(SurfaceDescriptorDXGIYCbCr&& aRhs) -> GPUVideoSubDescriptor& |
1413 | 0 | { |
1414 | 0 | if (MaybeDestroy(TSurfaceDescriptorDXGIYCbCr)) { |
1415 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr; |
1416 | 0 | } |
1417 | 0 | (*(ptr_SurfaceDescriptorDXGIYCbCr())) = std::move(aRhs); |
1418 | 0 | mType = TSurfaceDescriptorDXGIYCbCr; |
1419 | 0 | return (*(this)); |
1420 | 0 | } |
1421 | | |
1422 | | auto GPUVideoSubDescriptor::operator=(const null_t& aRhs) -> GPUVideoSubDescriptor& |
1423 | 0 | { |
1424 | 0 | if (MaybeDestroy(Tnull_t)) { |
1425 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t; |
1426 | 0 | } |
1427 | 0 | (*(ptr_null_t())) = aRhs; |
1428 | 0 | mType = Tnull_t; |
1429 | 0 | return (*(this)); |
1430 | 0 | } |
1431 | | |
1432 | | auto GPUVideoSubDescriptor::operator=(null_t&& aRhs) -> GPUVideoSubDescriptor& |
1433 | 0 | { |
1434 | 0 | if (MaybeDestroy(Tnull_t)) { |
1435 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t; |
1436 | 0 | } |
1437 | 0 | (*(ptr_null_t())) = std::move(aRhs); |
1438 | 0 | mType = Tnull_t; |
1439 | 0 | return (*(this)); |
1440 | 0 | } |
1441 | | |
1442 | | auto GPUVideoSubDescriptor::operator=(const GPUVideoSubDescriptor& aRhs) -> GPUVideoSubDescriptor& |
1443 | 0 | { |
1444 | 0 | (aRhs).AssertSanity(); |
1445 | 0 | Type t = (aRhs).type(); |
1446 | 0 | switch (t) { |
1447 | 0 | case TSurfaceDescriptorD3D10: |
1448 | 0 | { |
1449 | 0 | if (MaybeDestroy(t)) { |
1450 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10; |
1451 | 0 | } |
1452 | 0 | (*(ptr_SurfaceDescriptorD3D10())) = (aRhs).get_SurfaceDescriptorD3D10(); |
1453 | 0 | break; |
1454 | 0 | } |
1455 | 0 | case TSurfaceDescriptorDXGIYCbCr: |
1456 | 0 | { |
1457 | 0 | if (MaybeDestroy(t)) { |
1458 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr; |
1459 | 0 | } |
1460 | 0 | (*(ptr_SurfaceDescriptorDXGIYCbCr())) = (aRhs).get_SurfaceDescriptorDXGIYCbCr(); |
1461 | 0 | break; |
1462 | 0 | } |
1463 | 0 | case Tnull_t: |
1464 | 0 | { |
1465 | 0 | if (MaybeDestroy(t)) { |
1466 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t; |
1467 | 0 | } |
1468 | 0 | (*(ptr_null_t())) = (aRhs).get_null_t(); |
1469 | 0 | break; |
1470 | 0 | } |
1471 | 0 | case T__None: |
1472 | 0 | { |
1473 | 0 | static_cast<void>(MaybeDestroy(t)); |
1474 | 0 | break; |
1475 | 0 | } |
1476 | 0 | default: |
1477 | 0 | { |
1478 | 0 | mozilla::ipc::LogicError("unreached"); |
1479 | 0 | break; |
1480 | 0 | } |
1481 | 0 | } |
1482 | 0 | mType = t; |
1483 | 0 | return (*(this)); |
1484 | 0 | } |
1485 | | |
1486 | | auto GPUVideoSubDescriptor::operator=(GPUVideoSubDescriptor&& aRhs) -> GPUVideoSubDescriptor& |
1487 | 0 | { |
1488 | 0 | (aRhs).AssertSanity(); |
1489 | 0 | Type t = (aRhs).type(); |
1490 | 0 | switch (t) { |
1491 | 0 | case TSurfaceDescriptorD3D10: |
1492 | 0 | { |
1493 | 0 | if (MaybeDestroy(t)) { |
1494 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10; |
1495 | 0 | } |
1496 | 0 | (*(ptr_SurfaceDescriptorD3D10())) = std::move((aRhs).get_SurfaceDescriptorD3D10()); |
1497 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
1498 | 0 | break; |
1499 | 0 | } |
1500 | 0 | case TSurfaceDescriptorDXGIYCbCr: |
1501 | 0 | { |
1502 | 0 | if (MaybeDestroy(t)) { |
1503 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr; |
1504 | 0 | } |
1505 | 0 | (*(ptr_SurfaceDescriptorDXGIYCbCr())) = std::move((aRhs).get_SurfaceDescriptorDXGIYCbCr()); |
1506 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
1507 | 0 | break; |
1508 | 0 | } |
1509 | 0 | case Tnull_t: |
1510 | 0 | { |
1511 | 0 | if (MaybeDestroy(t)) { |
1512 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t; |
1513 | 0 | } |
1514 | 0 | (*(ptr_null_t())) = std::move((aRhs).get_null_t()); |
1515 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
1516 | 0 | break; |
1517 | 0 | } |
1518 | 0 | case T__None: |
1519 | 0 | { |
1520 | 0 | static_cast<void>(MaybeDestroy(t)); |
1521 | 0 | break; |
1522 | 0 | } |
1523 | 0 | default: |
1524 | 0 | { |
1525 | 0 | mozilla::ipc::LogicError("unreached"); |
1526 | 0 | break; |
1527 | 0 | } |
1528 | 0 | } |
1529 | 0 | (aRhs).mType = T__None; |
1530 | 0 | mType = t; |
1531 | 0 | return (*(this)); |
1532 | 0 | } |
1533 | | |
1534 | | auto GPUVideoSubDescriptor::operator==(const SurfaceDescriptorD3D10& aRhs) const -> bool |
1535 | 0 | { |
1536 | 0 | return (get_SurfaceDescriptorD3D10()) == (aRhs); |
1537 | 0 | } |
1538 | | |
1539 | | auto GPUVideoSubDescriptor::operator==(const SurfaceDescriptorDXGIYCbCr& aRhs) const -> bool |
1540 | 0 | { |
1541 | 0 | return (get_SurfaceDescriptorDXGIYCbCr()) == (aRhs); |
1542 | 0 | } |
1543 | | |
1544 | | auto GPUVideoSubDescriptor::operator==(const null_t& aRhs) const -> bool |
1545 | 0 | { |
1546 | 0 | return (get_null_t()) == (aRhs); |
1547 | 0 | } |
1548 | | |
1549 | | auto GPUVideoSubDescriptor::operator==(const GPUVideoSubDescriptor& aRhs) const -> bool |
1550 | 0 | { |
1551 | 0 | if ((type()) != ((aRhs).type())) { |
1552 | 0 | return false; |
1553 | 0 | } |
1554 | 0 | |
1555 | 0 | switch (type()) { |
1556 | 0 | case TSurfaceDescriptorD3D10: |
1557 | 0 | { |
1558 | 0 | return (get_SurfaceDescriptorD3D10()) == ((aRhs).get_SurfaceDescriptorD3D10()); |
1559 | 0 | } |
1560 | 0 | case TSurfaceDescriptorDXGIYCbCr: |
1561 | 0 | { |
1562 | 0 | return (get_SurfaceDescriptorDXGIYCbCr()) == ((aRhs).get_SurfaceDescriptorDXGIYCbCr()); |
1563 | 0 | } |
1564 | 0 | case Tnull_t: |
1565 | 0 | { |
1566 | 0 | return (get_null_t()) == ((aRhs).get_null_t()); |
1567 | 0 | } |
1568 | 0 | default: |
1569 | 0 | { |
1570 | 0 | mozilla::ipc::LogicError("unreached"); |
1571 | 0 | return false; |
1572 | 0 | } |
1573 | 0 | } |
1574 | 0 | } |
1575 | | |
1576 | | auto GPUVideoSubDescriptor::get(SurfaceDescriptorD3D10* aOutValue) const -> void |
1577 | 0 | { |
1578 | 0 | (*(aOutValue)) = get_SurfaceDescriptorD3D10(); |
1579 | 0 | } |
1580 | | |
1581 | | auto GPUVideoSubDescriptor::get(SurfaceDescriptorDXGIYCbCr* aOutValue) const -> void |
1582 | 0 | { |
1583 | 0 | (*(aOutValue)) = get_SurfaceDescriptorDXGIYCbCr(); |
1584 | 0 | } |
1585 | | |
1586 | | auto GPUVideoSubDescriptor::get(null_t* aOutValue) const -> void |
1587 | 0 | { |
1588 | 0 | (*(aOutValue)) = get_null_t(); |
1589 | 0 | } |
1590 | | |
1591 | | } // namespace layers |
1592 | | } // namespace mozilla |
1593 | | |
1594 | | namespace mozilla { |
1595 | | namespace ipc { |
1596 | | auto IPDLParamTraits<mozilla::layers::GPUVideoSubDescriptor>::Write( |
1597 | | IPC::Message* aMsg, |
1598 | | mozilla::ipc::IProtocol* aActor, |
1599 | | const paramType& aVar) -> void |
1600 | | { |
1601 | | typedef mozilla::layers::GPUVideoSubDescriptor union__; |
1602 | | int type; |
1603 | | type = (aVar).type(); |
1604 | | WriteIPDLParam(aMsg, aActor, type); |
1605 | | // Sentinel = 'GPUVideoSubDescriptor' |
1606 | | (aMsg)->WriteSentinel(1251035053); |
1607 | | |
1608 | | switch (type) { |
1609 | | case union__::TSurfaceDescriptorD3D10: |
1610 | | { |
1611 | | WriteIPDLParam(aMsg, aActor, (aVar).get_SurfaceDescriptorD3D10()); |
1612 | | // Sentinel = 'TSurfaceDescriptorD3D10' |
1613 | | (aMsg)->WriteSentinel(2753564567); |
1614 | | return; |
1615 | | } |
1616 | | case union__::TSurfaceDescriptorDXGIYCbCr: |
1617 | | { |
1618 | | WriteIPDLParam(aMsg, aActor, (aVar).get_SurfaceDescriptorDXGIYCbCr()); |
1619 | | // Sentinel = 'TSurfaceDescriptorDXGIYCbCr' |
1620 | | (aMsg)->WriteSentinel(3061212892); |
1621 | | return; |
1622 | | } |
1623 | | case union__::Tnull_t: |
1624 | | { |
1625 | | WriteIPDLParam(aMsg, aActor, (aVar).get_null_t()); |
1626 | | // Sentinel = 'Tnull_t' |
1627 | | (aMsg)->WriteSentinel(3731137201); |
1628 | | return; |
1629 | | } |
1630 | | default: |
1631 | | { |
1632 | | (aActor)->FatalError("unknown union type"); |
1633 | | return; |
1634 | | } |
1635 | | } |
1636 | | } |
1637 | | |
1638 | | auto IPDLParamTraits<mozilla::layers::GPUVideoSubDescriptor>::Read( |
1639 | | const IPC::Message* aMsg, |
1640 | | PickleIterator* aIter, |
1641 | | mozilla::ipc::IProtocol* aActor, |
1642 | | paramType* aVar) -> bool |
1643 | 0 | { |
1644 | 0 | typedef mozilla::layers::GPUVideoSubDescriptor union__; |
1645 | 0 | int type; |
1646 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) { |
1647 | 0 | (aActor)->FatalError("Error deserializing type of union GPUVideoSubDescriptor"); |
1648 | 0 | return false; |
1649 | 0 | } |
1650 | 0 | // Sentinel = 'GPUVideoSubDescriptor' |
1651 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1251035053)))) { |
1652 | 0 | mozilla::ipc::SentinelReadError("Error deserializing type of union GPUVideoSubDescriptor"); |
1653 | 0 | return false; |
1654 | 0 | } |
1655 | 0 | |
1656 | 0 | switch (type) { |
1657 | 0 | case union__::TSurfaceDescriptorD3D10: |
1658 | 0 | { |
1659 | 0 | mozilla::layers::SurfaceDescriptorD3D10 tmp = mozilla::layers::SurfaceDescriptorD3D10(); |
1660 | 0 | (*(aVar)) = tmp; |
1661 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SurfaceDescriptorD3D10())))))) { |
1662 | 0 | (aActor)->FatalError("Error deserializing variant TSurfaceDescriptorD3D10 of union GPUVideoSubDescriptor"); |
1663 | 0 | return false; |
1664 | 0 | } |
1665 | 0 | // Sentinel = 'TSurfaceDescriptorD3D10' |
1666 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2753564567)))) { |
1667 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TSurfaceDescriptorD3D10 of union GPUVideoSubDescriptor"); |
1668 | 0 | return false; |
1669 | 0 | } |
1670 | 0 | return true; |
1671 | 0 | } |
1672 | 0 | case union__::TSurfaceDescriptorDXGIYCbCr: |
1673 | 0 | { |
1674 | 0 | mozilla::layers::SurfaceDescriptorDXGIYCbCr tmp = mozilla::layers::SurfaceDescriptorDXGIYCbCr(); |
1675 | 0 | (*(aVar)) = tmp; |
1676 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SurfaceDescriptorDXGIYCbCr())))))) { |
1677 | 0 | (aActor)->FatalError("Error deserializing variant TSurfaceDescriptorDXGIYCbCr of union GPUVideoSubDescriptor"); |
1678 | 0 | return false; |
1679 | 0 | } |
1680 | 0 | // Sentinel = 'TSurfaceDescriptorDXGIYCbCr' |
1681 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3061212892)))) { |
1682 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TSurfaceDescriptorDXGIYCbCr of union GPUVideoSubDescriptor"); |
1683 | 0 | return false; |
1684 | 0 | } |
1685 | 0 | return true; |
1686 | 0 | } |
1687 | 0 | case union__::Tnull_t: |
1688 | 0 | { |
1689 | 0 | mozilla::null_t tmp = mozilla::null_t(); |
1690 | 0 | (*(aVar)) = tmp; |
1691 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_null_t())))))) { |
1692 | 0 | (aActor)->FatalError("Error deserializing variant Tnull_t of union GPUVideoSubDescriptor"); |
1693 | 0 | return false; |
1694 | 0 | } |
1695 | 0 | // Sentinel = 'Tnull_t' |
1696 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3731137201)))) { |
1697 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant Tnull_t of union GPUVideoSubDescriptor"); |
1698 | 0 | return false; |
1699 | 0 | } |
1700 | 0 | return true; |
1701 | 0 | } |
1702 | 0 | default: |
1703 | 0 | { |
1704 | 0 | (aActor)->FatalError("unknown union type"); |
1705 | 0 | return false; |
1706 | 0 | } |
1707 | 0 | } |
1708 | 0 | } |
1709 | | |
1710 | | } // namespace ipc |
1711 | | } // namespace mozilla |
1712 | | |
1713 | | //----------------------------------------------------------------------------- |
1714 | | // Method definitions for the IPDL type |struct SurfaceDescriptorGPUVideo| |
1715 | | // |
1716 | | namespace mozilla { |
1717 | | namespace layers { |
1718 | | auto SurfaceDescriptorGPUVideo::operator==(const SurfaceDescriptorGPUVideo& _o) const -> bool |
1719 | 0 | { |
1720 | 0 | if ((!((handle()) == ((_o).handle())))) { |
1721 | 0 | return false; |
1722 | 0 | } |
1723 | 0 | if ((!((subdesc()) == ((_o).subdesc())))) { |
1724 | 0 | return false; |
1725 | 0 | } |
1726 | 0 | return true; |
1727 | 0 | } |
1728 | | |
1729 | | auto SurfaceDescriptorGPUVideo::operator!=(const SurfaceDescriptorGPUVideo& _o) const -> bool |
1730 | 0 | { |
1731 | 0 | return (!(operator==(_o))); |
1732 | 0 | } |
1733 | | |
1734 | | } // namespace layers |
1735 | | } // namespace mozilla |
1736 | | |
1737 | | namespace mozilla { |
1738 | | namespace ipc { |
1739 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorGPUVideo>::Write( |
1740 | | IPC::Message* aMsg, |
1741 | | mozilla::ipc::IProtocol* aActor, |
1742 | | const paramType& aVar) -> void |
1743 | 0 | { |
1744 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).handle()); |
1745 | 0 | // Sentinel = 'handle' |
1746 | 0 | (aMsg)->WriteSentinel(453975108); |
1747 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).subdesc()); |
1748 | 0 | // Sentinel = 'subdesc' |
1749 | 0 | (aMsg)->WriteSentinel(354394294); |
1750 | 0 | } |
1751 | | |
1752 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorGPUVideo>::Read( |
1753 | | const IPC::Message* aMsg, |
1754 | | PickleIterator* aIter, |
1755 | | mozilla::ipc::IProtocol* aActor, |
1756 | | paramType* aVar) -> bool |
1757 | 0 | { |
1758 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->handle())))))) { |
1759 | 0 | (aActor)->FatalError("Error deserializing 'handle' (uint64_t) member of 'SurfaceDescriptorGPUVideo'"); |
1760 | 0 | return false; |
1761 | 0 | } |
1762 | 0 | // Sentinel = 'handle' |
1763 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 453975108)))) { |
1764 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'handle' (uint64_t) member of 'SurfaceDescriptorGPUVideo'"); |
1765 | 0 | return false; |
1766 | 0 | } |
1767 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->subdesc())))))) { |
1768 | 0 | (aActor)->FatalError("Error deserializing 'subdesc' (GPUVideoSubDescriptor) member of 'SurfaceDescriptorGPUVideo'"); |
1769 | 0 | return false; |
1770 | 0 | } |
1771 | 0 | // Sentinel = 'subdesc' |
1772 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 354394294)))) { |
1773 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'subdesc' (GPUVideoSubDescriptor) member of 'SurfaceDescriptorGPUVideo'"); |
1774 | 0 | return false; |
1775 | 0 | } |
1776 | 0 | return true; |
1777 | 0 | } |
1778 | | |
1779 | | } // namespace ipc |
1780 | | } // namespace mozilla |
1781 | | |
1782 | | //----------------------------------------------------------------------------- |
1783 | | // Method definitions for the IPDL type |struct RGBDescriptor| |
1784 | | // |
1785 | | namespace mozilla { |
1786 | | namespace layers { |
1787 | | auto RGBDescriptor::operator==(const RGBDescriptor& _o) const -> bool |
1788 | 0 | { |
1789 | 0 | if ((!((size()) == ((_o).size())))) { |
1790 | 0 | return false; |
1791 | 0 | } |
1792 | 0 | if ((!((format()) == ((_o).format())))) { |
1793 | 0 | return false; |
1794 | 0 | } |
1795 | 0 | if ((!((hasIntermediateBuffer()) == ((_o).hasIntermediateBuffer())))) { |
1796 | 0 | return false; |
1797 | 0 | } |
1798 | 0 | return true; |
1799 | 0 | } |
1800 | | |
1801 | | auto RGBDescriptor::operator!=(const RGBDescriptor& _o) const -> bool |
1802 | 0 | { |
1803 | 0 | return (!(operator==(_o))); |
1804 | 0 | } |
1805 | | |
1806 | | } // namespace layers |
1807 | | } // namespace mozilla |
1808 | | |
1809 | | namespace mozilla { |
1810 | | namespace ipc { |
1811 | | auto IPDLParamTraits<mozilla::layers::RGBDescriptor>::Write( |
1812 | | IPC::Message* aMsg, |
1813 | | mozilla::ipc::IProtocol* aActor, |
1814 | | const paramType& aVar) -> void |
1815 | 0 | { |
1816 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).size()); |
1817 | 0 | // Sentinel = 'size' |
1818 | 0 | (aMsg)->WriteSentinel(931048223); |
1819 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).format()); |
1820 | 0 | // Sentinel = 'format' |
1821 | 0 | (aMsg)->WriteSentinel(2052265543); |
1822 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).hasIntermediateBuffer()); |
1823 | 0 | // Sentinel = 'hasIntermediateBuffer' |
1824 | 0 | (aMsg)->WriteSentinel(985857996); |
1825 | 0 | } |
1826 | | |
1827 | | auto IPDLParamTraits<mozilla::layers::RGBDescriptor>::Read( |
1828 | | const IPC::Message* aMsg, |
1829 | | PickleIterator* aIter, |
1830 | | mozilla::ipc::IProtocol* aActor, |
1831 | | paramType* aVar) -> bool |
1832 | 0 | { |
1833 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->size())))))) { |
1834 | 0 | (aActor)->FatalError("Error deserializing 'size' (IntSize) member of 'RGBDescriptor'"); |
1835 | 0 | return false; |
1836 | 0 | } |
1837 | 0 | // Sentinel = 'size' |
1838 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 931048223)))) { |
1839 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'RGBDescriptor'"); |
1840 | 0 | return false; |
1841 | 0 | } |
1842 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->format())))))) { |
1843 | 0 | (aActor)->FatalError("Error deserializing 'format' (SurfaceFormat) member of 'RGBDescriptor'"); |
1844 | 0 | return false; |
1845 | 0 | } |
1846 | 0 | // Sentinel = 'format' |
1847 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2052265543)))) { |
1848 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'format' (SurfaceFormat) member of 'RGBDescriptor'"); |
1849 | 0 | return false; |
1850 | 0 | } |
1851 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->hasIntermediateBuffer())))))) { |
1852 | 0 | (aActor)->FatalError("Error deserializing 'hasIntermediateBuffer' (bool) member of 'RGBDescriptor'"); |
1853 | 0 | return false; |
1854 | 0 | } |
1855 | 0 | // Sentinel = 'hasIntermediateBuffer' |
1856 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 985857996)))) { |
1857 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'hasIntermediateBuffer' (bool) member of 'RGBDescriptor'"); |
1858 | 0 | return false; |
1859 | 0 | } |
1860 | 0 | return true; |
1861 | 0 | } |
1862 | | |
1863 | | } // namespace ipc |
1864 | | } // namespace mozilla |
1865 | | |
1866 | | //----------------------------------------------------------------------------- |
1867 | | // Method definitions for the IPDL type |struct YCbCrDescriptor| |
1868 | | // |
1869 | | namespace mozilla { |
1870 | | namespace layers { |
1871 | | auto YCbCrDescriptor::operator==(const YCbCrDescriptor& _o) const -> bool |
1872 | 0 | { |
1873 | 0 | if ((!((ySize()) == ((_o).ySize())))) { |
1874 | 0 | return false; |
1875 | 0 | } |
1876 | 0 | if ((!((yStride()) == ((_o).yStride())))) { |
1877 | 0 | return false; |
1878 | 0 | } |
1879 | 0 | if ((!((cbCrSize()) == ((_o).cbCrSize())))) { |
1880 | 0 | return false; |
1881 | 0 | } |
1882 | 0 | if ((!((cbCrStride()) == ((_o).cbCrStride())))) { |
1883 | 0 | return false; |
1884 | 0 | } |
1885 | 0 | if ((!((yOffset()) == ((_o).yOffset())))) { |
1886 | 0 | return false; |
1887 | 0 | } |
1888 | 0 | if ((!((cbOffset()) == ((_o).cbOffset())))) { |
1889 | 0 | return false; |
1890 | 0 | } |
1891 | 0 | if ((!((crOffset()) == ((_o).crOffset())))) { |
1892 | 0 | return false; |
1893 | 0 | } |
1894 | 0 | if ((!((stereoMode()) == ((_o).stereoMode())))) { |
1895 | 0 | return false; |
1896 | 0 | } |
1897 | 0 | if ((!((yUVColorSpace()) == ((_o).yUVColorSpace())))) { |
1898 | 0 | return false; |
1899 | 0 | } |
1900 | 0 | if ((!((bitDepth()) == ((_o).bitDepth())))) { |
1901 | 0 | return false; |
1902 | 0 | } |
1903 | 0 | if ((!((hasIntermediateBuffer()) == ((_o).hasIntermediateBuffer())))) { |
1904 | 0 | return false; |
1905 | 0 | } |
1906 | 0 | return true; |
1907 | 0 | } |
1908 | | |
1909 | | auto YCbCrDescriptor::operator!=(const YCbCrDescriptor& _o) const -> bool |
1910 | 0 | { |
1911 | 0 | return (!(operator==(_o))); |
1912 | 0 | } |
1913 | | |
1914 | | } // namespace layers |
1915 | | } // namespace mozilla |
1916 | | |
1917 | | namespace mozilla { |
1918 | | namespace ipc { |
1919 | | auto IPDLParamTraits<mozilla::layers::YCbCrDescriptor>::Write( |
1920 | | IPC::Message* aMsg, |
1921 | | mozilla::ipc::IProtocol* aActor, |
1922 | | const paramType& aVar) -> void |
1923 | 0 | { |
1924 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).ySize()); |
1925 | 0 | // Sentinel = 'ySize' |
1926 | 0 | (aMsg)->WriteSentinel(313512843); |
1927 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).yStride()); |
1928 | 0 | // Sentinel = 'yStride' |
1929 | 0 | (aMsg)->WriteSentinel(2975587197); |
1930 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).cbCrSize()); |
1931 | 0 | // Sentinel = 'cbCrSize' |
1932 | 0 | (aMsg)->WriteSentinel(2601117167); |
1933 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).cbCrStride()); |
1934 | 0 | // Sentinel = 'cbCrStride' |
1935 | 0 | (aMsg)->WriteSentinel(301955305); |
1936 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).yOffset()); |
1937 | 0 | // Sentinel = 'yOffset' |
1938 | 0 | (aMsg)->WriteSentinel(983795183); |
1939 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).cbOffset()); |
1940 | 0 | // Sentinel = 'cbOffset' |
1941 | 0 | (aMsg)->WriteSentinel(4197159602); |
1942 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).crOffset()); |
1943 | 0 | // Sentinel = 'crOffset' |
1944 | 0 | (aMsg)->WriteSentinel(1739681986); |
1945 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).stereoMode()); |
1946 | 0 | // Sentinel = 'stereoMode' |
1947 | 0 | (aMsg)->WriteSentinel(2234072623); |
1948 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).yUVColorSpace()); |
1949 | 0 | // Sentinel = 'yUVColorSpace' |
1950 | 0 | (aMsg)->WriteSentinel(1051398544); |
1951 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).bitDepth()); |
1952 | 0 | // Sentinel = 'bitDepth' |
1953 | 0 | (aMsg)->WriteSentinel(3117232644); |
1954 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).hasIntermediateBuffer()); |
1955 | 0 | // Sentinel = 'hasIntermediateBuffer' |
1956 | 0 | (aMsg)->WriteSentinel(985857996); |
1957 | 0 | } |
1958 | | |
1959 | | auto IPDLParamTraits<mozilla::layers::YCbCrDescriptor>::Read( |
1960 | | const IPC::Message* aMsg, |
1961 | | PickleIterator* aIter, |
1962 | | mozilla::ipc::IProtocol* aActor, |
1963 | | paramType* aVar) -> bool |
1964 | 0 | { |
1965 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->ySize())))))) { |
1966 | 0 | (aActor)->FatalError("Error deserializing 'ySize' (IntSize) member of 'YCbCrDescriptor'"); |
1967 | 0 | return false; |
1968 | 0 | } |
1969 | 0 | // Sentinel = 'ySize' |
1970 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 313512843)))) { |
1971 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ySize' (IntSize) member of 'YCbCrDescriptor'"); |
1972 | 0 | return false; |
1973 | 0 | } |
1974 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->yStride())))))) { |
1975 | 0 | (aActor)->FatalError("Error deserializing 'yStride' (uint32_t) member of 'YCbCrDescriptor'"); |
1976 | 0 | return false; |
1977 | 0 | } |
1978 | 0 | // Sentinel = 'yStride' |
1979 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2975587197)))) { |
1980 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'yStride' (uint32_t) member of 'YCbCrDescriptor'"); |
1981 | 0 | return false; |
1982 | 0 | } |
1983 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->cbCrSize())))))) { |
1984 | 0 | (aActor)->FatalError("Error deserializing 'cbCrSize' (IntSize) member of 'YCbCrDescriptor'"); |
1985 | 0 | return false; |
1986 | 0 | } |
1987 | 0 | // Sentinel = 'cbCrSize' |
1988 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2601117167)))) { |
1989 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'cbCrSize' (IntSize) member of 'YCbCrDescriptor'"); |
1990 | 0 | return false; |
1991 | 0 | } |
1992 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->cbCrStride())))))) { |
1993 | 0 | (aActor)->FatalError("Error deserializing 'cbCrStride' (uint32_t) member of 'YCbCrDescriptor'"); |
1994 | 0 | return false; |
1995 | 0 | } |
1996 | 0 | // Sentinel = 'cbCrStride' |
1997 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 301955305)))) { |
1998 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'cbCrStride' (uint32_t) member of 'YCbCrDescriptor'"); |
1999 | 0 | return false; |
2000 | 0 | } |
2001 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->yOffset())))))) { |
2002 | 0 | (aActor)->FatalError("Error deserializing 'yOffset' (uint32_t) member of 'YCbCrDescriptor'"); |
2003 | 0 | return false; |
2004 | 0 | } |
2005 | 0 | // Sentinel = 'yOffset' |
2006 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 983795183)))) { |
2007 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'yOffset' (uint32_t) member of 'YCbCrDescriptor'"); |
2008 | 0 | return false; |
2009 | 0 | } |
2010 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->cbOffset())))))) { |
2011 | 0 | (aActor)->FatalError("Error deserializing 'cbOffset' (uint32_t) member of 'YCbCrDescriptor'"); |
2012 | 0 | return false; |
2013 | 0 | } |
2014 | 0 | // Sentinel = 'cbOffset' |
2015 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 4197159602)))) { |
2016 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'cbOffset' (uint32_t) member of 'YCbCrDescriptor'"); |
2017 | 0 | return false; |
2018 | 0 | } |
2019 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->crOffset())))))) { |
2020 | 0 | (aActor)->FatalError("Error deserializing 'crOffset' (uint32_t) member of 'YCbCrDescriptor'"); |
2021 | 0 | return false; |
2022 | 0 | } |
2023 | 0 | // Sentinel = 'crOffset' |
2024 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1739681986)))) { |
2025 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'crOffset' (uint32_t) member of 'YCbCrDescriptor'"); |
2026 | 0 | return false; |
2027 | 0 | } |
2028 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->stereoMode())))))) { |
2029 | 0 | (aActor)->FatalError("Error deserializing 'stereoMode' (StereoMode) member of 'YCbCrDescriptor'"); |
2030 | 0 | return false; |
2031 | 0 | } |
2032 | 0 | // Sentinel = 'stereoMode' |
2033 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2234072623)))) { |
2034 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'stereoMode' (StereoMode) member of 'YCbCrDescriptor'"); |
2035 | 0 | return false; |
2036 | 0 | } |
2037 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->yUVColorSpace())))))) { |
2038 | 0 | (aActor)->FatalError("Error deserializing 'yUVColorSpace' (YUVColorSpace) member of 'YCbCrDescriptor'"); |
2039 | 0 | return false; |
2040 | 0 | } |
2041 | 0 | // Sentinel = 'yUVColorSpace' |
2042 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1051398544)))) { |
2043 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'yUVColorSpace' (YUVColorSpace) member of 'YCbCrDescriptor'"); |
2044 | 0 | return false; |
2045 | 0 | } |
2046 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->bitDepth())))))) { |
2047 | 0 | (aActor)->FatalError("Error deserializing 'bitDepth' (uint32_t) member of 'YCbCrDescriptor'"); |
2048 | 0 | return false; |
2049 | 0 | } |
2050 | 0 | // Sentinel = 'bitDepth' |
2051 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3117232644)))) { |
2052 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'bitDepth' (uint32_t) member of 'YCbCrDescriptor'"); |
2053 | 0 | return false; |
2054 | 0 | } |
2055 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->hasIntermediateBuffer())))))) { |
2056 | 0 | (aActor)->FatalError("Error deserializing 'hasIntermediateBuffer' (bool) member of 'YCbCrDescriptor'"); |
2057 | 0 | return false; |
2058 | 0 | } |
2059 | 0 | // Sentinel = 'hasIntermediateBuffer' |
2060 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 985857996)))) { |
2061 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'hasIntermediateBuffer' (bool) member of 'YCbCrDescriptor'"); |
2062 | 0 | return false; |
2063 | 0 | } |
2064 | 0 | return true; |
2065 | 0 | } |
2066 | | |
2067 | | } // namespace ipc |
2068 | | } // namespace mozilla |
2069 | | |
2070 | | //----------------------------------------------------------------------------- |
2071 | | // Method definitions for the IPDL type |union BufferDescriptor| |
2072 | | // |
2073 | | namespace mozilla { |
2074 | | namespace layers { |
2075 | | auto BufferDescriptor::MaybeDestroy(Type aNewType) -> bool |
2076 | 0 | { |
2077 | 0 | if ((mType) == (T__None)) { |
2078 | 0 | return true; |
2079 | 0 | } |
2080 | 0 | if ((mType) == (aNewType)) { |
2081 | 0 | return false; |
2082 | 0 | } |
2083 | 0 | switch (mType) { |
2084 | 0 | case TRGBDescriptor: |
2085 | 0 | { |
2086 | 0 | (ptr_RGBDescriptor())->~RGBDescriptor__tdef(); |
2087 | 0 | break; |
2088 | 0 | } |
2089 | 0 | case TYCbCrDescriptor: |
2090 | 0 | { |
2091 | 0 | (ptr_YCbCrDescriptor())->~YCbCrDescriptor__tdef(); |
2092 | 0 | break; |
2093 | 0 | } |
2094 | 0 | default: |
2095 | 0 | { |
2096 | 0 | mozilla::ipc::LogicError("not reached"); |
2097 | 0 | break; |
2098 | 0 | } |
2099 | 0 | } |
2100 | 0 | return true; |
2101 | 0 | } |
2102 | | |
2103 | | MOZ_IMPLICIT BufferDescriptor::BufferDescriptor(const RGBDescriptor& aOther) |
2104 | 0 | { |
2105 | 0 | new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor(aOther); |
2106 | 0 | mType = TRGBDescriptor; |
2107 | 0 | } |
2108 | | |
2109 | | MOZ_IMPLICIT BufferDescriptor::BufferDescriptor(RGBDescriptor&& aOther) |
2110 | 0 | { |
2111 | 0 | new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor(std::move(aOther)); |
2112 | 0 | mType = TRGBDescriptor; |
2113 | 0 | } |
2114 | | |
2115 | | MOZ_IMPLICIT BufferDescriptor::BufferDescriptor(const YCbCrDescriptor& aOther) |
2116 | 0 | { |
2117 | 0 | new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor(aOther); |
2118 | 0 | mType = TYCbCrDescriptor; |
2119 | 0 | } |
2120 | | |
2121 | | MOZ_IMPLICIT BufferDescriptor::BufferDescriptor(YCbCrDescriptor&& aOther) |
2122 | 0 | { |
2123 | 0 | new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor(std::move(aOther)); |
2124 | 0 | mType = TYCbCrDescriptor; |
2125 | 0 | } |
2126 | | |
2127 | | MOZ_IMPLICIT BufferDescriptor::BufferDescriptor(const BufferDescriptor& aOther) |
2128 | 0 | { |
2129 | 0 | (aOther).AssertSanity(); |
2130 | 0 | switch ((aOther).type()) { |
2131 | 0 | case TRGBDescriptor: |
2132 | 0 | { |
2133 | 0 | new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor((aOther).get_RGBDescriptor()); |
2134 | 0 | break; |
2135 | 0 | } |
2136 | 0 | case TYCbCrDescriptor: |
2137 | 0 | { |
2138 | 0 | new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor((aOther).get_YCbCrDescriptor()); |
2139 | 0 | break; |
2140 | 0 | } |
2141 | 0 | case T__None: |
2142 | 0 | { |
2143 | 0 | break; |
2144 | 0 | } |
2145 | 0 | default: |
2146 | 0 | { |
2147 | 0 | mozilla::ipc::LogicError("unreached"); |
2148 | 0 | return; |
2149 | 0 | } |
2150 | 0 | } |
2151 | 0 | mType = (aOther).type(); |
2152 | 0 | } |
2153 | | |
2154 | | MOZ_IMPLICIT BufferDescriptor::BufferDescriptor(BufferDescriptor&& aOther) |
2155 | 0 | { |
2156 | 0 | (aOther).AssertSanity(); |
2157 | 0 | Type t = (aOther).type(); |
2158 | 0 | switch (t) { |
2159 | 0 | case TRGBDescriptor: |
2160 | 0 | { |
2161 | 0 | new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor(std::move((aOther).get_RGBDescriptor())); |
2162 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
2163 | 0 | break; |
2164 | 0 | } |
2165 | 0 | case TYCbCrDescriptor: |
2166 | 0 | { |
2167 | 0 | new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor(std::move((aOther).get_YCbCrDescriptor())); |
2168 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
2169 | 0 | break; |
2170 | 0 | } |
2171 | 0 | case T__None: |
2172 | 0 | { |
2173 | 0 | break; |
2174 | 0 | } |
2175 | 0 | default: |
2176 | 0 | { |
2177 | 0 | mozilla::ipc::LogicError("unreached"); |
2178 | 0 | return; |
2179 | 0 | } |
2180 | 0 | } |
2181 | 0 | (aOther).mType = T__None; |
2182 | 0 | mType = t; |
2183 | 0 | } |
2184 | | |
2185 | | BufferDescriptor::~BufferDescriptor() |
2186 | 0 | { |
2187 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
2188 | 0 | } |
2189 | | |
2190 | | auto BufferDescriptor::operator=(const RGBDescriptor& aRhs) -> BufferDescriptor& |
2191 | 0 | { |
2192 | 0 | if (MaybeDestroy(TRGBDescriptor)) { |
2193 | 0 | new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor; |
2194 | 0 | } |
2195 | 0 | (*(ptr_RGBDescriptor())) = aRhs; |
2196 | 0 | mType = TRGBDescriptor; |
2197 | 0 | return (*(this)); |
2198 | 0 | } |
2199 | | |
2200 | | auto BufferDescriptor::operator=(RGBDescriptor&& aRhs) -> BufferDescriptor& |
2201 | 0 | { |
2202 | 0 | if (MaybeDestroy(TRGBDescriptor)) { |
2203 | 0 | new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor; |
2204 | 0 | } |
2205 | 0 | (*(ptr_RGBDescriptor())) = std::move(aRhs); |
2206 | 0 | mType = TRGBDescriptor; |
2207 | 0 | return (*(this)); |
2208 | 0 | } |
2209 | | |
2210 | | auto BufferDescriptor::operator=(const YCbCrDescriptor& aRhs) -> BufferDescriptor& |
2211 | 0 | { |
2212 | 0 | if (MaybeDestroy(TYCbCrDescriptor)) { |
2213 | 0 | new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor; |
2214 | 0 | } |
2215 | 0 | (*(ptr_YCbCrDescriptor())) = aRhs; |
2216 | 0 | mType = TYCbCrDescriptor; |
2217 | 0 | return (*(this)); |
2218 | 0 | } |
2219 | | |
2220 | | auto BufferDescriptor::operator=(YCbCrDescriptor&& aRhs) -> BufferDescriptor& |
2221 | 0 | { |
2222 | 0 | if (MaybeDestroy(TYCbCrDescriptor)) { |
2223 | 0 | new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor; |
2224 | 0 | } |
2225 | 0 | (*(ptr_YCbCrDescriptor())) = std::move(aRhs); |
2226 | 0 | mType = TYCbCrDescriptor; |
2227 | 0 | return (*(this)); |
2228 | 0 | } |
2229 | | |
2230 | | auto BufferDescriptor::operator=(const BufferDescriptor& aRhs) -> BufferDescriptor& |
2231 | 0 | { |
2232 | 0 | (aRhs).AssertSanity(); |
2233 | 0 | Type t = (aRhs).type(); |
2234 | 0 | switch (t) { |
2235 | 0 | case TRGBDescriptor: |
2236 | 0 | { |
2237 | 0 | if (MaybeDestroy(t)) { |
2238 | 0 | new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor; |
2239 | 0 | } |
2240 | 0 | (*(ptr_RGBDescriptor())) = (aRhs).get_RGBDescriptor(); |
2241 | 0 | break; |
2242 | 0 | } |
2243 | 0 | case TYCbCrDescriptor: |
2244 | 0 | { |
2245 | 0 | if (MaybeDestroy(t)) { |
2246 | 0 | new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor; |
2247 | 0 | } |
2248 | 0 | (*(ptr_YCbCrDescriptor())) = (aRhs).get_YCbCrDescriptor(); |
2249 | 0 | break; |
2250 | 0 | } |
2251 | 0 | case T__None: |
2252 | 0 | { |
2253 | 0 | static_cast<void>(MaybeDestroy(t)); |
2254 | 0 | break; |
2255 | 0 | } |
2256 | 0 | default: |
2257 | 0 | { |
2258 | 0 | mozilla::ipc::LogicError("unreached"); |
2259 | 0 | break; |
2260 | 0 | } |
2261 | 0 | } |
2262 | 0 | mType = t; |
2263 | 0 | return (*(this)); |
2264 | 0 | } |
2265 | | |
2266 | | auto BufferDescriptor::operator=(BufferDescriptor&& aRhs) -> BufferDescriptor& |
2267 | 0 | { |
2268 | 0 | (aRhs).AssertSanity(); |
2269 | 0 | Type t = (aRhs).type(); |
2270 | 0 | switch (t) { |
2271 | 0 | case TRGBDescriptor: |
2272 | 0 | { |
2273 | 0 | if (MaybeDestroy(t)) { |
2274 | 0 | new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor; |
2275 | 0 | } |
2276 | 0 | (*(ptr_RGBDescriptor())) = std::move((aRhs).get_RGBDescriptor()); |
2277 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
2278 | 0 | break; |
2279 | 0 | } |
2280 | 0 | case TYCbCrDescriptor: |
2281 | 0 | { |
2282 | 0 | if (MaybeDestroy(t)) { |
2283 | 0 | new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor; |
2284 | 0 | } |
2285 | 0 | (*(ptr_YCbCrDescriptor())) = std::move((aRhs).get_YCbCrDescriptor()); |
2286 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
2287 | 0 | break; |
2288 | 0 | } |
2289 | 0 | case T__None: |
2290 | 0 | { |
2291 | 0 | static_cast<void>(MaybeDestroy(t)); |
2292 | 0 | break; |
2293 | 0 | } |
2294 | 0 | default: |
2295 | 0 | { |
2296 | 0 | mozilla::ipc::LogicError("unreached"); |
2297 | 0 | break; |
2298 | 0 | } |
2299 | 0 | } |
2300 | 0 | (aRhs).mType = T__None; |
2301 | 0 | mType = t; |
2302 | 0 | return (*(this)); |
2303 | 0 | } |
2304 | | |
2305 | | auto BufferDescriptor::operator==(const RGBDescriptor& aRhs) const -> bool |
2306 | 0 | { |
2307 | 0 | return (get_RGBDescriptor()) == (aRhs); |
2308 | 0 | } |
2309 | | |
2310 | | auto BufferDescriptor::operator==(const YCbCrDescriptor& aRhs) const -> bool |
2311 | 0 | { |
2312 | 0 | return (get_YCbCrDescriptor()) == (aRhs); |
2313 | 0 | } |
2314 | | |
2315 | | auto BufferDescriptor::operator==(const BufferDescriptor& aRhs) const -> bool |
2316 | 0 | { |
2317 | 0 | if ((type()) != ((aRhs).type())) { |
2318 | 0 | return false; |
2319 | 0 | } |
2320 | 0 | |
2321 | 0 | switch (type()) { |
2322 | 0 | case TRGBDescriptor: |
2323 | 0 | { |
2324 | 0 | return (get_RGBDescriptor()) == ((aRhs).get_RGBDescriptor()); |
2325 | 0 | } |
2326 | 0 | case TYCbCrDescriptor: |
2327 | 0 | { |
2328 | 0 | return (get_YCbCrDescriptor()) == ((aRhs).get_YCbCrDescriptor()); |
2329 | 0 | } |
2330 | 0 | default: |
2331 | 0 | { |
2332 | 0 | mozilla::ipc::LogicError("unreached"); |
2333 | 0 | return false; |
2334 | 0 | } |
2335 | 0 | } |
2336 | 0 | } |
2337 | | |
2338 | | auto BufferDescriptor::get(RGBDescriptor* aOutValue) const -> void |
2339 | 0 | { |
2340 | 0 | (*(aOutValue)) = get_RGBDescriptor(); |
2341 | 0 | } |
2342 | | |
2343 | | auto BufferDescriptor::get(YCbCrDescriptor* aOutValue) const -> void |
2344 | 0 | { |
2345 | 0 | (*(aOutValue)) = get_YCbCrDescriptor(); |
2346 | 0 | } |
2347 | | |
2348 | | } // namespace layers |
2349 | | } // namespace mozilla |
2350 | | |
2351 | | namespace mozilla { |
2352 | | namespace ipc { |
2353 | | auto IPDLParamTraits<mozilla::layers::BufferDescriptor>::Write( |
2354 | | IPC::Message* aMsg, |
2355 | | mozilla::ipc::IProtocol* aActor, |
2356 | | const paramType& aVar) -> void |
2357 | | { |
2358 | | typedef mozilla::layers::BufferDescriptor union__; |
2359 | | int type; |
2360 | | type = (aVar).type(); |
2361 | | WriteIPDLParam(aMsg, aActor, type); |
2362 | | // Sentinel = 'BufferDescriptor' |
2363 | | (aMsg)->WriteSentinel(764535685); |
2364 | | |
2365 | | switch (type) { |
2366 | | case union__::TRGBDescriptor: |
2367 | | { |
2368 | | WriteIPDLParam(aMsg, aActor, (aVar).get_RGBDescriptor()); |
2369 | | // Sentinel = 'TRGBDescriptor' |
2370 | | (aMsg)->WriteSentinel(2888062100); |
2371 | | return; |
2372 | | } |
2373 | | case union__::TYCbCrDescriptor: |
2374 | | { |
2375 | | WriteIPDLParam(aMsg, aActor, (aVar).get_YCbCrDescriptor()); |
2376 | | // Sentinel = 'TYCbCrDescriptor' |
2377 | | (aMsg)->WriteSentinel(3533945878); |
2378 | | return; |
2379 | | } |
2380 | | default: |
2381 | | { |
2382 | | (aActor)->FatalError("unknown union type"); |
2383 | | return; |
2384 | | } |
2385 | | } |
2386 | | } |
2387 | | |
2388 | | auto IPDLParamTraits<mozilla::layers::BufferDescriptor>::Read( |
2389 | | const IPC::Message* aMsg, |
2390 | | PickleIterator* aIter, |
2391 | | mozilla::ipc::IProtocol* aActor, |
2392 | | paramType* aVar) -> bool |
2393 | 0 | { |
2394 | 0 | typedef mozilla::layers::BufferDescriptor union__; |
2395 | 0 | int type; |
2396 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) { |
2397 | 0 | (aActor)->FatalError("Error deserializing type of union BufferDescriptor"); |
2398 | 0 | return false; |
2399 | 0 | } |
2400 | 0 | // Sentinel = 'BufferDescriptor' |
2401 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 764535685)))) { |
2402 | 0 | mozilla::ipc::SentinelReadError("Error deserializing type of union BufferDescriptor"); |
2403 | 0 | return false; |
2404 | 0 | } |
2405 | 0 | |
2406 | 0 | switch (type) { |
2407 | 0 | case union__::TRGBDescriptor: |
2408 | 0 | { |
2409 | 0 | mozilla::layers::RGBDescriptor tmp = mozilla::layers::RGBDescriptor(); |
2410 | 0 | (*(aVar)) = tmp; |
2411 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_RGBDescriptor())))))) { |
2412 | 0 | (aActor)->FatalError("Error deserializing variant TRGBDescriptor of union BufferDescriptor"); |
2413 | 0 | return false; |
2414 | 0 | } |
2415 | 0 | // Sentinel = 'TRGBDescriptor' |
2416 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2888062100)))) { |
2417 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TRGBDescriptor of union BufferDescriptor"); |
2418 | 0 | return false; |
2419 | 0 | } |
2420 | 0 | return true; |
2421 | 0 | } |
2422 | 0 | case union__::TYCbCrDescriptor: |
2423 | 0 | { |
2424 | 0 | mozilla::layers::YCbCrDescriptor tmp = mozilla::layers::YCbCrDescriptor(); |
2425 | 0 | (*(aVar)) = tmp; |
2426 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_YCbCrDescriptor())))))) { |
2427 | 0 | (aActor)->FatalError("Error deserializing variant TYCbCrDescriptor of union BufferDescriptor"); |
2428 | 0 | return false; |
2429 | 0 | } |
2430 | 0 | // Sentinel = 'TYCbCrDescriptor' |
2431 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3533945878)))) { |
2432 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TYCbCrDescriptor of union BufferDescriptor"); |
2433 | 0 | return false; |
2434 | 0 | } |
2435 | 0 | return true; |
2436 | 0 | } |
2437 | 0 | default: |
2438 | 0 | { |
2439 | 0 | (aActor)->FatalError("unknown union type"); |
2440 | 0 | return false; |
2441 | 0 | } |
2442 | 0 | } |
2443 | 0 | } |
2444 | | |
2445 | | } // namespace ipc |
2446 | | } // namespace mozilla |
2447 | | |
2448 | | //----------------------------------------------------------------------------- |
2449 | | // Method definitions for the IPDL type |union MemoryOrShmem| |
2450 | | // |
2451 | | namespace mozilla { |
2452 | | namespace layers { |
2453 | | auto MemoryOrShmem::MaybeDestroy(Type aNewType) -> bool |
2454 | 0 | { |
2455 | 0 | if ((mType) == (T__None)) { |
2456 | 0 | return true; |
2457 | 0 | } |
2458 | 0 | if ((mType) == (aNewType)) { |
2459 | 0 | return false; |
2460 | 0 | } |
2461 | 0 | switch (mType) { |
2462 | 0 | case Tuintptr_t: |
2463 | 0 | { |
2464 | 0 | (ptr_uintptr_t())->~uintptr_t__tdef(); |
2465 | 0 | break; |
2466 | 0 | } |
2467 | 0 | case TShmem: |
2468 | 0 | { |
2469 | 0 | (ptr_Shmem())->~Shmem__tdef(); |
2470 | 0 | break; |
2471 | 0 | } |
2472 | 0 | default: |
2473 | 0 | { |
2474 | 0 | mozilla::ipc::LogicError("not reached"); |
2475 | 0 | break; |
2476 | 0 | } |
2477 | 0 | } |
2478 | 0 | return true; |
2479 | 0 | } |
2480 | | |
2481 | | MOZ_IMPLICIT MemoryOrShmem::MemoryOrShmem(const uintptr_t& aOther) |
2482 | 0 | { |
2483 | 0 | new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t(aOther); |
2484 | 0 | mType = Tuintptr_t; |
2485 | 0 | } |
2486 | | |
2487 | | MOZ_IMPLICIT MemoryOrShmem::MemoryOrShmem(uintptr_t&& aOther) |
2488 | 0 | { |
2489 | 0 | new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t(std::move(aOther)); |
2490 | 0 | mType = Tuintptr_t; |
2491 | 0 | } |
2492 | | |
2493 | | MOZ_IMPLICIT MemoryOrShmem::MemoryOrShmem(Shmem& aOther) |
2494 | 0 | { |
2495 | 0 | new (mozilla::KnownNotNull, ptr_Shmem()) Shmem(aOther); |
2496 | 0 | mType = TShmem; |
2497 | 0 | } |
2498 | | |
2499 | | MOZ_IMPLICIT MemoryOrShmem::MemoryOrShmem(Shmem&& aOther) |
2500 | 0 | { |
2501 | 0 | new (mozilla::KnownNotNull, ptr_Shmem()) Shmem(std::move(aOther)); |
2502 | 0 | mType = TShmem; |
2503 | 0 | } |
2504 | | |
2505 | | MOZ_IMPLICIT MemoryOrShmem::MemoryOrShmem(const MemoryOrShmem& aOther) |
2506 | 0 | { |
2507 | 0 | (aOther).AssertSanity(); |
2508 | 0 | switch ((aOther).type()) { |
2509 | 0 | case Tuintptr_t: |
2510 | 0 | { |
2511 | 0 | new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t((aOther).get_uintptr_t()); |
2512 | 0 | break; |
2513 | 0 | } |
2514 | 0 | case TShmem: |
2515 | 0 | { |
2516 | 0 | new (mozilla::KnownNotNull, ptr_Shmem()) Shmem((aOther).get_Shmem()); |
2517 | 0 | break; |
2518 | 0 | } |
2519 | 0 | case T__None: |
2520 | 0 | { |
2521 | 0 | break; |
2522 | 0 | } |
2523 | 0 | default: |
2524 | 0 | { |
2525 | 0 | mozilla::ipc::LogicError("unreached"); |
2526 | 0 | return; |
2527 | 0 | } |
2528 | 0 | } |
2529 | 0 | mType = (aOther).type(); |
2530 | 0 | } |
2531 | | |
2532 | | MOZ_IMPLICIT MemoryOrShmem::MemoryOrShmem(MemoryOrShmem&& aOther) |
2533 | 0 | { |
2534 | 0 | (aOther).AssertSanity(); |
2535 | 0 | Type t = (aOther).type(); |
2536 | 0 | switch (t) { |
2537 | 0 | case Tuintptr_t: |
2538 | 0 | { |
2539 | 0 | new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t(std::move((aOther).get_uintptr_t())); |
2540 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
2541 | 0 | break; |
2542 | 0 | } |
2543 | 0 | case TShmem: |
2544 | 0 | { |
2545 | 0 | new (mozilla::KnownNotNull, ptr_Shmem()) Shmem(std::move((aOther).get_Shmem())); |
2546 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
2547 | 0 | break; |
2548 | 0 | } |
2549 | 0 | case T__None: |
2550 | 0 | { |
2551 | 0 | break; |
2552 | 0 | } |
2553 | 0 | default: |
2554 | 0 | { |
2555 | 0 | mozilla::ipc::LogicError("unreached"); |
2556 | 0 | return; |
2557 | 0 | } |
2558 | 0 | } |
2559 | 0 | (aOther).mType = T__None; |
2560 | 0 | mType = t; |
2561 | 0 | } |
2562 | | |
2563 | | MemoryOrShmem::~MemoryOrShmem() |
2564 | 0 | { |
2565 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
2566 | 0 | } |
2567 | | |
2568 | | auto MemoryOrShmem::operator=(const uintptr_t& aRhs) -> MemoryOrShmem& |
2569 | 0 | { |
2570 | 0 | if (MaybeDestroy(Tuintptr_t)) { |
2571 | 0 | new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t; |
2572 | 0 | } |
2573 | 0 | (*(ptr_uintptr_t())) = aRhs; |
2574 | 0 | mType = Tuintptr_t; |
2575 | 0 | return (*(this)); |
2576 | 0 | } |
2577 | | |
2578 | | auto MemoryOrShmem::operator=(uintptr_t&& aRhs) -> MemoryOrShmem& |
2579 | 0 | { |
2580 | 0 | if (MaybeDestroy(Tuintptr_t)) { |
2581 | 0 | new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t; |
2582 | 0 | } |
2583 | 0 | (*(ptr_uintptr_t())) = std::move(aRhs); |
2584 | 0 | mType = Tuintptr_t; |
2585 | 0 | return (*(this)); |
2586 | 0 | } |
2587 | | |
2588 | | auto MemoryOrShmem::operator=(Shmem& aRhs) -> MemoryOrShmem& |
2589 | 0 | { |
2590 | 0 | if (MaybeDestroy(TShmem)) { |
2591 | 0 | new (mozilla::KnownNotNull, ptr_Shmem()) Shmem; |
2592 | 0 | } |
2593 | 0 | (*(ptr_Shmem())) = aRhs; |
2594 | 0 | mType = TShmem; |
2595 | 0 | return (*(this)); |
2596 | 0 | } |
2597 | | |
2598 | | auto MemoryOrShmem::operator=(Shmem&& aRhs) -> MemoryOrShmem& |
2599 | 0 | { |
2600 | 0 | if (MaybeDestroy(TShmem)) { |
2601 | 0 | new (mozilla::KnownNotNull, ptr_Shmem()) Shmem; |
2602 | 0 | } |
2603 | 0 | (*(ptr_Shmem())) = std::move(aRhs); |
2604 | 0 | mType = TShmem; |
2605 | 0 | return (*(this)); |
2606 | 0 | } |
2607 | | |
2608 | | auto MemoryOrShmem::operator=(const MemoryOrShmem& aRhs) -> MemoryOrShmem& |
2609 | 0 | { |
2610 | 0 | (aRhs).AssertSanity(); |
2611 | 0 | Type t = (aRhs).type(); |
2612 | 0 | switch (t) { |
2613 | 0 | case Tuintptr_t: |
2614 | 0 | { |
2615 | 0 | if (MaybeDestroy(t)) { |
2616 | 0 | new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t; |
2617 | 0 | } |
2618 | 0 | (*(ptr_uintptr_t())) = (aRhs).get_uintptr_t(); |
2619 | 0 | break; |
2620 | 0 | } |
2621 | 0 | case TShmem: |
2622 | 0 | { |
2623 | 0 | if (MaybeDestroy(t)) { |
2624 | 0 | new (mozilla::KnownNotNull, ptr_Shmem()) Shmem; |
2625 | 0 | } |
2626 | 0 | (*(ptr_Shmem())) = (aRhs).get_Shmem(); |
2627 | 0 | break; |
2628 | 0 | } |
2629 | 0 | case T__None: |
2630 | 0 | { |
2631 | 0 | static_cast<void>(MaybeDestroy(t)); |
2632 | 0 | break; |
2633 | 0 | } |
2634 | 0 | default: |
2635 | 0 | { |
2636 | 0 | mozilla::ipc::LogicError("unreached"); |
2637 | 0 | break; |
2638 | 0 | } |
2639 | 0 | } |
2640 | 0 | mType = t; |
2641 | 0 | return (*(this)); |
2642 | 0 | } |
2643 | | |
2644 | | auto MemoryOrShmem::operator=(MemoryOrShmem&& aRhs) -> MemoryOrShmem& |
2645 | 0 | { |
2646 | 0 | (aRhs).AssertSanity(); |
2647 | 0 | Type t = (aRhs).type(); |
2648 | 0 | switch (t) { |
2649 | 0 | case Tuintptr_t: |
2650 | 0 | { |
2651 | 0 | if (MaybeDestroy(t)) { |
2652 | 0 | new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t; |
2653 | 0 | } |
2654 | 0 | (*(ptr_uintptr_t())) = std::move((aRhs).get_uintptr_t()); |
2655 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
2656 | 0 | break; |
2657 | 0 | } |
2658 | 0 | case TShmem: |
2659 | 0 | { |
2660 | 0 | if (MaybeDestroy(t)) { |
2661 | 0 | new (mozilla::KnownNotNull, ptr_Shmem()) Shmem; |
2662 | 0 | } |
2663 | 0 | (*(ptr_Shmem())) = std::move((aRhs).get_Shmem()); |
2664 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
2665 | 0 | break; |
2666 | 0 | } |
2667 | 0 | case T__None: |
2668 | 0 | { |
2669 | 0 | static_cast<void>(MaybeDestroy(t)); |
2670 | 0 | break; |
2671 | 0 | } |
2672 | 0 | default: |
2673 | 0 | { |
2674 | 0 | mozilla::ipc::LogicError("unreached"); |
2675 | 0 | break; |
2676 | 0 | } |
2677 | 0 | } |
2678 | 0 | (aRhs).mType = T__None; |
2679 | 0 | mType = t; |
2680 | 0 | return (*(this)); |
2681 | 0 | } |
2682 | | |
2683 | | auto MemoryOrShmem::operator==(const uintptr_t& aRhs) const -> bool |
2684 | 0 | { |
2685 | 0 | return (get_uintptr_t()) == (aRhs); |
2686 | 0 | } |
2687 | | |
2688 | | auto MemoryOrShmem::operator==(Shmem& aRhs) const -> bool |
2689 | 0 | { |
2690 | 0 | return (get_Shmem()) == (aRhs); |
2691 | 0 | } |
2692 | | |
2693 | | auto MemoryOrShmem::operator==(const MemoryOrShmem& aRhs) const -> bool |
2694 | 0 | { |
2695 | 0 | if ((type()) != ((aRhs).type())) { |
2696 | 0 | return false; |
2697 | 0 | } |
2698 | 0 | |
2699 | 0 | switch (type()) { |
2700 | 0 | case Tuintptr_t: |
2701 | 0 | { |
2702 | 0 | return (get_uintptr_t()) == ((aRhs).get_uintptr_t()); |
2703 | 0 | } |
2704 | 0 | case TShmem: |
2705 | 0 | { |
2706 | 0 | return (get_Shmem()) == ((aRhs).get_Shmem()); |
2707 | 0 | } |
2708 | 0 | default: |
2709 | 0 | { |
2710 | 0 | mozilla::ipc::LogicError("unreached"); |
2711 | 0 | return false; |
2712 | 0 | } |
2713 | 0 | } |
2714 | 0 | } |
2715 | | |
2716 | | auto MemoryOrShmem::get(uintptr_t* aOutValue) const -> void |
2717 | 0 | { |
2718 | 0 | (*(aOutValue)) = get_uintptr_t(); |
2719 | 0 | } |
2720 | | |
2721 | | auto MemoryOrShmem::get(Shmem* aOutValue) const -> void |
2722 | 0 | { |
2723 | 0 | (*(aOutValue)) = get_Shmem(); |
2724 | 0 | } |
2725 | | |
2726 | | } // namespace layers |
2727 | | } // namespace mozilla |
2728 | | |
2729 | | namespace mozilla { |
2730 | | namespace ipc { |
2731 | | auto IPDLParamTraits<mozilla::layers::MemoryOrShmem>::Write( |
2732 | | IPC::Message* aMsg, |
2733 | | mozilla::ipc::IProtocol* aActor, |
2734 | | const paramType& aVar) -> void |
2735 | | { |
2736 | | typedef mozilla::layers::MemoryOrShmem union__; |
2737 | | int type; |
2738 | | type = (aVar).type(); |
2739 | | WriteIPDLParam(aMsg, aActor, type); |
2740 | | // Sentinel = 'MemoryOrShmem' |
2741 | | (aMsg)->WriteSentinel(3227621763); |
2742 | | |
2743 | | switch (type) { |
2744 | | case union__::Tuintptr_t: |
2745 | | { |
2746 | | WriteIPDLParam(aMsg, aActor, (aVar).get_uintptr_t()); |
2747 | | // Sentinel = 'Tuintptr_t' |
2748 | | (aMsg)->WriteSentinel(3218141805); |
2749 | | return; |
2750 | | } |
2751 | | case union__::TShmem: |
2752 | | { |
2753 | | WriteIPDLParam(aMsg, aActor, (aVar).get_Shmem()); |
2754 | | // Sentinel = 'TShmem' |
2755 | | (aMsg)->WriteSentinel(3517971266); |
2756 | | return; |
2757 | | } |
2758 | | default: |
2759 | | { |
2760 | | (aActor)->FatalError("unknown union type"); |
2761 | | return; |
2762 | | } |
2763 | | } |
2764 | | } |
2765 | | |
2766 | | auto IPDLParamTraits<mozilla::layers::MemoryOrShmem>::Read( |
2767 | | const IPC::Message* aMsg, |
2768 | | PickleIterator* aIter, |
2769 | | mozilla::ipc::IProtocol* aActor, |
2770 | | paramType* aVar) -> bool |
2771 | 0 | { |
2772 | 0 | typedef mozilla::layers::MemoryOrShmem union__; |
2773 | 0 | int type; |
2774 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) { |
2775 | 0 | (aActor)->FatalError("Error deserializing type of union MemoryOrShmem"); |
2776 | 0 | return false; |
2777 | 0 | } |
2778 | 0 | // Sentinel = 'MemoryOrShmem' |
2779 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3227621763)))) { |
2780 | 0 | mozilla::ipc::SentinelReadError("Error deserializing type of union MemoryOrShmem"); |
2781 | 0 | return false; |
2782 | 0 | } |
2783 | 0 | |
2784 | 0 | switch (type) { |
2785 | 0 | case union__::Tuintptr_t: |
2786 | 0 | { |
2787 | 0 | uintptr_t tmp = uintptr_t(); |
2788 | 0 | (*(aVar)) = tmp; |
2789 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_uintptr_t())))))) { |
2790 | 0 | (aActor)->FatalError("Error deserializing variant Tuintptr_t of union MemoryOrShmem"); |
2791 | 0 | return false; |
2792 | 0 | } |
2793 | 0 | // Sentinel = 'Tuintptr_t' |
2794 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3218141805)))) { |
2795 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant Tuintptr_t of union MemoryOrShmem"); |
2796 | 0 | return false; |
2797 | 0 | } |
2798 | 0 | return true; |
2799 | 0 | } |
2800 | 0 | case union__::TShmem: |
2801 | 0 | { |
2802 | 0 | mozilla::ipc::Shmem tmp = mozilla::ipc::Shmem(); |
2803 | 0 | (*(aVar)) = tmp; |
2804 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_Shmem())))))) { |
2805 | 0 | (aActor)->FatalError("Error deserializing variant TShmem of union MemoryOrShmem"); |
2806 | 0 | return false; |
2807 | 0 | } |
2808 | 0 | // Sentinel = 'TShmem' |
2809 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3517971266)))) { |
2810 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TShmem of union MemoryOrShmem"); |
2811 | 0 | return false; |
2812 | 0 | } |
2813 | 0 | return true; |
2814 | 0 | } |
2815 | 0 | default: |
2816 | 0 | { |
2817 | 0 | (aActor)->FatalError("unknown union type"); |
2818 | 0 | return false; |
2819 | 0 | } |
2820 | 0 | } |
2821 | 0 | } |
2822 | | |
2823 | | } // namespace ipc |
2824 | | } // namespace mozilla |
2825 | | |
2826 | | //----------------------------------------------------------------------------- |
2827 | | // Method definitions for the IPDL type |struct SurfaceDescriptorBuffer| |
2828 | | // |
2829 | | namespace mozilla { |
2830 | | namespace layers { |
2831 | | auto SurfaceDescriptorBuffer::operator==(const SurfaceDescriptorBuffer& _o) const -> bool |
2832 | 0 | { |
2833 | 0 | if ((!((desc()) == ((_o).desc())))) { |
2834 | 0 | return false; |
2835 | 0 | } |
2836 | 0 | if ((!((data()) == ((_o).data())))) { |
2837 | 0 | return false; |
2838 | 0 | } |
2839 | 0 | return true; |
2840 | 0 | } |
2841 | | |
2842 | | auto SurfaceDescriptorBuffer::operator!=(const SurfaceDescriptorBuffer& _o) const -> bool |
2843 | 0 | { |
2844 | 0 | return (!(operator==(_o))); |
2845 | 0 | } |
2846 | | |
2847 | | } // namespace layers |
2848 | | } // namespace mozilla |
2849 | | |
2850 | | namespace mozilla { |
2851 | | namespace ipc { |
2852 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorBuffer>::Write( |
2853 | | IPC::Message* aMsg, |
2854 | | mozilla::ipc::IProtocol* aActor, |
2855 | | const paramType& aVar) -> void |
2856 | 0 | { |
2857 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).desc()); |
2858 | 0 | // Sentinel = 'desc' |
2859 | 0 | (aMsg)->WriteSentinel(3761872479); |
2860 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).data()); |
2861 | 0 | // Sentinel = 'data' |
2862 | 0 | (aMsg)->WriteSentinel(843352540); |
2863 | 0 | } |
2864 | | |
2865 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorBuffer>::Read( |
2866 | | const IPC::Message* aMsg, |
2867 | | PickleIterator* aIter, |
2868 | | mozilla::ipc::IProtocol* aActor, |
2869 | | paramType* aVar) -> bool |
2870 | 0 | { |
2871 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->desc())))))) { |
2872 | 0 | (aActor)->FatalError("Error deserializing 'desc' (BufferDescriptor) member of 'SurfaceDescriptorBuffer'"); |
2873 | 0 | return false; |
2874 | 0 | } |
2875 | 0 | // Sentinel = 'desc' |
2876 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3761872479)))) { |
2877 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'desc' (BufferDescriptor) member of 'SurfaceDescriptorBuffer'"); |
2878 | 0 | return false; |
2879 | 0 | } |
2880 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->data())))))) { |
2881 | 0 | (aActor)->FatalError("Error deserializing 'data' (MemoryOrShmem) member of 'SurfaceDescriptorBuffer'"); |
2882 | 0 | return false; |
2883 | 0 | } |
2884 | 0 | // Sentinel = 'data' |
2885 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 843352540)))) { |
2886 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'data' (MemoryOrShmem) member of 'SurfaceDescriptorBuffer'"); |
2887 | 0 | return false; |
2888 | 0 | } |
2889 | 0 | return true; |
2890 | 0 | } |
2891 | | |
2892 | | } // namespace ipc |
2893 | | } // namespace mozilla |
2894 | | |
2895 | | //----------------------------------------------------------------------------- |
2896 | | // Method definitions for the IPDL type |struct SurfaceDescriptorShared| |
2897 | | // |
2898 | | namespace mozilla { |
2899 | | namespace layers { |
2900 | | auto SurfaceDescriptorShared::operator==(const SurfaceDescriptorShared& _o) const -> bool |
2901 | 0 | { |
2902 | 0 | if ((!((size()) == ((_o).size())))) { |
2903 | 0 | return false; |
2904 | 0 | } |
2905 | 0 | if ((!((stride()) == ((_o).stride())))) { |
2906 | 0 | return false; |
2907 | 0 | } |
2908 | 0 | if ((!((format()) == ((_o).format())))) { |
2909 | 0 | return false; |
2910 | 0 | } |
2911 | 0 | if ((!((handle()) == ((_o).handle())))) { |
2912 | 0 | return false; |
2913 | 0 | } |
2914 | 0 | return true; |
2915 | 0 | } |
2916 | | |
2917 | | auto SurfaceDescriptorShared::operator!=(const SurfaceDescriptorShared& _o) const -> bool |
2918 | 0 | { |
2919 | 0 | return (!(operator==(_o))); |
2920 | 0 | } |
2921 | | |
2922 | | } // namespace layers |
2923 | | } // namespace mozilla |
2924 | | |
2925 | | namespace mozilla { |
2926 | | namespace ipc { |
2927 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorShared>::Write( |
2928 | | IPC::Message* aMsg, |
2929 | | mozilla::ipc::IProtocol* aActor, |
2930 | | const paramType& aVar) -> void |
2931 | 0 | { |
2932 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).size()); |
2933 | 0 | // Sentinel = 'size' |
2934 | 0 | (aMsg)->WriteSentinel(931048223); |
2935 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).stride()); |
2936 | 0 | // Sentinel = 'stride' |
2937 | 0 | (aMsg)->WriteSentinel(2746301169); |
2938 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).format()); |
2939 | 0 | // Sentinel = 'format' |
2940 | 0 | (aMsg)->WriteSentinel(2052265543); |
2941 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).handle()); |
2942 | 0 | // Sentinel = 'handle' |
2943 | 0 | (aMsg)->WriteSentinel(453975108); |
2944 | 0 | } |
2945 | | |
2946 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptorShared>::Read( |
2947 | | const IPC::Message* aMsg, |
2948 | | PickleIterator* aIter, |
2949 | | mozilla::ipc::IProtocol* aActor, |
2950 | | paramType* aVar) -> bool |
2951 | 0 | { |
2952 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->size())))))) { |
2953 | 0 | (aActor)->FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorShared'"); |
2954 | 0 | return false; |
2955 | 0 | } |
2956 | 0 | // Sentinel = 'size' |
2957 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 931048223)))) { |
2958 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorShared'"); |
2959 | 0 | return false; |
2960 | 0 | } |
2961 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->stride())))))) { |
2962 | 0 | (aActor)->FatalError("Error deserializing 'stride' (int32_t) member of 'SurfaceDescriptorShared'"); |
2963 | 0 | return false; |
2964 | 0 | } |
2965 | 0 | // Sentinel = 'stride' |
2966 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2746301169)))) { |
2967 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'stride' (int32_t) member of 'SurfaceDescriptorShared'"); |
2968 | 0 | return false; |
2969 | 0 | } |
2970 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->format())))))) { |
2971 | 0 | (aActor)->FatalError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorShared'"); |
2972 | 0 | return false; |
2973 | 0 | } |
2974 | 0 | // Sentinel = 'format' |
2975 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2052265543)))) { |
2976 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorShared'"); |
2977 | 0 | return false; |
2978 | 0 | } |
2979 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->handle())))))) { |
2980 | 0 | (aActor)->FatalError("Error deserializing 'handle' (Handle) member of 'SurfaceDescriptorShared'"); |
2981 | 0 | return false; |
2982 | 0 | } |
2983 | 0 | // Sentinel = 'handle' |
2984 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 453975108)))) { |
2985 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'handle' (Handle) member of 'SurfaceDescriptorShared'"); |
2986 | 0 | return false; |
2987 | 0 | } |
2988 | 0 | return true; |
2989 | 0 | } |
2990 | | |
2991 | | } // namespace ipc |
2992 | | } // namespace mozilla |
2993 | | |
2994 | | //----------------------------------------------------------------------------- |
2995 | | // Method definitions for the IPDL type |union SurfaceDescriptor| |
2996 | | // |
2997 | | namespace mozilla { |
2998 | | namespace layers { |
2999 | | auto SurfaceDescriptor::MaybeDestroy(Type aNewType) -> bool |
3000 | 0 | { |
3001 | 0 | if ((mType) == (T__None)) { |
3002 | 0 | return true; |
3003 | 0 | } |
3004 | 0 | if ((mType) == (aNewType)) { |
3005 | 0 | return false; |
3006 | 0 | } |
3007 | 0 | switch (mType) { |
3008 | 0 | case TSurfaceDescriptorBuffer: |
3009 | 0 | { |
3010 | 0 | (ptr_SurfaceDescriptorBuffer())->~SurfaceDescriptorBuffer__tdef(); |
3011 | 0 | break; |
3012 | 0 | } |
3013 | 0 | case TSurfaceDescriptorDIB: |
3014 | 0 | { |
3015 | 0 | (ptr_SurfaceDescriptorDIB())->~SurfaceDescriptorDIB__tdef(); |
3016 | 0 | break; |
3017 | 0 | } |
3018 | 0 | case TSurfaceDescriptorD3D10: |
3019 | 0 | { |
3020 | 0 | (ptr_SurfaceDescriptorD3D10())->~SurfaceDescriptorD3D10__tdef(); |
3021 | 0 | break; |
3022 | 0 | } |
3023 | 0 | case TSurfaceDescriptorFileMapping: |
3024 | 0 | { |
3025 | 0 | (ptr_SurfaceDescriptorFileMapping())->~SurfaceDescriptorFileMapping__tdef(); |
3026 | 0 | break; |
3027 | 0 | } |
3028 | 0 | case TSurfaceDescriptorDXGIYCbCr: |
3029 | 0 | { |
3030 | 0 | (ptr_SurfaceDescriptorDXGIYCbCr())->~SurfaceDescriptorDXGIYCbCr__tdef(); |
3031 | 0 | break; |
3032 | 0 | } |
3033 | 0 | case TSurfaceDescriptorX11: |
3034 | 0 | { |
3035 | 0 | (ptr_SurfaceDescriptorX11())->~SurfaceDescriptorX11__tdef(); |
3036 | 0 | break; |
3037 | 0 | } |
3038 | 0 | case TSurfaceTextureDescriptor: |
3039 | 0 | { |
3040 | 0 | (ptr_SurfaceTextureDescriptor())->~SurfaceTextureDescriptor__tdef(); |
3041 | 0 | break; |
3042 | 0 | } |
3043 | 0 | case TEGLImageDescriptor: |
3044 | 0 | { |
3045 | 0 | (ptr_EGLImageDescriptor())->~EGLImageDescriptor__tdef(); |
3046 | 0 | break; |
3047 | 0 | } |
3048 | 0 | case TSurfaceDescriptorMacIOSurface: |
3049 | 0 | { |
3050 | 0 | (ptr_SurfaceDescriptorMacIOSurface())->~SurfaceDescriptorMacIOSurface__tdef(); |
3051 | 0 | break; |
3052 | 0 | } |
3053 | 0 | case TSurfaceDescriptorSharedGLTexture: |
3054 | 0 | { |
3055 | 0 | (ptr_SurfaceDescriptorSharedGLTexture())->~SurfaceDescriptorSharedGLTexture__tdef(); |
3056 | 0 | break; |
3057 | 0 | } |
3058 | 0 | case TSurfaceDescriptorGPUVideo: |
3059 | 0 | { |
3060 | 0 | (ptr_SurfaceDescriptorGPUVideo())->~SurfaceDescriptorGPUVideo__tdef(); |
3061 | 0 | break; |
3062 | 0 | } |
3063 | 0 | case Tnull_t: |
3064 | 0 | { |
3065 | 0 | (ptr_null_t())->~null_t__tdef(); |
3066 | 0 | break; |
3067 | 0 | } |
3068 | 0 | default: |
3069 | 0 | { |
3070 | 0 | mozilla::ipc::LogicError("not reached"); |
3071 | 0 | break; |
3072 | 0 | } |
3073 | 0 | } |
3074 | 0 | return true; |
3075 | 0 | } |
3076 | | |
3077 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorBuffer& aOther) |
3078 | 0 | { |
3079 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer(aOther); |
3080 | 0 | mType = TSurfaceDescriptorBuffer; |
3081 | 0 | } |
3082 | | |
3083 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorBuffer&& aOther) |
3084 | 0 | { |
3085 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer(std::move(aOther)); |
3086 | 0 | mType = TSurfaceDescriptorBuffer; |
3087 | 0 | } |
3088 | | |
3089 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorDIB& aOther) |
3090 | 0 | { |
3091 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDIB()) SurfaceDescriptorDIB(aOther); |
3092 | 0 | mType = TSurfaceDescriptorDIB; |
3093 | 0 | } |
3094 | | |
3095 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorDIB&& aOther) |
3096 | 0 | { |
3097 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDIB()) SurfaceDescriptorDIB(std::move(aOther)); |
3098 | 0 | mType = TSurfaceDescriptorDIB; |
3099 | 0 | } |
3100 | | |
3101 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorD3D10& aOther) |
3102 | 0 | { |
3103 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10(aOther); |
3104 | 0 | mType = TSurfaceDescriptorD3D10; |
3105 | 0 | } |
3106 | | |
3107 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorD3D10&& aOther) |
3108 | 0 | { |
3109 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10(std::move(aOther)); |
3110 | 0 | mType = TSurfaceDescriptorD3D10; |
3111 | 0 | } |
3112 | | |
3113 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorFileMapping& aOther) |
3114 | 0 | { |
3115 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorFileMapping()) SurfaceDescriptorFileMapping(aOther); |
3116 | 0 | mType = TSurfaceDescriptorFileMapping; |
3117 | 0 | } |
3118 | | |
3119 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorFileMapping&& aOther) |
3120 | 0 | { |
3121 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorFileMapping()) SurfaceDescriptorFileMapping(std::move(aOther)); |
3122 | 0 | mType = TSurfaceDescriptorFileMapping; |
3123 | 0 | } |
3124 | | |
3125 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorDXGIYCbCr& aOther) |
3126 | 0 | { |
3127 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr(aOther); |
3128 | 0 | mType = TSurfaceDescriptorDXGIYCbCr; |
3129 | 0 | } |
3130 | | |
3131 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorDXGIYCbCr&& aOther) |
3132 | 0 | { |
3133 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr(std::move(aOther)); |
3134 | 0 | mType = TSurfaceDescriptorDXGIYCbCr; |
3135 | 0 | } |
3136 | | |
3137 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorX11& aOther) |
3138 | 0 | { |
3139 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorX11()) SurfaceDescriptorX11(aOther); |
3140 | 0 | mType = TSurfaceDescriptorX11; |
3141 | 0 | } |
3142 | | |
3143 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorX11&& aOther) |
3144 | 0 | { |
3145 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorX11()) SurfaceDescriptorX11(std::move(aOther)); |
3146 | 0 | mType = TSurfaceDescriptorX11; |
3147 | 0 | } |
3148 | | |
3149 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceTextureDescriptor& aOther) |
3150 | 0 | { |
3151 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor(aOther); |
3152 | 0 | mType = TSurfaceTextureDescriptor; |
3153 | 0 | } |
3154 | | |
3155 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceTextureDescriptor&& aOther) |
3156 | 0 | { |
3157 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor(std::move(aOther)); |
3158 | 0 | mType = TSurfaceTextureDescriptor; |
3159 | 0 | } |
3160 | | |
3161 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const EGLImageDescriptor& aOther) |
3162 | 0 | { |
3163 | 0 | new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor(aOther); |
3164 | 0 | mType = TEGLImageDescriptor; |
3165 | 0 | } |
3166 | | |
3167 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(EGLImageDescriptor&& aOther) |
3168 | 0 | { |
3169 | 0 | new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor(std::move(aOther)); |
3170 | 0 | mType = TEGLImageDescriptor; |
3171 | 0 | } |
3172 | | |
3173 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorMacIOSurface& aOther) |
3174 | 0 | { |
3175 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface(aOther); |
3176 | 0 | mType = TSurfaceDescriptorMacIOSurface; |
3177 | 0 | } |
3178 | | |
3179 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorMacIOSurface&& aOther) |
3180 | 0 | { |
3181 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface(std::move(aOther)); |
3182 | 0 | mType = TSurfaceDescriptorMacIOSurface; |
3183 | 0 | } |
3184 | | |
3185 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorSharedGLTexture& aOther) |
3186 | 0 | { |
3187 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture(aOther); |
3188 | 0 | mType = TSurfaceDescriptorSharedGLTexture; |
3189 | 0 | } |
3190 | | |
3191 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorSharedGLTexture&& aOther) |
3192 | 0 | { |
3193 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture(std::move(aOther)); |
3194 | 0 | mType = TSurfaceDescriptorSharedGLTexture; |
3195 | 0 | } |
3196 | | |
3197 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorGPUVideo& aOther) |
3198 | 0 | { |
3199 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo(aOther); |
3200 | 0 | mType = TSurfaceDescriptorGPUVideo; |
3201 | 0 | } |
3202 | | |
3203 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorGPUVideo&& aOther) |
3204 | 0 | { |
3205 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo(std::move(aOther)); |
3206 | 0 | mType = TSurfaceDescriptorGPUVideo; |
3207 | 0 | } |
3208 | | |
3209 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const null_t& aOther) |
3210 | 0 | { |
3211 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t(aOther); |
3212 | 0 | mType = Tnull_t; |
3213 | 0 | } |
3214 | | |
3215 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(null_t&& aOther) |
3216 | 0 | { |
3217 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t(std::move(aOther)); |
3218 | 0 | mType = Tnull_t; |
3219 | 0 | } |
3220 | | |
3221 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptor& aOther) |
3222 | 0 | { |
3223 | 0 | (aOther).AssertSanity(); |
3224 | 0 | switch ((aOther).type()) { |
3225 | 0 | case TSurfaceDescriptorBuffer: |
3226 | 0 | { |
3227 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer((aOther).get_SurfaceDescriptorBuffer()); |
3228 | 0 | break; |
3229 | 0 | } |
3230 | 0 | case TSurfaceDescriptorDIB: |
3231 | 0 | { |
3232 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDIB()) SurfaceDescriptorDIB((aOther).get_SurfaceDescriptorDIB()); |
3233 | 0 | break; |
3234 | 0 | } |
3235 | 0 | case TSurfaceDescriptorD3D10: |
3236 | 0 | { |
3237 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10((aOther).get_SurfaceDescriptorD3D10()); |
3238 | 0 | break; |
3239 | 0 | } |
3240 | 0 | case TSurfaceDescriptorFileMapping: |
3241 | 0 | { |
3242 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorFileMapping()) SurfaceDescriptorFileMapping((aOther).get_SurfaceDescriptorFileMapping()); |
3243 | 0 | break; |
3244 | 0 | } |
3245 | 0 | case TSurfaceDescriptorDXGIYCbCr: |
3246 | 0 | { |
3247 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr((aOther).get_SurfaceDescriptorDXGIYCbCr()); |
3248 | 0 | break; |
3249 | 0 | } |
3250 | 0 | case TSurfaceDescriptorX11: |
3251 | 0 | { |
3252 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorX11()) SurfaceDescriptorX11((aOther).get_SurfaceDescriptorX11()); |
3253 | 0 | break; |
3254 | 0 | } |
3255 | 0 | case TSurfaceTextureDescriptor: |
3256 | 0 | { |
3257 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor((aOther).get_SurfaceTextureDescriptor()); |
3258 | 0 | break; |
3259 | 0 | } |
3260 | 0 | case TEGLImageDescriptor: |
3261 | 0 | { |
3262 | 0 | new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor((aOther).get_EGLImageDescriptor()); |
3263 | 0 | break; |
3264 | 0 | } |
3265 | 0 | case TSurfaceDescriptorMacIOSurface: |
3266 | 0 | { |
3267 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface((aOther).get_SurfaceDescriptorMacIOSurface()); |
3268 | 0 | break; |
3269 | 0 | } |
3270 | 0 | case TSurfaceDescriptorSharedGLTexture: |
3271 | 0 | { |
3272 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture((aOther).get_SurfaceDescriptorSharedGLTexture()); |
3273 | 0 | break; |
3274 | 0 | } |
3275 | 0 | case TSurfaceDescriptorGPUVideo: |
3276 | 0 | { |
3277 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo((aOther).get_SurfaceDescriptorGPUVideo()); |
3278 | 0 | break; |
3279 | 0 | } |
3280 | 0 | case Tnull_t: |
3281 | 0 | { |
3282 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t((aOther).get_null_t()); |
3283 | 0 | break; |
3284 | 0 | } |
3285 | 0 | case T__None: |
3286 | 0 | { |
3287 | 0 | break; |
3288 | 0 | } |
3289 | 0 | default: |
3290 | 0 | { |
3291 | 0 | mozilla::ipc::LogicError("unreached"); |
3292 | 0 | return; |
3293 | 0 | } |
3294 | 0 | } |
3295 | 0 | mType = (aOther).type(); |
3296 | 0 | } |
3297 | | |
3298 | | MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptor&& aOther) |
3299 | 0 | { |
3300 | 0 | (aOther).AssertSanity(); |
3301 | 0 | Type t = (aOther).type(); |
3302 | 0 | switch (t) { |
3303 | 0 | case TSurfaceDescriptorBuffer: |
3304 | 0 | { |
3305 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer(std::move((aOther).get_SurfaceDescriptorBuffer())); |
3306 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
3307 | 0 | break; |
3308 | 0 | } |
3309 | 0 | case TSurfaceDescriptorDIB: |
3310 | 0 | { |
3311 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDIB()) SurfaceDescriptorDIB(std::move((aOther).get_SurfaceDescriptorDIB())); |
3312 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
3313 | 0 | break; |
3314 | 0 | } |
3315 | 0 | case TSurfaceDescriptorD3D10: |
3316 | 0 | { |
3317 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10(std::move((aOther).get_SurfaceDescriptorD3D10())); |
3318 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
3319 | 0 | break; |
3320 | 0 | } |
3321 | 0 | case TSurfaceDescriptorFileMapping: |
3322 | 0 | { |
3323 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorFileMapping()) SurfaceDescriptorFileMapping(std::move((aOther).get_SurfaceDescriptorFileMapping())); |
3324 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
3325 | 0 | break; |
3326 | 0 | } |
3327 | 0 | case TSurfaceDescriptorDXGIYCbCr: |
3328 | 0 | { |
3329 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr(std::move((aOther).get_SurfaceDescriptorDXGIYCbCr())); |
3330 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
3331 | 0 | break; |
3332 | 0 | } |
3333 | 0 | case TSurfaceDescriptorX11: |
3334 | 0 | { |
3335 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorX11()) SurfaceDescriptorX11(std::move((aOther).get_SurfaceDescriptorX11())); |
3336 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
3337 | 0 | break; |
3338 | 0 | } |
3339 | 0 | case TSurfaceTextureDescriptor: |
3340 | 0 | { |
3341 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor(std::move((aOther).get_SurfaceTextureDescriptor())); |
3342 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
3343 | 0 | break; |
3344 | 0 | } |
3345 | 0 | case TEGLImageDescriptor: |
3346 | 0 | { |
3347 | 0 | new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor(std::move((aOther).get_EGLImageDescriptor())); |
3348 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
3349 | 0 | break; |
3350 | 0 | } |
3351 | 0 | case TSurfaceDescriptorMacIOSurface: |
3352 | 0 | { |
3353 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface(std::move((aOther).get_SurfaceDescriptorMacIOSurface())); |
3354 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
3355 | 0 | break; |
3356 | 0 | } |
3357 | 0 | case TSurfaceDescriptorSharedGLTexture: |
3358 | 0 | { |
3359 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture(std::move((aOther).get_SurfaceDescriptorSharedGLTexture())); |
3360 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
3361 | 0 | break; |
3362 | 0 | } |
3363 | 0 | case TSurfaceDescriptorGPUVideo: |
3364 | 0 | { |
3365 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo(std::move((aOther).get_SurfaceDescriptorGPUVideo())); |
3366 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
3367 | 0 | break; |
3368 | 0 | } |
3369 | 0 | case Tnull_t: |
3370 | 0 | { |
3371 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t(std::move((aOther).get_null_t())); |
3372 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
3373 | 0 | break; |
3374 | 0 | } |
3375 | 0 | case T__None: |
3376 | 0 | { |
3377 | 0 | break; |
3378 | 0 | } |
3379 | 0 | default: |
3380 | 0 | { |
3381 | 0 | mozilla::ipc::LogicError("unreached"); |
3382 | 0 | return; |
3383 | 0 | } |
3384 | 0 | } |
3385 | 0 | (aOther).mType = T__None; |
3386 | 0 | mType = t; |
3387 | 0 | } |
3388 | | |
3389 | | SurfaceDescriptor::~SurfaceDescriptor() |
3390 | 0 | { |
3391 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
3392 | 0 | } |
3393 | | |
3394 | | auto SurfaceDescriptor::operator=(const SurfaceDescriptorBuffer& aRhs) -> SurfaceDescriptor& |
3395 | 0 | { |
3396 | 0 | if (MaybeDestroy(TSurfaceDescriptorBuffer)) { |
3397 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer; |
3398 | 0 | } |
3399 | 0 | (*(ptr_SurfaceDescriptorBuffer())) = aRhs; |
3400 | 0 | mType = TSurfaceDescriptorBuffer; |
3401 | 0 | return (*(this)); |
3402 | 0 | } |
3403 | | |
3404 | | auto SurfaceDescriptor::operator=(SurfaceDescriptorBuffer&& aRhs) -> SurfaceDescriptor& |
3405 | 0 | { |
3406 | 0 | if (MaybeDestroy(TSurfaceDescriptorBuffer)) { |
3407 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer; |
3408 | 0 | } |
3409 | 0 | (*(ptr_SurfaceDescriptorBuffer())) = std::move(aRhs); |
3410 | 0 | mType = TSurfaceDescriptorBuffer; |
3411 | 0 | return (*(this)); |
3412 | 0 | } |
3413 | | |
3414 | | auto SurfaceDescriptor::operator=(const SurfaceDescriptorDIB& aRhs) -> SurfaceDescriptor& |
3415 | 0 | { |
3416 | 0 | if (MaybeDestroy(TSurfaceDescriptorDIB)) { |
3417 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDIB()) SurfaceDescriptorDIB; |
3418 | 0 | } |
3419 | 0 | (*(ptr_SurfaceDescriptorDIB())) = aRhs; |
3420 | 0 | mType = TSurfaceDescriptorDIB; |
3421 | 0 | return (*(this)); |
3422 | 0 | } |
3423 | | |
3424 | | auto SurfaceDescriptor::operator=(SurfaceDescriptorDIB&& aRhs) -> SurfaceDescriptor& |
3425 | 0 | { |
3426 | 0 | if (MaybeDestroy(TSurfaceDescriptorDIB)) { |
3427 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDIB()) SurfaceDescriptorDIB; |
3428 | 0 | } |
3429 | 0 | (*(ptr_SurfaceDescriptorDIB())) = std::move(aRhs); |
3430 | 0 | mType = TSurfaceDescriptorDIB; |
3431 | 0 | return (*(this)); |
3432 | 0 | } |
3433 | | |
3434 | | auto SurfaceDescriptor::operator=(const SurfaceDescriptorD3D10& aRhs) -> SurfaceDescriptor& |
3435 | 0 | { |
3436 | 0 | if (MaybeDestroy(TSurfaceDescriptorD3D10)) { |
3437 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10; |
3438 | 0 | } |
3439 | 0 | (*(ptr_SurfaceDescriptorD3D10())) = aRhs; |
3440 | 0 | mType = TSurfaceDescriptorD3D10; |
3441 | 0 | return (*(this)); |
3442 | 0 | } |
3443 | | |
3444 | | auto SurfaceDescriptor::operator=(SurfaceDescriptorD3D10&& aRhs) -> SurfaceDescriptor& |
3445 | 0 | { |
3446 | 0 | if (MaybeDestroy(TSurfaceDescriptorD3D10)) { |
3447 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10; |
3448 | 0 | } |
3449 | 0 | (*(ptr_SurfaceDescriptorD3D10())) = std::move(aRhs); |
3450 | 0 | mType = TSurfaceDescriptorD3D10; |
3451 | 0 | return (*(this)); |
3452 | 0 | } |
3453 | | |
3454 | | auto SurfaceDescriptor::operator=(const SurfaceDescriptorFileMapping& aRhs) -> SurfaceDescriptor& |
3455 | 0 | { |
3456 | 0 | if (MaybeDestroy(TSurfaceDescriptorFileMapping)) { |
3457 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorFileMapping()) SurfaceDescriptorFileMapping; |
3458 | 0 | } |
3459 | 0 | (*(ptr_SurfaceDescriptorFileMapping())) = aRhs; |
3460 | 0 | mType = TSurfaceDescriptorFileMapping; |
3461 | 0 | return (*(this)); |
3462 | 0 | } |
3463 | | |
3464 | | auto SurfaceDescriptor::operator=(SurfaceDescriptorFileMapping&& aRhs) -> SurfaceDescriptor& |
3465 | 0 | { |
3466 | 0 | if (MaybeDestroy(TSurfaceDescriptorFileMapping)) { |
3467 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorFileMapping()) SurfaceDescriptorFileMapping; |
3468 | 0 | } |
3469 | 0 | (*(ptr_SurfaceDescriptorFileMapping())) = std::move(aRhs); |
3470 | 0 | mType = TSurfaceDescriptorFileMapping; |
3471 | 0 | return (*(this)); |
3472 | 0 | } |
3473 | | |
3474 | | auto SurfaceDescriptor::operator=(const SurfaceDescriptorDXGIYCbCr& aRhs) -> SurfaceDescriptor& |
3475 | 0 | { |
3476 | 0 | if (MaybeDestroy(TSurfaceDescriptorDXGIYCbCr)) { |
3477 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr; |
3478 | 0 | } |
3479 | 0 | (*(ptr_SurfaceDescriptorDXGIYCbCr())) = aRhs; |
3480 | 0 | mType = TSurfaceDescriptorDXGIYCbCr; |
3481 | 0 | return (*(this)); |
3482 | 0 | } |
3483 | | |
3484 | | auto SurfaceDescriptor::operator=(SurfaceDescriptorDXGIYCbCr&& aRhs) -> SurfaceDescriptor& |
3485 | 0 | { |
3486 | 0 | if (MaybeDestroy(TSurfaceDescriptorDXGIYCbCr)) { |
3487 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr; |
3488 | 0 | } |
3489 | 0 | (*(ptr_SurfaceDescriptorDXGIYCbCr())) = std::move(aRhs); |
3490 | 0 | mType = TSurfaceDescriptorDXGIYCbCr; |
3491 | 0 | return (*(this)); |
3492 | 0 | } |
3493 | | |
3494 | | auto SurfaceDescriptor::operator=(const SurfaceDescriptorX11& aRhs) -> SurfaceDescriptor& |
3495 | 0 | { |
3496 | 0 | if (MaybeDestroy(TSurfaceDescriptorX11)) { |
3497 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorX11()) SurfaceDescriptorX11; |
3498 | 0 | } |
3499 | 0 | (*(ptr_SurfaceDescriptorX11())) = aRhs; |
3500 | 0 | mType = TSurfaceDescriptorX11; |
3501 | 0 | return (*(this)); |
3502 | 0 | } |
3503 | | |
3504 | | auto SurfaceDescriptor::operator=(SurfaceDescriptorX11&& aRhs) -> SurfaceDescriptor& |
3505 | 0 | { |
3506 | 0 | if (MaybeDestroy(TSurfaceDescriptorX11)) { |
3507 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorX11()) SurfaceDescriptorX11; |
3508 | 0 | } |
3509 | 0 | (*(ptr_SurfaceDescriptorX11())) = std::move(aRhs); |
3510 | 0 | mType = TSurfaceDescriptorX11; |
3511 | 0 | return (*(this)); |
3512 | 0 | } |
3513 | | |
3514 | | auto SurfaceDescriptor::operator=(const SurfaceTextureDescriptor& aRhs) -> SurfaceDescriptor& |
3515 | 0 | { |
3516 | 0 | if (MaybeDestroy(TSurfaceTextureDescriptor)) { |
3517 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor; |
3518 | 0 | } |
3519 | 0 | (*(ptr_SurfaceTextureDescriptor())) = aRhs; |
3520 | 0 | mType = TSurfaceTextureDescriptor; |
3521 | 0 | return (*(this)); |
3522 | 0 | } |
3523 | | |
3524 | | auto SurfaceDescriptor::operator=(SurfaceTextureDescriptor&& aRhs) -> SurfaceDescriptor& |
3525 | 0 | { |
3526 | 0 | if (MaybeDestroy(TSurfaceTextureDescriptor)) { |
3527 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor; |
3528 | 0 | } |
3529 | 0 | (*(ptr_SurfaceTextureDescriptor())) = std::move(aRhs); |
3530 | 0 | mType = TSurfaceTextureDescriptor; |
3531 | 0 | return (*(this)); |
3532 | 0 | } |
3533 | | |
3534 | | auto SurfaceDescriptor::operator=(const EGLImageDescriptor& aRhs) -> SurfaceDescriptor& |
3535 | 0 | { |
3536 | 0 | if (MaybeDestroy(TEGLImageDescriptor)) { |
3537 | 0 | new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor; |
3538 | 0 | } |
3539 | 0 | (*(ptr_EGLImageDescriptor())) = aRhs; |
3540 | 0 | mType = TEGLImageDescriptor; |
3541 | 0 | return (*(this)); |
3542 | 0 | } |
3543 | | |
3544 | | auto SurfaceDescriptor::operator=(EGLImageDescriptor&& aRhs) -> SurfaceDescriptor& |
3545 | 0 | { |
3546 | 0 | if (MaybeDestroy(TEGLImageDescriptor)) { |
3547 | 0 | new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor; |
3548 | 0 | } |
3549 | 0 | (*(ptr_EGLImageDescriptor())) = std::move(aRhs); |
3550 | 0 | mType = TEGLImageDescriptor; |
3551 | 0 | return (*(this)); |
3552 | 0 | } |
3553 | | |
3554 | | auto SurfaceDescriptor::operator=(const SurfaceDescriptorMacIOSurface& aRhs) -> SurfaceDescriptor& |
3555 | 0 | { |
3556 | 0 | if (MaybeDestroy(TSurfaceDescriptorMacIOSurface)) { |
3557 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface; |
3558 | 0 | } |
3559 | 0 | (*(ptr_SurfaceDescriptorMacIOSurface())) = aRhs; |
3560 | 0 | mType = TSurfaceDescriptorMacIOSurface; |
3561 | 0 | return (*(this)); |
3562 | 0 | } |
3563 | | |
3564 | | auto SurfaceDescriptor::operator=(SurfaceDescriptorMacIOSurface&& aRhs) -> SurfaceDescriptor& |
3565 | 0 | { |
3566 | 0 | if (MaybeDestroy(TSurfaceDescriptorMacIOSurface)) { |
3567 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface; |
3568 | 0 | } |
3569 | 0 | (*(ptr_SurfaceDescriptorMacIOSurface())) = std::move(aRhs); |
3570 | 0 | mType = TSurfaceDescriptorMacIOSurface; |
3571 | 0 | return (*(this)); |
3572 | 0 | } |
3573 | | |
3574 | | auto SurfaceDescriptor::operator=(const SurfaceDescriptorSharedGLTexture& aRhs) -> SurfaceDescriptor& |
3575 | 0 | { |
3576 | 0 | if (MaybeDestroy(TSurfaceDescriptorSharedGLTexture)) { |
3577 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture; |
3578 | 0 | } |
3579 | 0 | (*(ptr_SurfaceDescriptorSharedGLTexture())) = aRhs; |
3580 | 0 | mType = TSurfaceDescriptorSharedGLTexture; |
3581 | 0 | return (*(this)); |
3582 | 0 | } |
3583 | | |
3584 | | auto SurfaceDescriptor::operator=(SurfaceDescriptorSharedGLTexture&& aRhs) -> SurfaceDescriptor& |
3585 | 0 | { |
3586 | 0 | if (MaybeDestroy(TSurfaceDescriptorSharedGLTexture)) { |
3587 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture; |
3588 | 0 | } |
3589 | 0 | (*(ptr_SurfaceDescriptorSharedGLTexture())) = std::move(aRhs); |
3590 | 0 | mType = TSurfaceDescriptorSharedGLTexture; |
3591 | 0 | return (*(this)); |
3592 | 0 | } |
3593 | | |
3594 | | auto SurfaceDescriptor::operator=(const SurfaceDescriptorGPUVideo& aRhs) -> SurfaceDescriptor& |
3595 | 0 | { |
3596 | 0 | if (MaybeDestroy(TSurfaceDescriptorGPUVideo)) { |
3597 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo; |
3598 | 0 | } |
3599 | 0 | (*(ptr_SurfaceDescriptorGPUVideo())) = aRhs; |
3600 | 0 | mType = TSurfaceDescriptorGPUVideo; |
3601 | 0 | return (*(this)); |
3602 | 0 | } |
3603 | | |
3604 | | auto SurfaceDescriptor::operator=(SurfaceDescriptorGPUVideo&& aRhs) -> SurfaceDescriptor& |
3605 | 0 | { |
3606 | 0 | if (MaybeDestroy(TSurfaceDescriptorGPUVideo)) { |
3607 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo; |
3608 | 0 | } |
3609 | 0 | (*(ptr_SurfaceDescriptorGPUVideo())) = std::move(aRhs); |
3610 | 0 | mType = TSurfaceDescriptorGPUVideo; |
3611 | 0 | return (*(this)); |
3612 | 0 | } |
3613 | | |
3614 | | auto SurfaceDescriptor::operator=(const null_t& aRhs) -> SurfaceDescriptor& |
3615 | 0 | { |
3616 | 0 | if (MaybeDestroy(Tnull_t)) { |
3617 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t; |
3618 | 0 | } |
3619 | 0 | (*(ptr_null_t())) = aRhs; |
3620 | 0 | mType = Tnull_t; |
3621 | 0 | return (*(this)); |
3622 | 0 | } |
3623 | | |
3624 | | auto SurfaceDescriptor::operator=(null_t&& aRhs) -> SurfaceDescriptor& |
3625 | 0 | { |
3626 | 0 | if (MaybeDestroy(Tnull_t)) { |
3627 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t; |
3628 | 0 | } |
3629 | 0 | (*(ptr_null_t())) = std::move(aRhs); |
3630 | 0 | mType = Tnull_t; |
3631 | 0 | return (*(this)); |
3632 | 0 | } |
3633 | | |
3634 | | auto SurfaceDescriptor::operator=(const SurfaceDescriptor& aRhs) -> SurfaceDescriptor& |
3635 | 0 | { |
3636 | 0 | (aRhs).AssertSanity(); |
3637 | 0 | Type t = (aRhs).type(); |
3638 | 0 | switch (t) { |
3639 | 0 | case TSurfaceDescriptorBuffer: |
3640 | 0 | { |
3641 | 0 | if (MaybeDestroy(t)) { |
3642 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer; |
3643 | 0 | } |
3644 | 0 | (*(ptr_SurfaceDescriptorBuffer())) = (aRhs).get_SurfaceDescriptorBuffer(); |
3645 | 0 | break; |
3646 | 0 | } |
3647 | 0 | case TSurfaceDescriptorDIB: |
3648 | 0 | { |
3649 | 0 | if (MaybeDestroy(t)) { |
3650 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDIB()) SurfaceDescriptorDIB; |
3651 | 0 | } |
3652 | 0 | (*(ptr_SurfaceDescriptorDIB())) = (aRhs).get_SurfaceDescriptorDIB(); |
3653 | 0 | break; |
3654 | 0 | } |
3655 | 0 | case TSurfaceDescriptorD3D10: |
3656 | 0 | { |
3657 | 0 | if (MaybeDestroy(t)) { |
3658 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10; |
3659 | 0 | } |
3660 | 0 | (*(ptr_SurfaceDescriptorD3D10())) = (aRhs).get_SurfaceDescriptorD3D10(); |
3661 | 0 | break; |
3662 | 0 | } |
3663 | 0 | case TSurfaceDescriptorFileMapping: |
3664 | 0 | { |
3665 | 0 | if (MaybeDestroy(t)) { |
3666 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorFileMapping()) SurfaceDescriptorFileMapping; |
3667 | 0 | } |
3668 | 0 | (*(ptr_SurfaceDescriptorFileMapping())) = (aRhs).get_SurfaceDescriptorFileMapping(); |
3669 | 0 | break; |
3670 | 0 | } |
3671 | 0 | case TSurfaceDescriptorDXGIYCbCr: |
3672 | 0 | { |
3673 | 0 | if (MaybeDestroy(t)) { |
3674 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr; |
3675 | 0 | } |
3676 | 0 | (*(ptr_SurfaceDescriptorDXGIYCbCr())) = (aRhs).get_SurfaceDescriptorDXGIYCbCr(); |
3677 | 0 | break; |
3678 | 0 | } |
3679 | 0 | case TSurfaceDescriptorX11: |
3680 | 0 | { |
3681 | 0 | if (MaybeDestroy(t)) { |
3682 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorX11()) SurfaceDescriptorX11; |
3683 | 0 | } |
3684 | 0 | (*(ptr_SurfaceDescriptorX11())) = (aRhs).get_SurfaceDescriptorX11(); |
3685 | 0 | break; |
3686 | 0 | } |
3687 | 0 | case TSurfaceTextureDescriptor: |
3688 | 0 | { |
3689 | 0 | if (MaybeDestroy(t)) { |
3690 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor; |
3691 | 0 | } |
3692 | 0 | (*(ptr_SurfaceTextureDescriptor())) = (aRhs).get_SurfaceTextureDescriptor(); |
3693 | 0 | break; |
3694 | 0 | } |
3695 | 0 | case TEGLImageDescriptor: |
3696 | 0 | { |
3697 | 0 | if (MaybeDestroy(t)) { |
3698 | 0 | new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor; |
3699 | 0 | } |
3700 | 0 | (*(ptr_EGLImageDescriptor())) = (aRhs).get_EGLImageDescriptor(); |
3701 | 0 | break; |
3702 | 0 | } |
3703 | 0 | case TSurfaceDescriptorMacIOSurface: |
3704 | 0 | { |
3705 | 0 | if (MaybeDestroy(t)) { |
3706 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface; |
3707 | 0 | } |
3708 | 0 | (*(ptr_SurfaceDescriptorMacIOSurface())) = (aRhs).get_SurfaceDescriptorMacIOSurface(); |
3709 | 0 | break; |
3710 | 0 | } |
3711 | 0 | case TSurfaceDescriptorSharedGLTexture: |
3712 | 0 | { |
3713 | 0 | if (MaybeDestroy(t)) { |
3714 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture; |
3715 | 0 | } |
3716 | 0 | (*(ptr_SurfaceDescriptorSharedGLTexture())) = (aRhs).get_SurfaceDescriptorSharedGLTexture(); |
3717 | 0 | break; |
3718 | 0 | } |
3719 | 0 | case TSurfaceDescriptorGPUVideo: |
3720 | 0 | { |
3721 | 0 | if (MaybeDestroy(t)) { |
3722 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo; |
3723 | 0 | } |
3724 | 0 | (*(ptr_SurfaceDescriptorGPUVideo())) = (aRhs).get_SurfaceDescriptorGPUVideo(); |
3725 | 0 | break; |
3726 | 0 | } |
3727 | 0 | case Tnull_t: |
3728 | 0 | { |
3729 | 0 | if (MaybeDestroy(t)) { |
3730 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t; |
3731 | 0 | } |
3732 | 0 | (*(ptr_null_t())) = (aRhs).get_null_t(); |
3733 | 0 | break; |
3734 | 0 | } |
3735 | 0 | case T__None: |
3736 | 0 | { |
3737 | 0 | static_cast<void>(MaybeDestroy(t)); |
3738 | 0 | break; |
3739 | 0 | } |
3740 | 0 | default: |
3741 | 0 | { |
3742 | 0 | mozilla::ipc::LogicError("unreached"); |
3743 | 0 | break; |
3744 | 0 | } |
3745 | 0 | } |
3746 | 0 | mType = t; |
3747 | 0 | return (*(this)); |
3748 | 0 | } |
3749 | | |
3750 | | auto SurfaceDescriptor::operator=(SurfaceDescriptor&& aRhs) -> SurfaceDescriptor& |
3751 | 0 | { |
3752 | 0 | (aRhs).AssertSanity(); |
3753 | 0 | Type t = (aRhs).type(); |
3754 | 0 | switch (t) { |
3755 | 0 | case TSurfaceDescriptorBuffer: |
3756 | 0 | { |
3757 | 0 | if (MaybeDestroy(t)) { |
3758 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer; |
3759 | 0 | } |
3760 | 0 | (*(ptr_SurfaceDescriptorBuffer())) = std::move((aRhs).get_SurfaceDescriptorBuffer()); |
3761 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
3762 | 0 | break; |
3763 | 0 | } |
3764 | 0 | case TSurfaceDescriptorDIB: |
3765 | 0 | { |
3766 | 0 | if (MaybeDestroy(t)) { |
3767 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDIB()) SurfaceDescriptorDIB; |
3768 | 0 | } |
3769 | 0 | (*(ptr_SurfaceDescriptorDIB())) = std::move((aRhs).get_SurfaceDescriptorDIB()); |
3770 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
3771 | 0 | break; |
3772 | 0 | } |
3773 | 0 | case TSurfaceDescriptorD3D10: |
3774 | 0 | { |
3775 | 0 | if (MaybeDestroy(t)) { |
3776 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10; |
3777 | 0 | } |
3778 | 0 | (*(ptr_SurfaceDescriptorD3D10())) = std::move((aRhs).get_SurfaceDescriptorD3D10()); |
3779 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
3780 | 0 | break; |
3781 | 0 | } |
3782 | 0 | case TSurfaceDescriptorFileMapping: |
3783 | 0 | { |
3784 | 0 | if (MaybeDestroy(t)) { |
3785 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorFileMapping()) SurfaceDescriptorFileMapping; |
3786 | 0 | } |
3787 | 0 | (*(ptr_SurfaceDescriptorFileMapping())) = std::move((aRhs).get_SurfaceDescriptorFileMapping()); |
3788 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
3789 | 0 | break; |
3790 | 0 | } |
3791 | 0 | case TSurfaceDescriptorDXGIYCbCr: |
3792 | 0 | { |
3793 | 0 | if (MaybeDestroy(t)) { |
3794 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr; |
3795 | 0 | } |
3796 | 0 | (*(ptr_SurfaceDescriptorDXGIYCbCr())) = std::move((aRhs).get_SurfaceDescriptorDXGIYCbCr()); |
3797 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
3798 | 0 | break; |
3799 | 0 | } |
3800 | 0 | case TSurfaceDescriptorX11: |
3801 | 0 | { |
3802 | 0 | if (MaybeDestroy(t)) { |
3803 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorX11()) SurfaceDescriptorX11; |
3804 | 0 | } |
3805 | 0 | (*(ptr_SurfaceDescriptorX11())) = std::move((aRhs).get_SurfaceDescriptorX11()); |
3806 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
3807 | 0 | break; |
3808 | 0 | } |
3809 | 0 | case TSurfaceTextureDescriptor: |
3810 | 0 | { |
3811 | 0 | if (MaybeDestroy(t)) { |
3812 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor; |
3813 | 0 | } |
3814 | 0 | (*(ptr_SurfaceTextureDescriptor())) = std::move((aRhs).get_SurfaceTextureDescriptor()); |
3815 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
3816 | 0 | break; |
3817 | 0 | } |
3818 | 0 | case TEGLImageDescriptor: |
3819 | 0 | { |
3820 | 0 | if (MaybeDestroy(t)) { |
3821 | 0 | new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor; |
3822 | 0 | } |
3823 | 0 | (*(ptr_EGLImageDescriptor())) = std::move((aRhs).get_EGLImageDescriptor()); |
3824 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
3825 | 0 | break; |
3826 | 0 | } |
3827 | 0 | case TSurfaceDescriptorMacIOSurface: |
3828 | 0 | { |
3829 | 0 | if (MaybeDestroy(t)) { |
3830 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface; |
3831 | 0 | } |
3832 | 0 | (*(ptr_SurfaceDescriptorMacIOSurface())) = std::move((aRhs).get_SurfaceDescriptorMacIOSurface()); |
3833 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
3834 | 0 | break; |
3835 | 0 | } |
3836 | 0 | case TSurfaceDescriptorSharedGLTexture: |
3837 | 0 | { |
3838 | 0 | if (MaybeDestroy(t)) { |
3839 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture; |
3840 | 0 | } |
3841 | 0 | (*(ptr_SurfaceDescriptorSharedGLTexture())) = std::move((aRhs).get_SurfaceDescriptorSharedGLTexture()); |
3842 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
3843 | 0 | break; |
3844 | 0 | } |
3845 | 0 | case TSurfaceDescriptorGPUVideo: |
3846 | 0 | { |
3847 | 0 | if (MaybeDestroy(t)) { |
3848 | 0 | new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo; |
3849 | 0 | } |
3850 | 0 | (*(ptr_SurfaceDescriptorGPUVideo())) = std::move((aRhs).get_SurfaceDescriptorGPUVideo()); |
3851 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
3852 | 0 | break; |
3853 | 0 | } |
3854 | 0 | case Tnull_t: |
3855 | 0 | { |
3856 | 0 | if (MaybeDestroy(t)) { |
3857 | 0 | new (mozilla::KnownNotNull, ptr_null_t()) null_t; |
3858 | 0 | } |
3859 | 0 | (*(ptr_null_t())) = std::move((aRhs).get_null_t()); |
3860 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
3861 | 0 | break; |
3862 | 0 | } |
3863 | 0 | case T__None: |
3864 | 0 | { |
3865 | 0 | static_cast<void>(MaybeDestroy(t)); |
3866 | 0 | break; |
3867 | 0 | } |
3868 | 0 | default: |
3869 | 0 | { |
3870 | 0 | mozilla::ipc::LogicError("unreached"); |
3871 | 0 | break; |
3872 | 0 | } |
3873 | 0 | } |
3874 | 0 | (aRhs).mType = T__None; |
3875 | 0 | mType = t; |
3876 | 0 | return (*(this)); |
3877 | 0 | } |
3878 | | |
3879 | | auto SurfaceDescriptor::operator==(const SurfaceDescriptorBuffer& aRhs) const -> bool |
3880 | 0 | { |
3881 | 0 | return (get_SurfaceDescriptorBuffer()) == (aRhs); |
3882 | 0 | } |
3883 | | |
3884 | | auto SurfaceDescriptor::operator==(const SurfaceDescriptorDIB& aRhs) const -> bool |
3885 | 0 | { |
3886 | 0 | return (get_SurfaceDescriptorDIB()) == (aRhs); |
3887 | 0 | } |
3888 | | |
3889 | | auto SurfaceDescriptor::operator==(const SurfaceDescriptorD3D10& aRhs) const -> bool |
3890 | 0 | { |
3891 | 0 | return (get_SurfaceDescriptorD3D10()) == (aRhs); |
3892 | 0 | } |
3893 | | |
3894 | | auto SurfaceDescriptor::operator==(const SurfaceDescriptorFileMapping& aRhs) const -> bool |
3895 | 0 | { |
3896 | 0 | return (get_SurfaceDescriptorFileMapping()) == (aRhs); |
3897 | 0 | } |
3898 | | |
3899 | | auto SurfaceDescriptor::operator==(const SurfaceDescriptorDXGIYCbCr& aRhs) const -> bool |
3900 | 0 | { |
3901 | 0 | return (get_SurfaceDescriptorDXGIYCbCr()) == (aRhs); |
3902 | 0 | } |
3903 | | |
3904 | | auto SurfaceDescriptor::operator==(const SurfaceDescriptorX11& aRhs) const -> bool |
3905 | 0 | { |
3906 | 0 | return (get_SurfaceDescriptorX11()) == (aRhs); |
3907 | 0 | } |
3908 | | |
3909 | | auto SurfaceDescriptor::operator==(const SurfaceTextureDescriptor& aRhs) const -> bool |
3910 | 0 | { |
3911 | 0 | return (get_SurfaceTextureDescriptor()) == (aRhs); |
3912 | 0 | } |
3913 | | |
3914 | | auto SurfaceDescriptor::operator==(const EGLImageDescriptor& aRhs) const -> bool |
3915 | 0 | { |
3916 | 0 | return (get_EGLImageDescriptor()) == (aRhs); |
3917 | 0 | } |
3918 | | |
3919 | | auto SurfaceDescriptor::operator==(const SurfaceDescriptorMacIOSurface& aRhs) const -> bool |
3920 | 0 | { |
3921 | 0 | return (get_SurfaceDescriptorMacIOSurface()) == (aRhs); |
3922 | 0 | } |
3923 | | |
3924 | | auto SurfaceDescriptor::operator==(const SurfaceDescriptorSharedGLTexture& aRhs) const -> bool |
3925 | 0 | { |
3926 | 0 | return (get_SurfaceDescriptorSharedGLTexture()) == (aRhs); |
3927 | 0 | } |
3928 | | |
3929 | | auto SurfaceDescriptor::operator==(const SurfaceDescriptorGPUVideo& aRhs) const -> bool |
3930 | 0 | { |
3931 | 0 | return (get_SurfaceDescriptorGPUVideo()) == (aRhs); |
3932 | 0 | } |
3933 | | |
3934 | | auto SurfaceDescriptor::operator==(const null_t& aRhs) const -> bool |
3935 | 0 | { |
3936 | 0 | return (get_null_t()) == (aRhs); |
3937 | 0 | } |
3938 | | |
3939 | | auto SurfaceDescriptor::operator==(const SurfaceDescriptor& aRhs) const -> bool |
3940 | 0 | { |
3941 | 0 | if ((type()) != ((aRhs).type())) { |
3942 | 0 | return false; |
3943 | 0 | } |
3944 | 0 | |
3945 | 0 | switch (type()) { |
3946 | 0 | case TSurfaceDescriptorBuffer: |
3947 | 0 | { |
3948 | 0 | return (get_SurfaceDescriptorBuffer()) == ((aRhs).get_SurfaceDescriptorBuffer()); |
3949 | 0 | } |
3950 | 0 | case TSurfaceDescriptorDIB: |
3951 | 0 | { |
3952 | 0 | return (get_SurfaceDescriptorDIB()) == ((aRhs).get_SurfaceDescriptorDIB()); |
3953 | 0 | } |
3954 | 0 | case TSurfaceDescriptorD3D10: |
3955 | 0 | { |
3956 | 0 | return (get_SurfaceDescriptorD3D10()) == ((aRhs).get_SurfaceDescriptorD3D10()); |
3957 | 0 | } |
3958 | 0 | case TSurfaceDescriptorFileMapping: |
3959 | 0 | { |
3960 | 0 | return (get_SurfaceDescriptorFileMapping()) == ((aRhs).get_SurfaceDescriptorFileMapping()); |
3961 | 0 | } |
3962 | 0 | case TSurfaceDescriptorDXGIYCbCr: |
3963 | 0 | { |
3964 | 0 | return (get_SurfaceDescriptorDXGIYCbCr()) == ((aRhs).get_SurfaceDescriptorDXGIYCbCr()); |
3965 | 0 | } |
3966 | 0 | case TSurfaceDescriptorX11: |
3967 | 0 | { |
3968 | 0 | return (get_SurfaceDescriptorX11()) == ((aRhs).get_SurfaceDescriptorX11()); |
3969 | 0 | } |
3970 | 0 | case TSurfaceTextureDescriptor: |
3971 | 0 | { |
3972 | 0 | return (get_SurfaceTextureDescriptor()) == ((aRhs).get_SurfaceTextureDescriptor()); |
3973 | 0 | } |
3974 | 0 | case TEGLImageDescriptor: |
3975 | 0 | { |
3976 | 0 | return (get_EGLImageDescriptor()) == ((aRhs).get_EGLImageDescriptor()); |
3977 | 0 | } |
3978 | 0 | case TSurfaceDescriptorMacIOSurface: |
3979 | 0 | { |
3980 | 0 | return (get_SurfaceDescriptorMacIOSurface()) == ((aRhs).get_SurfaceDescriptorMacIOSurface()); |
3981 | 0 | } |
3982 | 0 | case TSurfaceDescriptorSharedGLTexture: |
3983 | 0 | { |
3984 | 0 | return (get_SurfaceDescriptorSharedGLTexture()) == ((aRhs).get_SurfaceDescriptorSharedGLTexture()); |
3985 | 0 | } |
3986 | 0 | case TSurfaceDescriptorGPUVideo: |
3987 | 0 | { |
3988 | 0 | return (get_SurfaceDescriptorGPUVideo()) == ((aRhs).get_SurfaceDescriptorGPUVideo()); |
3989 | 0 | } |
3990 | 0 | case Tnull_t: |
3991 | 0 | { |
3992 | 0 | return (get_null_t()) == ((aRhs).get_null_t()); |
3993 | 0 | } |
3994 | 0 | default: |
3995 | 0 | { |
3996 | 0 | mozilla::ipc::LogicError("unreached"); |
3997 | 0 | return false; |
3998 | 0 | } |
3999 | 0 | } |
4000 | 0 | } |
4001 | | |
4002 | | auto SurfaceDescriptor::get(SurfaceDescriptorBuffer* aOutValue) const -> void |
4003 | 0 | { |
4004 | 0 | (*(aOutValue)) = get_SurfaceDescriptorBuffer(); |
4005 | 0 | } |
4006 | | |
4007 | | auto SurfaceDescriptor::get(SurfaceDescriptorDIB* aOutValue) const -> void |
4008 | 0 | { |
4009 | 0 | (*(aOutValue)) = get_SurfaceDescriptorDIB(); |
4010 | 0 | } |
4011 | | |
4012 | | auto SurfaceDescriptor::get(SurfaceDescriptorD3D10* aOutValue) const -> void |
4013 | 0 | { |
4014 | 0 | (*(aOutValue)) = get_SurfaceDescriptorD3D10(); |
4015 | 0 | } |
4016 | | |
4017 | | auto SurfaceDescriptor::get(SurfaceDescriptorFileMapping* aOutValue) const -> void |
4018 | 0 | { |
4019 | 0 | (*(aOutValue)) = get_SurfaceDescriptorFileMapping(); |
4020 | 0 | } |
4021 | | |
4022 | | auto SurfaceDescriptor::get(SurfaceDescriptorDXGIYCbCr* aOutValue) const -> void |
4023 | 0 | { |
4024 | 0 | (*(aOutValue)) = get_SurfaceDescriptorDXGIYCbCr(); |
4025 | 0 | } |
4026 | | |
4027 | | auto SurfaceDescriptor::get(SurfaceDescriptorX11* aOutValue) const -> void |
4028 | 0 | { |
4029 | 0 | (*(aOutValue)) = get_SurfaceDescriptorX11(); |
4030 | 0 | } |
4031 | | |
4032 | | auto SurfaceDescriptor::get(SurfaceTextureDescriptor* aOutValue) const -> void |
4033 | 0 | { |
4034 | 0 | (*(aOutValue)) = get_SurfaceTextureDescriptor(); |
4035 | 0 | } |
4036 | | |
4037 | | auto SurfaceDescriptor::get(EGLImageDescriptor* aOutValue) const -> void |
4038 | 0 | { |
4039 | 0 | (*(aOutValue)) = get_EGLImageDescriptor(); |
4040 | 0 | } |
4041 | | |
4042 | | auto SurfaceDescriptor::get(SurfaceDescriptorMacIOSurface* aOutValue) const -> void |
4043 | 0 | { |
4044 | 0 | (*(aOutValue)) = get_SurfaceDescriptorMacIOSurface(); |
4045 | 0 | } |
4046 | | |
4047 | | auto SurfaceDescriptor::get(SurfaceDescriptorSharedGLTexture* aOutValue) const -> void |
4048 | 0 | { |
4049 | 0 | (*(aOutValue)) = get_SurfaceDescriptorSharedGLTexture(); |
4050 | 0 | } |
4051 | | |
4052 | | auto SurfaceDescriptor::get(SurfaceDescriptorGPUVideo* aOutValue) const -> void |
4053 | 0 | { |
4054 | 0 | (*(aOutValue)) = get_SurfaceDescriptorGPUVideo(); |
4055 | 0 | } |
4056 | | |
4057 | | auto SurfaceDescriptor::get(null_t* aOutValue) const -> void |
4058 | 0 | { |
4059 | 0 | (*(aOutValue)) = get_null_t(); |
4060 | 0 | } |
4061 | | |
4062 | | } // namespace layers |
4063 | | } // namespace mozilla |
4064 | | |
4065 | | namespace mozilla { |
4066 | | namespace ipc { |
4067 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptor>::Write( |
4068 | | IPC::Message* aMsg, |
4069 | | mozilla::ipc::IProtocol* aActor, |
4070 | | const paramType& aVar) -> void |
4071 | | { |
4072 | | typedef mozilla::layers::SurfaceDescriptor union__; |
4073 | | int type; |
4074 | | type = (aVar).type(); |
4075 | | WriteIPDLParam(aMsg, aActor, type); |
4076 | | // Sentinel = 'SurfaceDescriptor' |
4077 | | (aMsg)->WriteSentinel(1058499359); |
4078 | | |
4079 | | switch (type) { |
4080 | | case union__::TSurfaceDescriptorBuffer: |
4081 | | { |
4082 | | WriteIPDLParam(aMsg, aActor, (aVar).get_SurfaceDescriptorBuffer()); |
4083 | | // Sentinel = 'TSurfaceDescriptorBuffer' |
4084 | | (aMsg)->WriteSentinel(2202696360); |
4085 | | return; |
4086 | | } |
4087 | | case union__::TSurfaceDescriptorDIB: |
4088 | | { |
4089 | | WriteIPDLParam(aMsg, aActor, (aVar).get_SurfaceDescriptorDIB()); |
4090 | | // Sentinel = 'TSurfaceDescriptorDIB' |
4091 | | (aMsg)->WriteSentinel(998410538); |
4092 | | return; |
4093 | | } |
4094 | | case union__::TSurfaceDescriptorD3D10: |
4095 | | { |
4096 | | WriteIPDLParam(aMsg, aActor, (aVar).get_SurfaceDescriptorD3D10()); |
4097 | | // Sentinel = 'TSurfaceDescriptorD3D10' |
4098 | | (aMsg)->WriteSentinel(2753564567); |
4099 | | return; |
4100 | | } |
4101 | | case union__::TSurfaceDescriptorFileMapping: |
4102 | | { |
4103 | | WriteIPDLParam(aMsg, aActor, (aVar).get_SurfaceDescriptorFileMapping()); |
4104 | | // Sentinel = 'TSurfaceDescriptorFileMapping' |
4105 | | (aMsg)->WriteSentinel(722196935); |
4106 | | return; |
4107 | | } |
4108 | | case union__::TSurfaceDescriptorDXGIYCbCr: |
4109 | | { |
4110 | | WriteIPDLParam(aMsg, aActor, (aVar).get_SurfaceDescriptorDXGIYCbCr()); |
4111 | | // Sentinel = 'TSurfaceDescriptorDXGIYCbCr' |
4112 | | (aMsg)->WriteSentinel(3061212892); |
4113 | | return; |
4114 | | } |
4115 | | case union__::TSurfaceDescriptorX11: |
4116 | | { |
4117 | | WriteIPDLParam(aMsg, aActor, (aVar).get_SurfaceDescriptorX11()); |
4118 | | // Sentinel = 'TSurfaceDescriptorX11' |
4119 | | (aMsg)->WriteSentinel(3923930613); |
4120 | | return; |
4121 | | } |
4122 | | case union__::TSurfaceTextureDescriptor: |
4123 | | { |
4124 | | WriteIPDLParam(aMsg, aActor, (aVar).get_SurfaceTextureDescriptor()); |
4125 | | // Sentinel = 'TSurfaceTextureDescriptor' |
4126 | | (aMsg)->WriteSentinel(2253946800); |
4127 | | return; |
4128 | | } |
4129 | | case union__::TEGLImageDescriptor: |
4130 | | { |
4131 | | WriteIPDLParam(aMsg, aActor, (aVar).get_EGLImageDescriptor()); |
4132 | | // Sentinel = 'TEGLImageDescriptor' |
4133 | | (aMsg)->WriteSentinel(2680446099); |
4134 | | return; |
4135 | | } |
4136 | | case union__::TSurfaceDescriptorMacIOSurface: |
4137 | | { |
4138 | | WriteIPDLParam(aMsg, aActor, (aVar).get_SurfaceDescriptorMacIOSurface()); |
4139 | | // Sentinel = 'TSurfaceDescriptorMacIOSurface' |
4140 | | (aMsg)->WriteSentinel(4267688786); |
4141 | | return; |
4142 | | } |
4143 | | case union__::TSurfaceDescriptorSharedGLTexture: |
4144 | | { |
4145 | | WriteIPDLParam(aMsg, aActor, (aVar).get_SurfaceDescriptorSharedGLTexture()); |
4146 | | // Sentinel = 'TSurfaceDescriptorSharedGLTexture' |
4147 | | (aMsg)->WriteSentinel(4169514976); |
4148 | | return; |
4149 | | } |
4150 | | case union__::TSurfaceDescriptorGPUVideo: |
4151 | | { |
4152 | | WriteIPDLParam(aMsg, aActor, (aVar).get_SurfaceDescriptorGPUVideo()); |
4153 | | // Sentinel = 'TSurfaceDescriptorGPUVideo' |
4154 | | (aMsg)->WriteSentinel(2406892431); |
4155 | | return; |
4156 | | } |
4157 | | case union__::Tnull_t: |
4158 | | { |
4159 | | WriteIPDLParam(aMsg, aActor, (aVar).get_null_t()); |
4160 | | // Sentinel = 'Tnull_t' |
4161 | | (aMsg)->WriteSentinel(3731137201); |
4162 | | return; |
4163 | | } |
4164 | | default: |
4165 | | { |
4166 | | (aActor)->FatalError("unknown union type"); |
4167 | | return; |
4168 | | } |
4169 | | } |
4170 | | } |
4171 | | |
4172 | | auto IPDLParamTraits<mozilla::layers::SurfaceDescriptor>::Read( |
4173 | | const IPC::Message* aMsg, |
4174 | | PickleIterator* aIter, |
4175 | | mozilla::ipc::IProtocol* aActor, |
4176 | | paramType* aVar) -> bool |
4177 | 0 | { |
4178 | 0 | typedef mozilla::layers::SurfaceDescriptor union__; |
4179 | 0 | int type; |
4180 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) { |
4181 | 0 | (aActor)->FatalError("Error deserializing type of union SurfaceDescriptor"); |
4182 | 0 | return false; |
4183 | 0 | } |
4184 | 0 | // Sentinel = 'SurfaceDescriptor' |
4185 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1058499359)))) { |
4186 | 0 | mozilla::ipc::SentinelReadError("Error deserializing type of union SurfaceDescriptor"); |
4187 | 0 | return false; |
4188 | 0 | } |
4189 | 0 | |
4190 | 0 | switch (type) { |
4191 | 0 | case union__::TSurfaceDescriptorBuffer: |
4192 | 0 | { |
4193 | 0 | mozilla::layers::SurfaceDescriptorBuffer tmp = mozilla::layers::SurfaceDescriptorBuffer(); |
4194 | 0 | (*(aVar)) = tmp; |
4195 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SurfaceDescriptorBuffer())))))) { |
4196 | 0 | (aActor)->FatalError("Error deserializing variant TSurfaceDescriptorBuffer of union SurfaceDescriptor"); |
4197 | 0 | return false; |
4198 | 0 | } |
4199 | 0 | // Sentinel = 'TSurfaceDescriptorBuffer' |
4200 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2202696360)))) { |
4201 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TSurfaceDescriptorBuffer of union SurfaceDescriptor"); |
4202 | 0 | return false; |
4203 | 0 | } |
4204 | 0 | return true; |
4205 | 0 | } |
4206 | 0 | case union__::TSurfaceDescriptorDIB: |
4207 | 0 | { |
4208 | 0 | mozilla::layers::SurfaceDescriptorDIB tmp = mozilla::layers::SurfaceDescriptorDIB(); |
4209 | 0 | (*(aVar)) = tmp; |
4210 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SurfaceDescriptorDIB())))))) { |
4211 | 0 | (aActor)->FatalError("Error deserializing variant TSurfaceDescriptorDIB of union SurfaceDescriptor"); |
4212 | 0 | return false; |
4213 | 0 | } |
4214 | 0 | // Sentinel = 'TSurfaceDescriptorDIB' |
4215 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 998410538)))) { |
4216 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TSurfaceDescriptorDIB of union SurfaceDescriptor"); |
4217 | 0 | return false; |
4218 | 0 | } |
4219 | 0 | return true; |
4220 | 0 | } |
4221 | 0 | case union__::TSurfaceDescriptorD3D10: |
4222 | 0 | { |
4223 | 0 | mozilla::layers::SurfaceDescriptorD3D10 tmp = mozilla::layers::SurfaceDescriptorD3D10(); |
4224 | 0 | (*(aVar)) = tmp; |
4225 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SurfaceDescriptorD3D10())))))) { |
4226 | 0 | (aActor)->FatalError("Error deserializing variant TSurfaceDescriptorD3D10 of union SurfaceDescriptor"); |
4227 | 0 | return false; |
4228 | 0 | } |
4229 | 0 | // Sentinel = 'TSurfaceDescriptorD3D10' |
4230 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2753564567)))) { |
4231 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TSurfaceDescriptorD3D10 of union SurfaceDescriptor"); |
4232 | 0 | return false; |
4233 | 0 | } |
4234 | 0 | return true; |
4235 | 0 | } |
4236 | 0 | case union__::TSurfaceDescriptorFileMapping: |
4237 | 0 | { |
4238 | 0 | mozilla::layers::SurfaceDescriptorFileMapping tmp = mozilla::layers::SurfaceDescriptorFileMapping(); |
4239 | 0 | (*(aVar)) = tmp; |
4240 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SurfaceDescriptorFileMapping())))))) { |
4241 | 0 | (aActor)->FatalError("Error deserializing variant TSurfaceDescriptorFileMapping of union SurfaceDescriptor"); |
4242 | 0 | return false; |
4243 | 0 | } |
4244 | 0 | // Sentinel = 'TSurfaceDescriptorFileMapping' |
4245 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 722196935)))) { |
4246 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TSurfaceDescriptorFileMapping of union SurfaceDescriptor"); |
4247 | 0 | return false; |
4248 | 0 | } |
4249 | 0 | return true; |
4250 | 0 | } |
4251 | 0 | case union__::TSurfaceDescriptorDXGIYCbCr: |
4252 | 0 | { |
4253 | 0 | mozilla::layers::SurfaceDescriptorDXGIYCbCr tmp = mozilla::layers::SurfaceDescriptorDXGIYCbCr(); |
4254 | 0 | (*(aVar)) = tmp; |
4255 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SurfaceDescriptorDXGIYCbCr())))))) { |
4256 | 0 | (aActor)->FatalError("Error deserializing variant TSurfaceDescriptorDXGIYCbCr of union SurfaceDescriptor"); |
4257 | 0 | return false; |
4258 | 0 | } |
4259 | 0 | // Sentinel = 'TSurfaceDescriptorDXGIYCbCr' |
4260 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3061212892)))) { |
4261 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TSurfaceDescriptorDXGIYCbCr of union SurfaceDescriptor"); |
4262 | 0 | return false; |
4263 | 0 | } |
4264 | 0 | return true; |
4265 | 0 | } |
4266 | 0 | case union__::TSurfaceDescriptorX11: |
4267 | 0 | { |
4268 | 0 | mozilla::layers::SurfaceDescriptorX11 tmp = mozilla::layers::SurfaceDescriptorX11(); |
4269 | 0 | (*(aVar)) = tmp; |
4270 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SurfaceDescriptorX11())))))) { |
4271 | 0 | (aActor)->FatalError("Error deserializing variant TSurfaceDescriptorX11 of union SurfaceDescriptor"); |
4272 | 0 | return false; |
4273 | 0 | } |
4274 | 0 | // Sentinel = 'TSurfaceDescriptorX11' |
4275 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3923930613)))) { |
4276 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TSurfaceDescriptorX11 of union SurfaceDescriptor"); |
4277 | 0 | return false; |
4278 | 0 | } |
4279 | 0 | return true; |
4280 | 0 | } |
4281 | 0 | case union__::TSurfaceTextureDescriptor: |
4282 | 0 | { |
4283 | 0 | mozilla::layers::SurfaceTextureDescriptor tmp = mozilla::layers::SurfaceTextureDescriptor(); |
4284 | 0 | (*(aVar)) = tmp; |
4285 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SurfaceTextureDescriptor())))))) { |
4286 | 0 | (aActor)->FatalError("Error deserializing variant TSurfaceTextureDescriptor of union SurfaceDescriptor"); |
4287 | 0 | return false; |
4288 | 0 | } |
4289 | 0 | // Sentinel = 'TSurfaceTextureDescriptor' |
4290 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2253946800)))) { |
4291 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TSurfaceTextureDescriptor of union SurfaceDescriptor"); |
4292 | 0 | return false; |
4293 | 0 | } |
4294 | 0 | return true; |
4295 | 0 | } |
4296 | 0 | case union__::TEGLImageDescriptor: |
4297 | 0 | { |
4298 | 0 | mozilla::layers::EGLImageDescriptor tmp = mozilla::layers::EGLImageDescriptor(); |
4299 | 0 | (*(aVar)) = tmp; |
4300 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_EGLImageDescriptor())))))) { |
4301 | 0 | (aActor)->FatalError("Error deserializing variant TEGLImageDescriptor of union SurfaceDescriptor"); |
4302 | 0 | return false; |
4303 | 0 | } |
4304 | 0 | // Sentinel = 'TEGLImageDescriptor' |
4305 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2680446099)))) { |
4306 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TEGLImageDescriptor of union SurfaceDescriptor"); |
4307 | 0 | return false; |
4308 | 0 | } |
4309 | 0 | return true; |
4310 | 0 | } |
4311 | 0 | case union__::TSurfaceDescriptorMacIOSurface: |
4312 | 0 | { |
4313 | 0 | mozilla::layers::SurfaceDescriptorMacIOSurface tmp = mozilla::layers::SurfaceDescriptorMacIOSurface(); |
4314 | 0 | (*(aVar)) = tmp; |
4315 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SurfaceDescriptorMacIOSurface())))))) { |
4316 | 0 | (aActor)->FatalError("Error deserializing variant TSurfaceDescriptorMacIOSurface of union SurfaceDescriptor"); |
4317 | 0 | return false; |
4318 | 0 | } |
4319 | 0 | // Sentinel = 'TSurfaceDescriptorMacIOSurface' |
4320 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 4267688786)))) { |
4321 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TSurfaceDescriptorMacIOSurface of union SurfaceDescriptor"); |
4322 | 0 | return false; |
4323 | 0 | } |
4324 | 0 | return true; |
4325 | 0 | } |
4326 | 0 | case union__::TSurfaceDescriptorSharedGLTexture: |
4327 | 0 | { |
4328 | 0 | mozilla::layers::SurfaceDescriptorSharedGLTexture tmp = mozilla::layers::SurfaceDescriptorSharedGLTexture(); |
4329 | 0 | (*(aVar)) = tmp; |
4330 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SurfaceDescriptorSharedGLTexture())))))) { |
4331 | 0 | (aActor)->FatalError("Error deserializing variant TSurfaceDescriptorSharedGLTexture of union SurfaceDescriptor"); |
4332 | 0 | return false; |
4333 | 0 | } |
4334 | 0 | // Sentinel = 'TSurfaceDescriptorSharedGLTexture' |
4335 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 4169514976)))) { |
4336 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TSurfaceDescriptorSharedGLTexture of union SurfaceDescriptor"); |
4337 | 0 | return false; |
4338 | 0 | } |
4339 | 0 | return true; |
4340 | 0 | } |
4341 | 0 | case union__::TSurfaceDescriptorGPUVideo: |
4342 | 0 | { |
4343 | 0 | mozilla::layers::SurfaceDescriptorGPUVideo tmp = mozilla::layers::SurfaceDescriptorGPUVideo(); |
4344 | 0 | (*(aVar)) = tmp; |
4345 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SurfaceDescriptorGPUVideo())))))) { |
4346 | 0 | (aActor)->FatalError("Error deserializing variant TSurfaceDescriptorGPUVideo of union SurfaceDescriptor"); |
4347 | 0 | return false; |
4348 | 0 | } |
4349 | 0 | // Sentinel = 'TSurfaceDescriptorGPUVideo' |
4350 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2406892431)))) { |
4351 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TSurfaceDescriptorGPUVideo of union SurfaceDescriptor"); |
4352 | 0 | return false; |
4353 | 0 | } |
4354 | 0 | return true; |
4355 | 0 | } |
4356 | 0 | case union__::Tnull_t: |
4357 | 0 | { |
4358 | 0 | mozilla::null_t tmp = mozilla::null_t(); |
4359 | 0 | (*(aVar)) = tmp; |
4360 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_null_t())))))) { |
4361 | 0 | (aActor)->FatalError("Error deserializing variant Tnull_t of union SurfaceDescriptor"); |
4362 | 0 | return false; |
4363 | 0 | } |
4364 | 0 | // Sentinel = 'Tnull_t' |
4365 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3731137201)))) { |
4366 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant Tnull_t of union SurfaceDescriptor"); |
4367 | 0 | return false; |
4368 | 0 | } |
4369 | 0 | return true; |
4370 | 0 | } |
4371 | 0 | default: |
4372 | 0 | { |
4373 | 0 | (aActor)->FatalError("unknown union type"); |
4374 | 0 | return false; |
4375 | 0 | } |
4376 | 0 | } |
4377 | 0 | } |
4378 | | |
4379 | | } // namespace ipc |
4380 | | } // namespace mozilla |