/work/obj-fuzz/ipc/ipdl/PCompositorManager.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/GfxMessageUtils.h" |
8 | | #include "mozilla/layers/WebRenderMessageUtils.h" |
9 | | #include "mozilla/layers/PCompositorBridgeParent.h" |
10 | | #include "mozilla/layers/PCompositorBridgeChild.h" |
11 | | #include "mozilla/layers/PCompositorManager.h" |
12 | | |
13 | | namespace mozilla { |
14 | | namespace layers { |
15 | | namespace PCompositorManager { |
16 | | |
17 | | nsresult |
18 | | CreateEndpoints( |
19 | | base::ProcessId aParentDestPid, |
20 | | base::ProcessId aChildDestPid, |
21 | | mozilla::ipc::Endpoint<mozilla::layers::PCompositorManagerParent>* aParent, |
22 | | mozilla::ipc::Endpoint<mozilla::layers::PCompositorManagerChild>* aChild) |
23 | 0 | { |
24 | 0 | return mozilla::ipc::CreateEndpoints(mozilla::ipc::PrivateIPDLInterface(), aParentDestPid, aChildDestPid, aParent, aChild); |
25 | 0 | } |
26 | | IPC::Message* |
27 | | Msg_PCompositorBridgeConstructor(int32_t routingId) |
28 | 0 | { |
29 | 0 | return IPC::Message::IPDLMessage(routingId, Msg_PCompositorBridgeConstructor__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY)); |
30 | 0 | } |
31 | | IPC::Message* |
32 | | Reply_PCompositorBridgeConstructor(int32_t routingId) |
33 | 0 | { |
34 | 0 | return IPC::Message::IPDLMessage(routingId, Reply_PCompositorBridgeConstructor__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::REPLY)); |
35 | 0 | } |
36 | | IPC::Message* |
37 | | Msg_AddSharedSurface(int32_t routingId) |
38 | 0 | { |
39 | 0 | return IPC::Message::IPDLMessage(routingId, Msg_AddSharedSurface__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY)); |
40 | 0 | } |
41 | | IPC::Message* |
42 | | Msg_RemoveSharedSurface(int32_t routingId) |
43 | 0 | { |
44 | 0 | return IPC::Message::IPDLMessage(routingId, Msg_RemoveSharedSurface__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY)); |
45 | 0 | } |
46 | | IPC::Message* |
47 | | Msg_NotifyMemoryPressure(int32_t routingId) |
48 | 0 | { |
49 | 0 | return IPC::Message::IPDLMessage(routingId, Msg_NotifyMemoryPressure__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY)); |
50 | 0 | } |
51 | | IPC::Message* |
52 | | Msg_ReportMemory(int32_t routingId) |
53 | 0 | { |
54 | 0 | return IPC::Message::IPDLMessage(routingId, Msg_ReportMemory__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY)); |
55 | 0 | } |
56 | | IPC::Message* |
57 | | Reply_ReportMemory(int32_t routingId) |
58 | 0 | { |
59 | 0 | return IPC::Message::IPDLMessage(routingId, Reply_ReportMemory__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::REPLY)); |
60 | 0 | } |
61 | | |
62 | | } // namespace PCompositorManager |
63 | | } // namespace layers |
64 | | } // namespace mozilla |
65 | | |
66 | | //----------------------------------------------------------------------------- |
67 | | // Method definitions for the IPDL type |struct WidgetCompositorOptions| |
68 | | // |
69 | | namespace mozilla { |
70 | | namespace layers { |
71 | | auto WidgetCompositorOptions::operator==(const WidgetCompositorOptions& _o) const -> bool |
72 | 0 | { |
73 | 0 | if ((!((scale()) == ((_o).scale())))) { |
74 | 0 | return false; |
75 | 0 | } |
76 | 0 | if ((!((vsyncRate()) == ((_o).vsyncRate())))) { |
77 | 0 | return false; |
78 | 0 | } |
79 | 0 | if ((!((options()) == ((_o).options())))) { |
80 | 0 | return false; |
81 | 0 | } |
82 | 0 | if ((!((useExternalSurfaceSize()) == ((_o).useExternalSurfaceSize())))) { |
83 | 0 | return false; |
84 | 0 | } |
85 | 0 | if ((!((surfaceSize()) == ((_o).surfaceSize())))) { |
86 | 0 | return false; |
87 | 0 | } |
88 | 0 | return true; |
89 | 0 | } |
90 | | |
91 | | auto WidgetCompositorOptions::operator!=(const WidgetCompositorOptions& _o) const -> bool |
92 | 0 | { |
93 | 0 | return (!(operator==(_o))); |
94 | 0 | } |
95 | | |
96 | | } // namespace layers |
97 | | } // namespace mozilla |
98 | | |
99 | | namespace mozilla { |
100 | | namespace ipc { |
101 | | auto IPDLParamTraits<mozilla::layers::WidgetCompositorOptions>::Write( |
102 | | IPC::Message* aMsg, |
103 | | mozilla::ipc::IProtocol* aActor, |
104 | | const paramType& aVar) -> void |
105 | 0 | { |
106 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).scale()); |
107 | 0 | // Sentinel = 'scale' |
108 | 0 | (aMsg)->WriteSentinel(590599843); |
109 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).vsyncRate()); |
110 | 0 | // Sentinel = 'vsyncRate' |
111 | 0 | (aMsg)->WriteSentinel(1568351920); |
112 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).options()); |
113 | 0 | // Sentinel = 'options' |
114 | 0 | (aMsg)->WriteSentinel(33222909); |
115 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).useExternalSurfaceSize()); |
116 | 0 | // Sentinel = 'useExternalSurfaceSize' |
117 | 0 | (aMsg)->WriteSentinel(778777080); |
118 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).surfaceSize()); |
119 | 0 | // Sentinel = 'surfaceSize' |
120 | 0 | (aMsg)->WriteSentinel(87441173); |
121 | 0 | } |
122 | | |
123 | | auto IPDLParamTraits<mozilla::layers::WidgetCompositorOptions>::Read( |
124 | | const IPC::Message* aMsg, |
125 | | PickleIterator* aIter, |
126 | | mozilla::ipc::IProtocol* aActor, |
127 | | paramType* aVar) -> bool |
128 | 0 | { |
129 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->scale())))))) { |
130 | 0 | (aActor)->FatalError("Error deserializing 'scale' (CSSToLayoutDeviceScale) member of 'WidgetCompositorOptions'"); |
131 | 0 | return false; |
132 | 0 | } |
133 | 0 | // Sentinel = 'scale' |
134 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 590599843)))) { |
135 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'scale' (CSSToLayoutDeviceScale) member of 'WidgetCompositorOptions'"); |
136 | 0 | return false; |
137 | 0 | } |
138 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->vsyncRate())))))) { |
139 | 0 | (aActor)->FatalError("Error deserializing 'vsyncRate' (TimeDuration) member of 'WidgetCompositorOptions'"); |
140 | 0 | return false; |
141 | 0 | } |
142 | 0 | // Sentinel = 'vsyncRate' |
143 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1568351920)))) { |
144 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'vsyncRate' (TimeDuration) member of 'WidgetCompositorOptions'"); |
145 | 0 | return false; |
146 | 0 | } |
147 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->options())))))) { |
148 | 0 | (aActor)->FatalError("Error deserializing 'options' (CompositorOptions) member of 'WidgetCompositorOptions'"); |
149 | 0 | return false; |
150 | 0 | } |
151 | 0 | // Sentinel = 'options' |
152 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 33222909)))) { |
153 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'options' (CompositorOptions) member of 'WidgetCompositorOptions'"); |
154 | 0 | return false; |
155 | 0 | } |
156 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->useExternalSurfaceSize())))))) { |
157 | 0 | (aActor)->FatalError("Error deserializing 'useExternalSurfaceSize' (bool) member of 'WidgetCompositorOptions'"); |
158 | 0 | return false; |
159 | 0 | } |
160 | 0 | // Sentinel = 'useExternalSurfaceSize' |
161 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 778777080)))) { |
162 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'useExternalSurfaceSize' (bool) member of 'WidgetCompositorOptions'"); |
163 | 0 | return false; |
164 | 0 | } |
165 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->surfaceSize())))))) { |
166 | 0 | (aActor)->FatalError("Error deserializing 'surfaceSize' (IntSize) member of 'WidgetCompositorOptions'"); |
167 | 0 | return false; |
168 | 0 | } |
169 | 0 | // Sentinel = 'surfaceSize' |
170 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 87441173)))) { |
171 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'surfaceSize' (IntSize) member of 'WidgetCompositorOptions'"); |
172 | 0 | return false; |
173 | 0 | } |
174 | 0 | return true; |
175 | 0 | } |
176 | | |
177 | | } // namespace ipc |
178 | | } // namespace mozilla |
179 | | |
180 | | //----------------------------------------------------------------------------- |
181 | | // Method definitions for the IPDL type |struct ContentCompositorOptions| |
182 | | // |
183 | | namespace mozilla { |
184 | | namespace layers { |
185 | | auto ContentCompositorOptions::operator==(const ContentCompositorOptions& _o) const -> bool |
186 | 0 | { |
187 | 0 | return true; |
188 | 0 | } |
189 | | |
190 | | auto ContentCompositorOptions::operator!=(const ContentCompositorOptions& _o) const -> bool |
191 | 0 | { |
192 | 0 | return (!(operator==(_o))); |
193 | 0 | } |
194 | | |
195 | | } // namespace layers |
196 | | } // namespace mozilla |
197 | | |
198 | | namespace mozilla { |
199 | | namespace ipc { |
200 | | auto IPDLParamTraits<mozilla::layers::ContentCompositorOptions>::Write( |
201 | | IPC::Message* aMsg, |
202 | | mozilla::ipc::IProtocol* aActor, |
203 | | const paramType& aVar) -> void |
204 | 0 | { |
205 | 0 | } |
206 | | |
207 | | auto IPDLParamTraits<mozilla::layers::ContentCompositorOptions>::Read( |
208 | | const IPC::Message* aMsg, |
209 | | PickleIterator* aIter, |
210 | | mozilla::ipc::IProtocol* aActor, |
211 | | paramType* aVar) -> bool |
212 | 0 | { |
213 | 0 | return true; |
214 | 0 | } |
215 | | |
216 | | } // namespace ipc |
217 | | } // namespace mozilla |
218 | | |
219 | | //----------------------------------------------------------------------------- |
220 | | // Method definitions for the IPDL type |struct SameProcessWidgetCompositorOptions| |
221 | | // |
222 | | namespace mozilla { |
223 | | namespace layers { |
224 | | auto SameProcessWidgetCompositorOptions::operator==(const SameProcessWidgetCompositorOptions& _o) const -> bool |
225 | 0 | { |
226 | 0 | return true; |
227 | 0 | } |
228 | | |
229 | | auto SameProcessWidgetCompositorOptions::operator!=(const SameProcessWidgetCompositorOptions& _o) const -> bool |
230 | 0 | { |
231 | 0 | return (!(operator==(_o))); |
232 | 0 | } |
233 | | |
234 | | } // namespace layers |
235 | | } // namespace mozilla |
236 | | |
237 | | namespace mozilla { |
238 | | namespace ipc { |
239 | | auto IPDLParamTraits<mozilla::layers::SameProcessWidgetCompositorOptions>::Write( |
240 | | IPC::Message* aMsg, |
241 | | mozilla::ipc::IProtocol* aActor, |
242 | | const paramType& aVar) -> void |
243 | 0 | { |
244 | 0 | } |
245 | | |
246 | | auto IPDLParamTraits<mozilla::layers::SameProcessWidgetCompositorOptions>::Read( |
247 | | const IPC::Message* aMsg, |
248 | | PickleIterator* aIter, |
249 | | mozilla::ipc::IProtocol* aActor, |
250 | | paramType* aVar) -> bool |
251 | 0 | { |
252 | 0 | return true; |
253 | 0 | } |
254 | | |
255 | | } // namespace ipc |
256 | | } // namespace mozilla |
257 | | |
258 | | //----------------------------------------------------------------------------- |
259 | | // Method definitions for the IPDL type |union CompositorBridgeOptions| |
260 | | // |
261 | | namespace mozilla { |
262 | | namespace layers { |
263 | | auto CompositorBridgeOptions::MaybeDestroy(Type aNewType) -> bool |
264 | 0 | { |
265 | 0 | if ((mType) == (T__None)) { |
266 | 0 | return true; |
267 | 0 | } |
268 | 0 | if ((mType) == (aNewType)) { |
269 | 0 | return false; |
270 | 0 | } |
271 | 0 | switch (mType) { |
272 | 0 | case TContentCompositorOptions: |
273 | 0 | { |
274 | 0 | (ptr_ContentCompositorOptions())->~ContentCompositorOptions__tdef(); |
275 | 0 | break; |
276 | 0 | } |
277 | 0 | case TWidgetCompositorOptions: |
278 | 0 | { |
279 | 0 | (ptr_WidgetCompositorOptions())->~WidgetCompositorOptions__tdef(); |
280 | 0 | break; |
281 | 0 | } |
282 | 0 | case TSameProcessWidgetCompositorOptions: |
283 | 0 | { |
284 | 0 | (ptr_SameProcessWidgetCompositorOptions())->~SameProcessWidgetCompositorOptions__tdef(); |
285 | 0 | break; |
286 | 0 | } |
287 | 0 | default: |
288 | 0 | { |
289 | 0 | mozilla::ipc::LogicError("not reached"); |
290 | 0 | break; |
291 | 0 | } |
292 | 0 | } |
293 | 0 | return true; |
294 | 0 | } |
295 | | |
296 | | MOZ_IMPLICIT CompositorBridgeOptions::CompositorBridgeOptions(const ContentCompositorOptions& aOther) |
297 | 0 | { |
298 | 0 | new (mozilla::KnownNotNull, ptr_ContentCompositorOptions()) ContentCompositorOptions(aOther); |
299 | 0 | mType = TContentCompositorOptions; |
300 | 0 | } |
301 | | |
302 | | MOZ_IMPLICIT CompositorBridgeOptions::CompositorBridgeOptions(ContentCompositorOptions&& aOther) |
303 | 0 | { |
304 | 0 | new (mozilla::KnownNotNull, ptr_ContentCompositorOptions()) ContentCompositorOptions(std::move(aOther)); |
305 | 0 | mType = TContentCompositorOptions; |
306 | 0 | } |
307 | | |
308 | | MOZ_IMPLICIT CompositorBridgeOptions::CompositorBridgeOptions(const WidgetCompositorOptions& aOther) |
309 | 0 | { |
310 | 0 | new (mozilla::KnownNotNull, ptr_WidgetCompositorOptions()) WidgetCompositorOptions(aOther); |
311 | 0 | mType = TWidgetCompositorOptions; |
312 | 0 | } |
313 | | |
314 | | MOZ_IMPLICIT CompositorBridgeOptions::CompositorBridgeOptions(WidgetCompositorOptions&& aOther) |
315 | 0 | { |
316 | 0 | new (mozilla::KnownNotNull, ptr_WidgetCompositorOptions()) WidgetCompositorOptions(std::move(aOther)); |
317 | 0 | mType = TWidgetCompositorOptions; |
318 | 0 | } |
319 | | |
320 | | MOZ_IMPLICIT CompositorBridgeOptions::CompositorBridgeOptions(const SameProcessWidgetCompositorOptions& aOther) |
321 | 0 | { |
322 | 0 | new (mozilla::KnownNotNull, ptr_SameProcessWidgetCompositorOptions()) SameProcessWidgetCompositorOptions(aOther); |
323 | 0 | mType = TSameProcessWidgetCompositorOptions; |
324 | 0 | } |
325 | | |
326 | | MOZ_IMPLICIT CompositorBridgeOptions::CompositorBridgeOptions(SameProcessWidgetCompositorOptions&& aOther) |
327 | 0 | { |
328 | 0 | new (mozilla::KnownNotNull, ptr_SameProcessWidgetCompositorOptions()) SameProcessWidgetCompositorOptions(std::move(aOther)); |
329 | 0 | mType = TSameProcessWidgetCompositorOptions; |
330 | 0 | } |
331 | | |
332 | | MOZ_IMPLICIT CompositorBridgeOptions::CompositorBridgeOptions(const CompositorBridgeOptions& aOther) |
333 | 0 | { |
334 | 0 | (aOther).AssertSanity(); |
335 | 0 | switch ((aOther).type()) { |
336 | 0 | case TContentCompositorOptions: |
337 | 0 | { |
338 | 0 | new (mozilla::KnownNotNull, ptr_ContentCompositorOptions()) ContentCompositorOptions((aOther).get_ContentCompositorOptions()); |
339 | 0 | break; |
340 | 0 | } |
341 | 0 | case TWidgetCompositorOptions: |
342 | 0 | { |
343 | 0 | new (mozilla::KnownNotNull, ptr_WidgetCompositorOptions()) WidgetCompositorOptions((aOther).get_WidgetCompositorOptions()); |
344 | 0 | break; |
345 | 0 | } |
346 | 0 | case TSameProcessWidgetCompositorOptions: |
347 | 0 | { |
348 | 0 | new (mozilla::KnownNotNull, ptr_SameProcessWidgetCompositorOptions()) SameProcessWidgetCompositorOptions((aOther).get_SameProcessWidgetCompositorOptions()); |
349 | 0 | break; |
350 | 0 | } |
351 | 0 | case T__None: |
352 | 0 | { |
353 | 0 | break; |
354 | 0 | } |
355 | 0 | default: |
356 | 0 | { |
357 | 0 | mozilla::ipc::LogicError("unreached"); |
358 | 0 | return; |
359 | 0 | } |
360 | 0 | } |
361 | 0 | mType = (aOther).type(); |
362 | 0 | } |
363 | | |
364 | | MOZ_IMPLICIT CompositorBridgeOptions::CompositorBridgeOptions(CompositorBridgeOptions&& aOther) |
365 | 0 | { |
366 | 0 | (aOther).AssertSanity(); |
367 | 0 | Type t = (aOther).type(); |
368 | 0 | switch (t) { |
369 | 0 | case TContentCompositorOptions: |
370 | 0 | { |
371 | 0 | new (mozilla::KnownNotNull, ptr_ContentCompositorOptions()) ContentCompositorOptions(std::move((aOther).get_ContentCompositorOptions())); |
372 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
373 | 0 | break; |
374 | 0 | } |
375 | 0 | case TWidgetCompositorOptions: |
376 | 0 | { |
377 | 0 | new (mozilla::KnownNotNull, ptr_WidgetCompositorOptions()) WidgetCompositorOptions(std::move((aOther).get_WidgetCompositorOptions())); |
378 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
379 | 0 | break; |
380 | 0 | } |
381 | 0 | case TSameProcessWidgetCompositorOptions: |
382 | 0 | { |
383 | 0 | new (mozilla::KnownNotNull, ptr_SameProcessWidgetCompositorOptions()) SameProcessWidgetCompositorOptions(std::move((aOther).get_SameProcessWidgetCompositorOptions())); |
384 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
385 | 0 | break; |
386 | 0 | } |
387 | 0 | case T__None: |
388 | 0 | { |
389 | 0 | break; |
390 | 0 | } |
391 | 0 | default: |
392 | 0 | { |
393 | 0 | mozilla::ipc::LogicError("unreached"); |
394 | 0 | return; |
395 | 0 | } |
396 | 0 | } |
397 | 0 | (aOther).mType = T__None; |
398 | 0 | mType = t; |
399 | 0 | } |
400 | | |
401 | | CompositorBridgeOptions::~CompositorBridgeOptions() |
402 | 0 | { |
403 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
404 | 0 | } |
405 | | |
406 | | auto CompositorBridgeOptions::operator=(const ContentCompositorOptions& aRhs) -> CompositorBridgeOptions& |
407 | 0 | { |
408 | 0 | if (MaybeDestroy(TContentCompositorOptions)) { |
409 | 0 | new (mozilla::KnownNotNull, ptr_ContentCompositorOptions()) ContentCompositorOptions; |
410 | 0 | } |
411 | 0 | (*(ptr_ContentCompositorOptions())) = aRhs; |
412 | 0 | mType = TContentCompositorOptions; |
413 | 0 | return (*(this)); |
414 | 0 | } |
415 | | |
416 | | auto CompositorBridgeOptions::operator=(ContentCompositorOptions&& aRhs) -> CompositorBridgeOptions& |
417 | 0 | { |
418 | 0 | if (MaybeDestroy(TContentCompositorOptions)) { |
419 | 0 | new (mozilla::KnownNotNull, ptr_ContentCompositorOptions()) ContentCompositorOptions; |
420 | 0 | } |
421 | 0 | (*(ptr_ContentCompositorOptions())) = std::move(aRhs); |
422 | 0 | mType = TContentCompositorOptions; |
423 | 0 | return (*(this)); |
424 | 0 | } |
425 | | |
426 | | auto CompositorBridgeOptions::operator=(const WidgetCompositorOptions& aRhs) -> CompositorBridgeOptions& |
427 | 0 | { |
428 | 0 | if (MaybeDestroy(TWidgetCompositorOptions)) { |
429 | 0 | new (mozilla::KnownNotNull, ptr_WidgetCompositorOptions()) WidgetCompositorOptions; |
430 | 0 | } |
431 | 0 | (*(ptr_WidgetCompositorOptions())) = aRhs; |
432 | 0 | mType = TWidgetCompositorOptions; |
433 | 0 | return (*(this)); |
434 | 0 | } |
435 | | |
436 | | auto CompositorBridgeOptions::operator=(WidgetCompositorOptions&& aRhs) -> CompositorBridgeOptions& |
437 | 0 | { |
438 | 0 | if (MaybeDestroy(TWidgetCompositorOptions)) { |
439 | 0 | new (mozilla::KnownNotNull, ptr_WidgetCompositorOptions()) WidgetCompositorOptions; |
440 | 0 | } |
441 | 0 | (*(ptr_WidgetCompositorOptions())) = std::move(aRhs); |
442 | 0 | mType = TWidgetCompositorOptions; |
443 | 0 | return (*(this)); |
444 | 0 | } |
445 | | |
446 | | auto CompositorBridgeOptions::operator=(const SameProcessWidgetCompositorOptions& aRhs) -> CompositorBridgeOptions& |
447 | 0 | { |
448 | 0 | if (MaybeDestroy(TSameProcessWidgetCompositorOptions)) { |
449 | 0 | new (mozilla::KnownNotNull, ptr_SameProcessWidgetCompositorOptions()) SameProcessWidgetCompositorOptions; |
450 | 0 | } |
451 | 0 | (*(ptr_SameProcessWidgetCompositorOptions())) = aRhs; |
452 | 0 | mType = TSameProcessWidgetCompositorOptions; |
453 | 0 | return (*(this)); |
454 | 0 | } |
455 | | |
456 | | auto CompositorBridgeOptions::operator=(SameProcessWidgetCompositorOptions&& aRhs) -> CompositorBridgeOptions& |
457 | 0 | { |
458 | 0 | if (MaybeDestroy(TSameProcessWidgetCompositorOptions)) { |
459 | 0 | new (mozilla::KnownNotNull, ptr_SameProcessWidgetCompositorOptions()) SameProcessWidgetCompositorOptions; |
460 | 0 | } |
461 | 0 | (*(ptr_SameProcessWidgetCompositorOptions())) = std::move(aRhs); |
462 | 0 | mType = TSameProcessWidgetCompositorOptions; |
463 | 0 | return (*(this)); |
464 | 0 | } |
465 | | |
466 | | auto CompositorBridgeOptions::operator=(const CompositorBridgeOptions& aRhs) -> CompositorBridgeOptions& |
467 | 0 | { |
468 | 0 | (aRhs).AssertSanity(); |
469 | 0 | Type t = (aRhs).type(); |
470 | 0 | switch (t) { |
471 | 0 | case TContentCompositorOptions: |
472 | 0 | { |
473 | 0 | if (MaybeDestroy(t)) { |
474 | 0 | new (mozilla::KnownNotNull, ptr_ContentCompositorOptions()) ContentCompositorOptions; |
475 | 0 | } |
476 | 0 | (*(ptr_ContentCompositorOptions())) = (aRhs).get_ContentCompositorOptions(); |
477 | 0 | break; |
478 | 0 | } |
479 | 0 | case TWidgetCompositorOptions: |
480 | 0 | { |
481 | 0 | if (MaybeDestroy(t)) { |
482 | 0 | new (mozilla::KnownNotNull, ptr_WidgetCompositorOptions()) WidgetCompositorOptions; |
483 | 0 | } |
484 | 0 | (*(ptr_WidgetCompositorOptions())) = (aRhs).get_WidgetCompositorOptions(); |
485 | 0 | break; |
486 | 0 | } |
487 | 0 | case TSameProcessWidgetCompositorOptions: |
488 | 0 | { |
489 | 0 | if (MaybeDestroy(t)) { |
490 | 0 | new (mozilla::KnownNotNull, ptr_SameProcessWidgetCompositorOptions()) SameProcessWidgetCompositorOptions; |
491 | 0 | } |
492 | 0 | (*(ptr_SameProcessWidgetCompositorOptions())) = (aRhs).get_SameProcessWidgetCompositorOptions(); |
493 | 0 | break; |
494 | 0 | } |
495 | 0 | case T__None: |
496 | 0 | { |
497 | 0 | static_cast<void>(MaybeDestroy(t)); |
498 | 0 | break; |
499 | 0 | } |
500 | 0 | default: |
501 | 0 | { |
502 | 0 | mozilla::ipc::LogicError("unreached"); |
503 | 0 | break; |
504 | 0 | } |
505 | 0 | } |
506 | 0 | mType = t; |
507 | 0 | return (*(this)); |
508 | 0 | } |
509 | | |
510 | | auto CompositorBridgeOptions::operator=(CompositorBridgeOptions&& aRhs) -> CompositorBridgeOptions& |
511 | 0 | { |
512 | 0 | (aRhs).AssertSanity(); |
513 | 0 | Type t = (aRhs).type(); |
514 | 0 | switch (t) { |
515 | 0 | case TContentCompositorOptions: |
516 | 0 | { |
517 | 0 | if (MaybeDestroy(t)) { |
518 | 0 | new (mozilla::KnownNotNull, ptr_ContentCompositorOptions()) ContentCompositorOptions; |
519 | 0 | } |
520 | 0 | (*(ptr_ContentCompositorOptions())) = std::move((aRhs).get_ContentCompositorOptions()); |
521 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
522 | 0 | break; |
523 | 0 | } |
524 | 0 | case TWidgetCompositorOptions: |
525 | 0 | { |
526 | 0 | if (MaybeDestroy(t)) { |
527 | 0 | new (mozilla::KnownNotNull, ptr_WidgetCompositorOptions()) WidgetCompositorOptions; |
528 | 0 | } |
529 | 0 | (*(ptr_WidgetCompositorOptions())) = std::move((aRhs).get_WidgetCompositorOptions()); |
530 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
531 | 0 | break; |
532 | 0 | } |
533 | 0 | case TSameProcessWidgetCompositorOptions: |
534 | 0 | { |
535 | 0 | if (MaybeDestroy(t)) { |
536 | 0 | new (mozilla::KnownNotNull, ptr_SameProcessWidgetCompositorOptions()) SameProcessWidgetCompositorOptions; |
537 | 0 | } |
538 | 0 | (*(ptr_SameProcessWidgetCompositorOptions())) = std::move((aRhs).get_SameProcessWidgetCompositorOptions()); |
539 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
540 | 0 | break; |
541 | 0 | } |
542 | 0 | case T__None: |
543 | 0 | { |
544 | 0 | static_cast<void>(MaybeDestroy(t)); |
545 | 0 | break; |
546 | 0 | } |
547 | 0 | default: |
548 | 0 | { |
549 | 0 | mozilla::ipc::LogicError("unreached"); |
550 | 0 | break; |
551 | 0 | } |
552 | 0 | } |
553 | 0 | (aRhs).mType = T__None; |
554 | 0 | mType = t; |
555 | 0 | return (*(this)); |
556 | 0 | } |
557 | | |
558 | | auto CompositorBridgeOptions::operator==(const ContentCompositorOptions& aRhs) const -> bool |
559 | 0 | { |
560 | 0 | return (get_ContentCompositorOptions()) == (aRhs); |
561 | 0 | } |
562 | | |
563 | | auto CompositorBridgeOptions::operator==(const WidgetCompositorOptions& aRhs) const -> bool |
564 | 0 | { |
565 | 0 | return (get_WidgetCompositorOptions()) == (aRhs); |
566 | 0 | } |
567 | | |
568 | | auto CompositorBridgeOptions::operator==(const SameProcessWidgetCompositorOptions& aRhs) const -> bool |
569 | 0 | { |
570 | 0 | return (get_SameProcessWidgetCompositorOptions()) == (aRhs); |
571 | 0 | } |
572 | | |
573 | | auto CompositorBridgeOptions::operator==(const CompositorBridgeOptions& aRhs) const -> bool |
574 | 0 | { |
575 | 0 | if ((type()) != ((aRhs).type())) { |
576 | 0 | return false; |
577 | 0 | } |
578 | 0 | |
579 | 0 | switch (type()) { |
580 | 0 | case TContentCompositorOptions: |
581 | 0 | { |
582 | 0 | return (get_ContentCompositorOptions()) == ((aRhs).get_ContentCompositorOptions()); |
583 | 0 | } |
584 | 0 | case TWidgetCompositorOptions: |
585 | 0 | { |
586 | 0 | return (get_WidgetCompositorOptions()) == ((aRhs).get_WidgetCompositorOptions()); |
587 | 0 | } |
588 | 0 | case TSameProcessWidgetCompositorOptions: |
589 | 0 | { |
590 | 0 | return (get_SameProcessWidgetCompositorOptions()) == ((aRhs).get_SameProcessWidgetCompositorOptions()); |
591 | 0 | } |
592 | 0 | default: |
593 | 0 | { |
594 | 0 | mozilla::ipc::LogicError("unreached"); |
595 | 0 | return false; |
596 | 0 | } |
597 | 0 | } |
598 | 0 | } |
599 | | |
600 | | auto CompositorBridgeOptions::get(ContentCompositorOptions* aOutValue) const -> void |
601 | 0 | { |
602 | 0 | (*(aOutValue)) = get_ContentCompositorOptions(); |
603 | 0 | } |
604 | | |
605 | | auto CompositorBridgeOptions::get(WidgetCompositorOptions* aOutValue) const -> void |
606 | 0 | { |
607 | 0 | (*(aOutValue)) = get_WidgetCompositorOptions(); |
608 | 0 | } |
609 | | |
610 | | auto CompositorBridgeOptions::get(SameProcessWidgetCompositorOptions* aOutValue) const -> void |
611 | 0 | { |
612 | 0 | (*(aOutValue)) = get_SameProcessWidgetCompositorOptions(); |
613 | 0 | } |
614 | | |
615 | | } // namespace layers |
616 | | } // namespace mozilla |
617 | | |
618 | | namespace mozilla { |
619 | | namespace ipc { |
620 | | auto IPDLParamTraits<mozilla::layers::CompositorBridgeOptions>::Write( |
621 | | IPC::Message* aMsg, |
622 | | mozilla::ipc::IProtocol* aActor, |
623 | | const paramType& aVar) -> void |
624 | | { |
625 | | typedef mozilla::layers::CompositorBridgeOptions union__; |
626 | | int type; |
627 | | type = (aVar).type(); |
628 | | WriteIPDLParam(aMsg, aActor, type); |
629 | | // Sentinel = 'CompositorBridgeOptions' |
630 | | (aMsg)->WriteSentinel(1223334017); |
631 | | |
632 | | switch (type) { |
633 | | case union__::TContentCompositorOptions: |
634 | | { |
635 | | WriteIPDLParam(aMsg, aActor, (aVar).get_ContentCompositorOptions()); |
636 | | // Sentinel = 'TContentCompositorOptions' |
637 | | (aMsg)->WriteSentinel(660265439); |
638 | | return; |
639 | | } |
640 | | case union__::TWidgetCompositorOptions: |
641 | | { |
642 | | WriteIPDLParam(aMsg, aActor, (aVar).get_WidgetCompositorOptions()); |
643 | | // Sentinel = 'TWidgetCompositorOptions' |
644 | | (aMsg)->WriteSentinel(1740490067); |
645 | | return; |
646 | | } |
647 | | case union__::TSameProcessWidgetCompositorOptions: |
648 | | { |
649 | | WriteIPDLParam(aMsg, aActor, (aVar).get_SameProcessWidgetCompositorOptions()); |
650 | | // Sentinel = 'TSameProcessWidgetCompositorOptions' |
651 | | (aMsg)->WriteSentinel(3995034615); |
652 | | return; |
653 | | } |
654 | | default: |
655 | | { |
656 | | (aActor)->FatalError("unknown union type"); |
657 | | return; |
658 | | } |
659 | | } |
660 | | } |
661 | | |
662 | | auto IPDLParamTraits<mozilla::layers::CompositorBridgeOptions>::Read( |
663 | | const IPC::Message* aMsg, |
664 | | PickleIterator* aIter, |
665 | | mozilla::ipc::IProtocol* aActor, |
666 | | paramType* aVar) -> bool |
667 | 0 | { |
668 | 0 | typedef mozilla::layers::CompositorBridgeOptions union__; |
669 | 0 | int type; |
670 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) { |
671 | 0 | (aActor)->FatalError("Error deserializing type of union CompositorBridgeOptions"); |
672 | 0 | return false; |
673 | 0 | } |
674 | 0 | // Sentinel = 'CompositorBridgeOptions' |
675 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1223334017)))) { |
676 | 0 | mozilla::ipc::SentinelReadError("Error deserializing type of union CompositorBridgeOptions"); |
677 | 0 | return false; |
678 | 0 | } |
679 | 0 | |
680 | 0 | switch (type) { |
681 | 0 | case union__::TContentCompositorOptions: |
682 | 0 | { |
683 | 0 | mozilla::layers::ContentCompositorOptions tmp = mozilla::layers::ContentCompositorOptions(); |
684 | 0 | (*(aVar)) = tmp; |
685 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_ContentCompositorOptions())))))) { |
686 | 0 | (aActor)->FatalError("Error deserializing variant TContentCompositorOptions of union CompositorBridgeOptions"); |
687 | 0 | return false; |
688 | 0 | } |
689 | 0 | // Sentinel = 'TContentCompositorOptions' |
690 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 660265439)))) { |
691 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TContentCompositorOptions of union CompositorBridgeOptions"); |
692 | 0 | return false; |
693 | 0 | } |
694 | 0 | return true; |
695 | 0 | } |
696 | 0 | case union__::TWidgetCompositorOptions: |
697 | 0 | { |
698 | 0 | mozilla::layers::WidgetCompositorOptions tmp = mozilla::layers::WidgetCompositorOptions(); |
699 | 0 | (*(aVar)) = tmp; |
700 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_WidgetCompositorOptions())))))) { |
701 | 0 | (aActor)->FatalError("Error deserializing variant TWidgetCompositorOptions of union CompositorBridgeOptions"); |
702 | 0 | return false; |
703 | 0 | } |
704 | 0 | // Sentinel = 'TWidgetCompositorOptions' |
705 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1740490067)))) { |
706 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TWidgetCompositorOptions of union CompositorBridgeOptions"); |
707 | 0 | return false; |
708 | 0 | } |
709 | 0 | return true; |
710 | 0 | } |
711 | 0 | case union__::TSameProcessWidgetCompositorOptions: |
712 | 0 | { |
713 | 0 | mozilla::layers::SameProcessWidgetCompositorOptions tmp = mozilla::layers::SameProcessWidgetCompositorOptions(); |
714 | 0 | (*(aVar)) = tmp; |
715 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SameProcessWidgetCompositorOptions())))))) { |
716 | 0 | (aActor)->FatalError("Error deserializing variant TSameProcessWidgetCompositorOptions of union CompositorBridgeOptions"); |
717 | 0 | return false; |
718 | 0 | } |
719 | 0 | // Sentinel = 'TSameProcessWidgetCompositorOptions' |
720 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3995034615)))) { |
721 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TSameProcessWidgetCompositorOptions of union CompositorBridgeOptions"); |
722 | 0 | return false; |
723 | 0 | } |
724 | 0 | return true; |
725 | 0 | } |
726 | 0 | default: |
727 | 0 | { |
728 | 0 | (aActor)->FatalError("unknown union type"); |
729 | 0 | return false; |
730 | 0 | } |
731 | 0 | } |
732 | 0 | } |
733 | | |
734 | | } // namespace ipc |
735 | | } // namespace mozilla |