Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/gfx/PGPU.h"
8 :
9 : namespace mozilla {
10 : namespace gfx {
11 : namespace PGPU {
12 :
13 : nsresult
14 0 : CreateEndpoints(
15 : base::ProcessId aParentDestPid,
16 : base::ProcessId aChildDestPid,
17 : mozilla::ipc::Endpoint<mozilla::gfx::PGPUParent>* aParent,
18 : mozilla::ipc::Endpoint<mozilla::gfx::PGPUChild>* aChild)
19 : {
20 0 : return mozilla::ipc::CreateEndpoints(mozilla::ipc::PrivateIPDLInterface(), aParentDestPid, aChildDestPid, PGPUMsgStart, PGPUMsgStartChild, aParent, aChild);
21 : }
22 : void
23 0 : Transition(
24 : MessageType msg,
25 : State* next)
26 : {
27 0 : switch ((*(next))) {
28 : case __Null:
29 0 : break;
30 : case __Dead:
31 0 : mozilla::ipc::LogicError("__delete__()d actor");
32 0 : break;
33 : default:
34 0 : mozilla::ipc::LogicError("corrupted actor state");
35 0 : break;
36 : }
37 0 : }
38 : IPC::Message*
39 0 : Msg_Init(int32_t routingId)
40 : {
41 0 : return new IPC::Message(routingId, Msg_Init__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_Init", true);
42 : }
43 : IPC::Message*
44 0 : Msg_InitCompositorManager(int32_t routingId)
45 : {
46 0 : return new IPC::Message(routingId, Msg_InitCompositorManager__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_InitCompositorManager", true);
47 : }
48 : IPC::Message*
49 0 : Msg_InitVsyncBridge(int32_t routingId)
50 : {
51 0 : return new IPC::Message(routingId, Msg_InitVsyncBridge__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_InitVsyncBridge", true);
52 : }
53 : IPC::Message*
54 0 : Msg_InitImageBridge(int32_t routingId)
55 : {
56 0 : return new IPC::Message(routingId, Msg_InitImageBridge__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_InitImageBridge", true);
57 : }
58 : IPC::Message*
59 0 : Msg_InitVRManager(int32_t routingId)
60 : {
61 0 : return new IPC::Message(routingId, Msg_InitVRManager__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_InitVRManager", true);
62 : }
63 : IPC::Message*
64 0 : Msg_InitUiCompositorController(int32_t routingId)
65 : {
66 0 : return new IPC::Message(routingId, Msg_InitUiCompositorController__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_InitUiCompositorController", true);
67 : }
68 : IPC::Message*
69 0 : Msg_InitProfiler(int32_t routingId)
70 : {
71 0 : return new IPC::Message(routingId, Msg_InitProfiler__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_InitProfiler", true);
72 : }
73 : IPC::Message*
74 0 : Msg_UpdatePref(int32_t routingId)
75 : {
76 0 : return new IPC::Message(routingId, Msg_UpdatePref__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_UpdatePref", true);
77 : }
78 : IPC::Message*
79 0 : Msg_UpdateVar(int32_t routingId)
80 : {
81 0 : return new IPC::Message(routingId, Msg_UpdateVar__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_UpdateVar", true);
82 : }
83 : IPC::Message*
84 0 : Msg_NewContentCompositorManager(int32_t routingId)
85 : {
86 0 : return new IPC::Message(routingId, Msg_NewContentCompositorManager__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_NewContentCompositorManager", true);
87 : }
88 : IPC::Message*
89 0 : Msg_NewContentImageBridge(int32_t routingId)
90 : {
91 0 : return new IPC::Message(routingId, Msg_NewContentImageBridge__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_NewContentImageBridge", true);
92 : }
93 : IPC::Message*
94 0 : Msg_NewContentVRManager(int32_t routingId)
95 : {
96 0 : return new IPC::Message(routingId, Msg_NewContentVRManager__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_NewContentVRManager", true);
97 : }
98 : IPC::Message*
99 0 : Msg_NewContentVideoDecoderManager(int32_t routingId)
100 : {
101 0 : return new IPC::Message(routingId, Msg_NewContentVideoDecoderManager__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_NewContentVideoDecoderManager", true);
102 : }
103 : IPC::Message*
104 0 : Msg_AddLayerTreeIdMapping(int32_t routingId)
105 : {
106 0 : return new IPC::Message(routingId, Msg_AddLayerTreeIdMapping__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_AddLayerTreeIdMapping", true);
107 : }
108 : IPC::Message*
109 0 : Reply_AddLayerTreeIdMapping(int32_t routingId)
110 : {
111 0 : return new IPC::Message(routingId, Reply_AddLayerTreeIdMapping__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Reply_AddLayerTreeIdMapping", true);
112 : }
113 : IPC::Message*
114 0 : Msg_RemoveLayerTreeIdMapping(int32_t routingId)
115 : {
116 0 : return new IPC::Message(routingId, Msg_RemoveLayerTreeIdMapping__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_RemoveLayerTreeIdMapping", true);
117 : }
118 : IPC::Message*
119 0 : Msg_GetDeviceStatus(int32_t routingId)
120 : {
121 0 : return new IPC::Message(routingId, Msg_GetDeviceStatus__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_GetDeviceStatus", true);
122 : }
123 : IPC::Message*
124 0 : Reply_GetDeviceStatus(int32_t routingId)
125 : {
126 0 : return new IPC::Message(routingId, Reply_GetDeviceStatus__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Reply_GetDeviceStatus", true);
127 : }
128 : IPC::Message*
129 0 : Msg_NotifyGpuObservers(int32_t routingId)
130 : {
131 0 : return new IPC::Message(routingId, Msg_NotifyGpuObservers__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_NotifyGpuObservers", true);
132 : }
133 : IPC::Message*
134 0 : Msg_RequestMemoryReport(int32_t routingId)
135 : {
136 0 : return new IPC::Message(routingId, Msg_RequestMemoryReport__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_RequestMemoryReport", true);
137 : }
138 : IPC::Message*
139 0 : Msg_InitComplete(int32_t routingId)
140 : {
141 0 : return new IPC::Message(routingId, Msg_InitComplete__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_InitComplete", true);
142 : }
143 : IPC::Message*
144 0 : Msg_ReportCheckerboard(int32_t routingId)
145 : {
146 0 : return new IPC::Message(routingId, Msg_ReportCheckerboard__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_ReportCheckerboard", true);
147 : }
148 : IPC::Message*
149 0 : Msg_GraphicsError(int32_t routingId)
150 : {
151 0 : return new IPC::Message(routingId, Msg_GraphicsError__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_GraphicsError", true);
152 : }
153 : IPC::Message*
154 0 : Msg_InitCrashReporter(int32_t routingId)
155 : {
156 0 : return new IPC::Message(routingId, Msg_InitCrashReporter__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_InitCrashReporter", true);
157 : }
158 : IPC::Message*
159 0 : Msg_NotifyUiObservers(int32_t routingId)
160 : {
161 0 : return new IPC::Message(routingId, Msg_NotifyUiObservers__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_NotifyUiObservers", true);
162 : }
163 : IPC::Message*
164 0 : Msg_AccumulateChildHistograms(int32_t routingId)
165 : {
166 0 : return new IPC::Message(routingId, Msg_AccumulateChildHistograms__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_AccumulateChildHistograms", true);
167 : }
168 : IPC::Message*
169 0 : Msg_AccumulateChildKeyedHistograms(int32_t routingId)
170 : {
171 0 : return new IPC::Message(routingId, Msg_AccumulateChildKeyedHistograms__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_AccumulateChildKeyedHistograms", true);
172 : }
173 : IPC::Message*
174 0 : Msg_UpdateChildScalars(int32_t routingId)
175 : {
176 0 : return new IPC::Message(routingId, Msg_UpdateChildScalars__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_UpdateChildScalars", true);
177 : }
178 : IPC::Message*
179 0 : Msg_UpdateChildKeyedScalars(int32_t routingId)
180 : {
181 0 : return new IPC::Message(routingId, Msg_UpdateChildKeyedScalars__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_UpdateChildKeyedScalars", true);
182 : }
183 : IPC::Message*
184 0 : Msg_RecordChildEvents(int32_t routingId)
185 : {
186 0 : return new IPC::Message(routingId, Msg_RecordChildEvents__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_RecordChildEvents", true);
187 : }
188 : IPC::Message*
189 0 : Msg_RecordDiscardedData(int32_t routingId)
190 : {
191 0 : return new IPC::Message(routingId, Msg_RecordDiscardedData__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_RecordDiscardedData", true);
192 : }
193 : IPC::Message*
194 0 : Msg_NotifyDeviceReset(int32_t routingId)
195 : {
196 0 : return new IPC::Message(routingId, Msg_NotifyDeviceReset__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_NotifyDeviceReset", true);
197 : }
198 : IPC::Message*
199 0 : Msg_AddMemoryReport(int32_t routingId)
200 : {
201 0 : return new IPC::Message(routingId, Msg_AddMemoryReport__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_AddMemoryReport", true);
202 : }
203 : IPC::Message*
204 0 : Msg_FinishMemoryReport(int32_t routingId)
205 : {
206 0 : return new IPC::Message(routingId, Msg_FinishMemoryReport__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_FinishMemoryReport", true);
207 : }
208 : IPC::Message*
209 0 : Msg_UpdateFeature(int32_t routingId)
210 : {
211 0 : return new IPC::Message(routingId, Msg_UpdateFeature__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_UpdateFeature", true);
212 : }
213 : IPC::Message*
214 0 : Msg_UsedFallback(int32_t routingId)
215 : {
216 0 : return new IPC::Message(routingId, Msg_UsedFallback__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PGPU::Msg_UsedFallback", true);
217 : }
218 :
219 : } // namespace PGPU
220 : } // namespace gfx
221 : } // namespace mozilla
222 :
223 : //-----------------------------------------------------------------------------
224 : // Method definitions for the IPDL type |union GfxPrefValue|
225 : //
226 : namespace mozilla {
227 : namespace gfx {
228 8 : auto GfxPrefValue::MaybeDestroy(Type aNewType) -> bool
229 : {
230 8 : if ((mType) == (T__None)) {
231 4 : return true;
232 : }
233 4 : if ((mType) == (aNewType)) {
234 0 : return false;
235 : }
236 4 : switch (mType) {
237 : case Tbool:
238 : {
239 1 : (ptr_bool())->~bool__tdef();
240 1 : break;
241 : }
242 : case Tint32_t:
243 : {
244 3 : (ptr_int32_t())->~int32_t__tdef();
245 3 : break;
246 : }
247 : case Tuint32_t:
248 : {
249 0 : (ptr_uint32_t())->~uint32_t__tdef();
250 0 : break;
251 : }
252 : case Tfloat:
253 : {
254 0 : (ptr_float())->~float__tdef();
255 0 : break;
256 : }
257 : case TnsCString:
258 : {
259 0 : (ptr_nsCString())->~nsCString__tdef();
260 0 : break;
261 : }
262 : default:
263 : {
264 0 : mozilla::ipc::LogicError("not reached");
265 0 : break;
266 : }
267 : }
268 4 : return true;
269 : }
270 :
271 0 : MOZ_IMPLICIT GfxPrefValue::GfxPrefValue(const bool& aOther)
272 : {
273 0 : new (mozilla::KnownNotNull, ptr_bool()) bool(aOther);
274 0 : mType = Tbool;
275 0 : }
276 :
277 0 : MOZ_IMPLICIT GfxPrefValue::GfxPrefValue(const int32_t& aOther)
278 : {
279 0 : new (mozilla::KnownNotNull, ptr_int32_t()) int32_t(aOther);
280 0 : mType = Tint32_t;
281 0 : }
282 :
283 0 : MOZ_IMPLICIT GfxPrefValue::GfxPrefValue(const uint32_t& aOther)
284 : {
285 0 : new (mozilla::KnownNotNull, ptr_uint32_t()) uint32_t(aOther);
286 0 : mType = Tuint32_t;
287 0 : }
288 :
289 0 : MOZ_IMPLICIT GfxPrefValue::GfxPrefValue(const float& aOther)
290 : {
291 0 : new (mozilla::KnownNotNull, ptr_float()) float(aOther);
292 0 : mType = Tfloat;
293 0 : }
294 :
295 0 : MOZ_IMPLICIT GfxPrefValue::GfxPrefValue(const nsCString& aOther)
296 : {
297 0 : new (mozilla::KnownNotNull, ptr_nsCString()) nsCString(aOther);
298 0 : mType = TnsCString;
299 0 : }
300 :
301 0 : MOZ_IMPLICIT GfxPrefValue::GfxPrefValue(const GfxPrefValue& aOther)
302 : {
303 0 : (aOther).AssertSanity();
304 0 : switch ((aOther).type()) {
305 : case Tbool:
306 : {
307 0 : new (mozilla::KnownNotNull, ptr_bool()) bool((aOther).get_bool());
308 0 : break;
309 : }
310 : case Tint32_t:
311 : {
312 0 : new (mozilla::KnownNotNull, ptr_int32_t()) int32_t((aOther).get_int32_t());
313 0 : break;
314 : }
315 : case Tuint32_t:
316 : {
317 0 : new (mozilla::KnownNotNull, ptr_uint32_t()) uint32_t((aOther).get_uint32_t());
318 0 : break;
319 : }
320 : case Tfloat:
321 : {
322 0 : new (mozilla::KnownNotNull, ptr_float()) float((aOther).get_float());
323 0 : break;
324 : }
325 : case TnsCString:
326 : {
327 0 : new (mozilla::KnownNotNull, ptr_nsCString()) nsCString((aOther).get_nsCString());
328 0 : break;
329 : }
330 : case T__None:
331 : {
332 0 : break;
333 : }
334 : default:
335 : {
336 0 : mozilla::ipc::LogicError("unreached");
337 0 : return;
338 : }
339 : }
340 0 : mType = (aOther).type();
341 : }
342 :
343 8 : GfxPrefValue::~GfxPrefValue()
344 : {
345 4 : static_cast<void>(MaybeDestroy(T__None));
346 4 : }
347 :
348 1 : auto GfxPrefValue::operator=(const bool& aRhs) -> GfxPrefValue&
349 : {
350 1 : if (MaybeDestroy(Tbool)) {
351 1 : new (mozilla::KnownNotNull, ptr_bool()) bool;
352 : }
353 1 : (*(ptr_bool())) = aRhs;
354 1 : mType = Tbool;
355 1 : return (*(this));
356 : }
357 :
358 3 : auto GfxPrefValue::operator=(const int32_t& aRhs) -> GfxPrefValue&
359 : {
360 3 : if (MaybeDestroy(Tint32_t)) {
361 3 : new (mozilla::KnownNotNull, ptr_int32_t()) int32_t;
362 : }
363 3 : (*(ptr_int32_t())) = aRhs;
364 3 : mType = Tint32_t;
365 3 : return (*(this));
366 : }
367 :
368 0 : auto GfxPrefValue::operator=(const uint32_t& aRhs) -> GfxPrefValue&
369 : {
370 0 : if (MaybeDestroy(Tuint32_t)) {
371 0 : new (mozilla::KnownNotNull, ptr_uint32_t()) uint32_t;
372 : }
373 0 : (*(ptr_uint32_t())) = aRhs;
374 0 : mType = Tuint32_t;
375 0 : return (*(this));
376 : }
377 :
378 0 : auto GfxPrefValue::operator=(const float& aRhs) -> GfxPrefValue&
379 : {
380 0 : if (MaybeDestroy(Tfloat)) {
381 0 : new (mozilla::KnownNotNull, ptr_float()) float;
382 : }
383 0 : (*(ptr_float())) = aRhs;
384 0 : mType = Tfloat;
385 0 : return (*(this));
386 : }
387 :
388 0 : auto GfxPrefValue::operator=(const nsCString& aRhs) -> GfxPrefValue&
389 : {
390 0 : if (MaybeDestroy(TnsCString)) {
391 0 : new (mozilla::KnownNotNull, ptr_nsCString()) nsCString;
392 : }
393 0 : (*(ptr_nsCString())) = aRhs;
394 0 : mType = TnsCString;
395 0 : return (*(this));
396 : }
397 :
398 0 : auto GfxPrefValue::operator=(const GfxPrefValue& aRhs) -> GfxPrefValue&
399 : {
400 0 : (aRhs).AssertSanity();
401 0 : Type t = (aRhs).type();
402 0 : switch (t) {
403 : case Tbool:
404 : {
405 0 : if (MaybeDestroy(t)) {
406 0 : new (mozilla::KnownNotNull, ptr_bool()) bool;
407 : }
408 0 : (*(ptr_bool())) = (aRhs).get_bool();
409 0 : break;
410 : }
411 : case Tint32_t:
412 : {
413 0 : if (MaybeDestroy(t)) {
414 0 : new (mozilla::KnownNotNull, ptr_int32_t()) int32_t;
415 : }
416 0 : (*(ptr_int32_t())) = (aRhs).get_int32_t();
417 0 : break;
418 : }
419 : case Tuint32_t:
420 : {
421 0 : if (MaybeDestroy(t)) {
422 0 : new (mozilla::KnownNotNull, ptr_uint32_t()) uint32_t;
423 : }
424 0 : (*(ptr_uint32_t())) = (aRhs).get_uint32_t();
425 0 : break;
426 : }
427 : case Tfloat:
428 : {
429 0 : if (MaybeDestroy(t)) {
430 0 : new (mozilla::KnownNotNull, ptr_float()) float;
431 : }
432 0 : (*(ptr_float())) = (aRhs).get_float();
433 0 : break;
434 : }
435 : case TnsCString:
436 : {
437 0 : if (MaybeDestroy(t)) {
438 0 : new (mozilla::KnownNotNull, ptr_nsCString()) nsCString;
439 : }
440 0 : (*(ptr_nsCString())) = (aRhs).get_nsCString();
441 0 : break;
442 : }
443 : case T__None:
444 : {
445 0 : static_cast<void>(MaybeDestroy(t));
446 0 : break;
447 : }
448 : default:
449 : {
450 0 : mozilla::ipc::LogicError("unreached");
451 0 : break;
452 : }
453 : }
454 0 : mType = t;
455 0 : return (*(this));
456 : }
457 :
458 0 : auto GfxPrefValue::operator==(const bool& aRhs) const -> bool
459 : {
460 0 : return (get_bool()) == (aRhs);
461 : }
462 :
463 0 : auto GfxPrefValue::operator==(const int32_t& aRhs) const -> bool
464 : {
465 0 : return (get_int32_t()) == (aRhs);
466 : }
467 :
468 0 : auto GfxPrefValue::operator==(const uint32_t& aRhs) const -> bool
469 : {
470 0 : return (get_uint32_t()) == (aRhs);
471 : }
472 :
473 0 : auto GfxPrefValue::operator==(const float& aRhs) const -> bool
474 : {
475 0 : return (get_float()) == (aRhs);
476 : }
477 :
478 0 : auto GfxPrefValue::operator==(const nsCString& aRhs) const -> bool
479 : {
480 0 : return (get_nsCString()) == (aRhs);
481 : }
482 :
483 0 : auto GfxPrefValue::operator==(const GfxPrefValue& aRhs) const -> bool
484 : {
485 0 : if ((type()) != ((aRhs).type())) {
486 0 : return false;
487 : }
488 :
489 0 : switch (type()) {
490 : case Tbool:
491 : {
492 0 : return (get_bool()) == ((aRhs).get_bool());
493 : }
494 : case Tint32_t:
495 : {
496 0 : return (get_int32_t()) == ((aRhs).get_int32_t());
497 : }
498 : case Tuint32_t:
499 : {
500 0 : return (get_uint32_t()) == ((aRhs).get_uint32_t());
501 : }
502 : case Tfloat:
503 : {
504 0 : return (get_float()) == ((aRhs).get_float());
505 : }
506 : case TnsCString:
507 : {
508 0 : return (get_nsCString()) == ((aRhs).get_nsCString());
509 : }
510 : default:
511 : {
512 0 : mozilla::ipc::LogicError("unreached");
513 0 : return false;
514 : }
515 : }
516 : }
517 :
518 0 : auto GfxPrefValue::get(bool* aOutValue) const -> void
519 : {
520 0 : (*(aOutValue)) = get_bool();
521 0 : }
522 :
523 0 : auto GfxPrefValue::get(int32_t* aOutValue) const -> void
524 : {
525 0 : (*(aOutValue)) = get_int32_t();
526 0 : }
527 :
528 0 : auto GfxPrefValue::get(uint32_t* aOutValue) const -> void
529 : {
530 0 : (*(aOutValue)) = get_uint32_t();
531 0 : }
532 :
533 0 : auto GfxPrefValue::get(float* aOutValue) const -> void
534 : {
535 0 : (*(aOutValue)) = get_float();
536 0 : }
537 :
538 0 : auto GfxPrefValue::get(nsCString* aOutValue) const -> void
539 : {
540 0 : (*(aOutValue)) = get_nsCString();
541 0 : }
542 :
543 : } // namespace gfx
544 : } // namespace mozilla
545 :
546 : //-----------------------------------------------------------------------------
547 : // Method definitions for the IPDL type |struct GfxPrefSetting|
548 : //
549 : namespace mozilla {
550 : namespace gfx {
551 0 : MOZ_IMPLICIT GfxPrefSetting::GfxPrefSetting() :
552 0 : index_()
553 : {
554 0 : Init();
555 0 : }
556 :
557 0 : GfxPrefSetting::~GfxPrefSetting()
558 : {
559 0 : }
560 :
561 0 : auto GfxPrefSetting::operator==(const GfxPrefSetting& _o) const -> bool
562 : {
563 0 : if ((!((index()) == ((_o).index())))) {
564 0 : return false;
565 : }
566 0 : if ((!((value()) == ((_o).value())))) {
567 0 : return false;
568 : }
569 0 : return true;
570 : }
571 :
572 0 : auto GfxPrefSetting::operator!=(const GfxPrefSetting& _o) const -> bool
573 : {
574 0 : return (!(operator==(_o)));
575 : }
576 :
577 0 : auto GfxPrefSetting::Init() -> void
578 : {
579 0 : }
580 :
581 0 : auto GfxPrefSetting::Assign(
582 : const int32_t& _index,
583 : const GfxPrefValue& _value) -> void
584 : {
585 0 : index_ = _index;
586 0 : value_ = _value;
587 0 : }
588 :
589 : } // namespace gfx
590 : } // namespace mozilla
591 :
592 : //-----------------------------------------------------------------------------
593 : // Method definitions for the IPDL type |struct LayerTreeIdMapping|
594 : //
595 : namespace mozilla {
596 : namespace gfx {
597 0 : MOZ_IMPLICIT LayerTreeIdMapping::LayerTreeIdMapping() :
598 : layersId_(),
599 0 : ownerId_()
600 : {
601 0 : Init();
602 0 : }
603 :
604 0 : LayerTreeIdMapping::~LayerTreeIdMapping()
605 : {
606 0 : }
607 :
608 0 : auto LayerTreeIdMapping::operator==(const LayerTreeIdMapping& _o) const -> bool
609 : {
610 0 : if ((!((layersId()) == ((_o).layersId())))) {
611 0 : return false;
612 : }
613 0 : if ((!((ownerId()) == ((_o).ownerId())))) {
614 0 : return false;
615 : }
616 0 : return true;
617 : }
618 :
619 0 : auto LayerTreeIdMapping::operator!=(const LayerTreeIdMapping& _o) const -> bool
620 : {
621 0 : return (!(operator==(_o)));
622 : }
623 :
624 0 : auto LayerTreeIdMapping::Init() -> void
625 : {
626 0 : }
627 :
628 0 : auto LayerTreeIdMapping::Assign(
629 : const uint64_t& _layersId,
630 : const ProcessId& _ownerId) -> void
631 : {
632 0 : layersId_ = _layersId;
633 0 : ownerId_ = _ownerId;
634 0 : }
635 :
636 : } // namespace gfx
637 : } // namespace mozilla
|