/work/obj-fuzz/ipc/ipdl/PGPUParent.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/gfx/PGPUParent.h" |
8 | | |
9 | | #include "mozilla/layers/PAPZInputBridgeParent.h" |
10 | | #include "mozilla/layers/PCompositorManagerParent.h" |
11 | | #include "mozilla/layers/PImageBridgeParent.h" |
12 | | #include "mozilla/PProfilerParent.h" |
13 | | #include "mozilla/gfx/PVRGPUParent.h" |
14 | | #include "mozilla/gfx/PVRManagerParent.h" |
15 | | #include "mozilla/gfx/PVsyncBridgeParent.h" |
16 | | #include "mozilla/layers/PUiCompositorControllerParent.h" |
17 | | #include "mozilla/dom/PVideoDecoderManagerParent.h" |
18 | | |
19 | | #include "nsIFile.h" |
20 | | #include "GeckoProfiler.h" |
21 | | |
22 | | namespace mozilla { |
23 | | namespace gfx { |
24 | | |
25 | | |
26 | | auto PGPUParent::RecvPAPZInputBridgeConstructor( |
27 | | PAPZInputBridgeParent* actor, |
28 | | const LayersId& aLayersId) -> mozilla::ipc::IPCResult |
29 | 0 | { |
30 | 0 | return IPC_OK(); |
31 | 0 | } |
32 | | |
33 | | auto PGPUParent::ActorDestroy(ActorDestroyReason aWhy) -> void |
34 | 0 | { |
35 | 0 | } |
36 | | |
37 | | auto PGPUParent::ProcessingError( |
38 | | Result aCode, |
39 | | const char* aReason) -> void |
40 | 0 | { |
41 | 0 | } |
42 | | |
43 | | auto PGPUParent::ShouldContinueFromReplyTimeout() -> bool |
44 | 0 | { |
45 | 0 | return true; |
46 | 0 | } |
47 | | |
48 | | auto PGPUParent::EnteredCxxStack() -> void |
49 | 0 | { |
50 | 0 | } |
51 | | |
52 | | auto PGPUParent::ExitedCxxStack() -> void |
53 | 0 | { |
54 | 0 | } |
55 | | |
56 | | auto PGPUParent::EnteredCall() -> void |
57 | 0 | { |
58 | 0 | } |
59 | | |
60 | | auto PGPUParent::ExitedCall() -> void |
61 | 0 | { |
62 | 0 | } |
63 | | |
64 | | MOZ_IMPLICIT PGPUParent::PGPUParent() : |
65 | | mozilla::ipc::IToplevelProtocol("PGPUParent", PGPUMsgStart, mozilla::ipc::ParentSide), |
66 | | mLivenessState(mozilla::ipc::LivenessState::Start) |
67 | 0 | { |
68 | 0 | MOZ_COUNT_CTOR(PGPUParent); |
69 | 0 | } |
70 | | |
71 | | PGPUParent::~PGPUParent() |
72 | 0 | { |
73 | 0 | MOZ_COUNT_DTOR(PGPUParent); |
74 | 0 | } |
75 | | |
76 | | auto PGPUParent::ManagedPAPZInputBridgeParent(nsTArray<PAPZInputBridgeParent*>& aArr) const -> void |
77 | 0 | { |
78 | 0 | (mManagedPAPZInputBridgeParent).ToArray(aArr); |
79 | 0 | } |
80 | | |
81 | | auto PGPUParent::ManagedPAPZInputBridgeParent() const -> const ManagedContainer<PAPZInputBridgeParent>& |
82 | 0 | { |
83 | 0 | return mManagedPAPZInputBridgeParent; |
84 | 0 | } |
85 | | |
86 | | auto PGPUParent::SendInitComplete(const GPUDeviceData& data) -> bool |
87 | 0 | { |
88 | 0 | IPC::Message* msg__ = PGPU::Msg_InitComplete(MSG_ROUTING_CONTROL); |
89 | 0 |
|
90 | 0 | WriteIPDLParam(msg__, this, data); |
91 | 0 | // Sentinel = 'data' |
92 | 0 | (msg__)->WriteSentinel(843352540); |
93 | 0 |
|
94 | 0 |
|
95 | 0 |
|
96 | 0 |
|
97 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
98 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
99 | 0 | } |
100 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_InitComplete", OTHER); |
101 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
102 | 0 | mozilla::ipc::LogicError("Transition error"); |
103 | 0 | } |
104 | 0 |
|
105 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
106 | 0 | return sendok__; |
107 | 0 | } |
108 | | |
109 | | auto PGPUParent::SendReportCheckerboard( |
110 | | const uint32_t& severity, |
111 | | const nsCString& log) -> bool |
112 | 0 | { |
113 | 0 | IPC::Message* msg__ = PGPU::Msg_ReportCheckerboard(MSG_ROUTING_CONTROL); |
114 | 0 |
|
115 | 0 | WriteIPDLParam(msg__, this, severity); |
116 | 0 | // Sentinel = 'severity' |
117 | 0 | (msg__)->WriteSentinel(3651995045); |
118 | 0 | WriteIPDLParam(msg__, this, log); |
119 | 0 | // Sentinel = 'log' |
120 | 0 | (msg__)->WriteSentinel(914042661); |
121 | 0 |
|
122 | 0 |
|
123 | 0 |
|
124 | 0 |
|
125 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
126 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
127 | 0 | } |
128 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_ReportCheckerboard", OTHER); |
129 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
130 | 0 | mozilla::ipc::LogicError("Transition error"); |
131 | 0 | } |
132 | 0 |
|
133 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
134 | 0 | return sendok__; |
135 | 0 | } |
136 | | |
137 | | auto PGPUParent::SendGraphicsError(const nsCString& aError) -> bool |
138 | 0 | { |
139 | 0 | IPC::Message* msg__ = PGPU::Msg_GraphicsError(MSG_ROUTING_CONTROL); |
140 | 0 |
|
141 | 0 | WriteIPDLParam(msg__, this, aError); |
142 | 0 | // Sentinel = 'aError' |
143 | 0 | (msg__)->WriteSentinel(3299422495); |
144 | 0 |
|
145 | 0 |
|
146 | 0 |
|
147 | 0 |
|
148 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
149 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
150 | 0 | } |
151 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_GraphicsError", OTHER); |
152 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
153 | 0 | mozilla::ipc::LogicError("Transition error"); |
154 | 0 | } |
155 | 0 |
|
156 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
157 | 0 | return sendok__; |
158 | 0 | } |
159 | | |
160 | | auto PGPUParent::SendInitCrashReporter( |
161 | | Shmem& shmem, |
162 | | const NativeThreadId& threadId) -> bool |
163 | 0 | { |
164 | 0 | IPC::Message* msg__ = PGPU::Msg_InitCrashReporter(MSG_ROUTING_CONTROL); |
165 | 0 |
|
166 | 0 | WriteIPDLParam(msg__, this, shmem); |
167 | 0 | // Sentinel = 'shmem' |
168 | 0 | (msg__)->WriteSentinel(4252604405); |
169 | 0 | WriteIPDLParam(msg__, this, threadId); |
170 | 0 | // Sentinel = 'threadId' |
171 | 0 | (msg__)->WriteSentinel(3657055895); |
172 | 0 |
|
173 | 0 |
|
174 | 0 |
|
175 | 0 |
|
176 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
177 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
178 | 0 | } |
179 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_InitCrashReporter", OTHER); |
180 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
181 | 0 | mozilla::ipc::LogicError("Transition error"); |
182 | 0 | } |
183 | 0 |
|
184 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
185 | 0 | return sendok__; |
186 | 0 | } |
187 | | |
188 | | auto PGPUParent::SendCreateVRProcess() -> bool |
189 | 0 | { |
190 | 0 | IPC::Message* msg__ = PGPU::Msg_CreateVRProcess(MSG_ROUTING_CONTROL); |
191 | 0 |
|
192 | 0 |
|
193 | 0 |
|
194 | 0 |
|
195 | 0 |
|
196 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
197 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
198 | 0 | } |
199 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_CreateVRProcess", OTHER); |
200 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
201 | 0 | mozilla::ipc::LogicError("Transition error"); |
202 | 0 | } |
203 | 0 |
|
204 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
205 | 0 | return sendok__; |
206 | 0 | } |
207 | | |
208 | | auto PGPUParent::SendNotifyUiObservers(const nsCString& aTopic) -> bool |
209 | 0 | { |
210 | 0 | IPC::Message* msg__ = PGPU::Msg_NotifyUiObservers(MSG_ROUTING_CONTROL); |
211 | 0 |
|
212 | 0 | WriteIPDLParam(msg__, this, aTopic); |
213 | 0 | // Sentinel = 'aTopic' |
214 | 0 | (msg__)->WriteSentinel(2759450316); |
215 | 0 |
|
216 | 0 |
|
217 | 0 |
|
218 | 0 |
|
219 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
220 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
221 | 0 | } |
222 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_NotifyUiObservers", OTHER); |
223 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
224 | 0 | mozilla::ipc::LogicError("Transition error"); |
225 | 0 | } |
226 | 0 |
|
227 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
228 | 0 | return sendok__; |
229 | 0 | } |
230 | | |
231 | | auto PGPUParent::SendAccumulateChildHistograms(const nsTArray<HistogramAccumulation>& accumulations) -> bool |
232 | 0 | { |
233 | 0 | IPC::Message* msg__ = PGPU::Msg_AccumulateChildHistograms(MSG_ROUTING_CONTROL); |
234 | 0 |
|
235 | 0 | WriteIPDLParam(msg__, this, accumulations); |
236 | 0 | // Sentinel = 'accumulations' |
237 | 0 | (msg__)->WriteSentinel(2180708333); |
238 | 0 |
|
239 | 0 |
|
240 | 0 |
|
241 | 0 |
|
242 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
243 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
244 | 0 | } |
245 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_AccumulateChildHistograms", OTHER); |
246 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
247 | 0 | mozilla::ipc::LogicError("Transition error"); |
248 | 0 | } |
249 | 0 |
|
250 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
251 | 0 | return sendok__; |
252 | 0 | } |
253 | | |
254 | | auto PGPUParent::SendAccumulateChildKeyedHistograms(const nsTArray<KeyedHistogramAccumulation>& accumulations) -> bool |
255 | 0 | { |
256 | 0 | IPC::Message* msg__ = PGPU::Msg_AccumulateChildKeyedHistograms(MSG_ROUTING_CONTROL); |
257 | 0 |
|
258 | 0 | WriteIPDLParam(msg__, this, accumulations); |
259 | 0 | // Sentinel = 'accumulations' |
260 | 0 | (msg__)->WriteSentinel(2180708333); |
261 | 0 |
|
262 | 0 |
|
263 | 0 |
|
264 | 0 |
|
265 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
266 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
267 | 0 | } |
268 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_AccumulateChildKeyedHistograms", OTHER); |
269 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
270 | 0 | mozilla::ipc::LogicError("Transition error"); |
271 | 0 | } |
272 | 0 |
|
273 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
274 | 0 | return sendok__; |
275 | 0 | } |
276 | | |
277 | | auto PGPUParent::SendUpdateChildScalars(const nsTArray<ScalarAction>& actions) -> bool |
278 | 0 | { |
279 | 0 | IPC::Message* msg__ = PGPU::Msg_UpdateChildScalars(MSG_ROUTING_CONTROL); |
280 | 0 |
|
281 | 0 | WriteIPDLParam(msg__, this, actions); |
282 | 0 | // Sentinel = 'actions' |
283 | 0 | (msg__)->WriteSentinel(3189730830); |
284 | 0 |
|
285 | 0 |
|
286 | 0 |
|
287 | 0 |
|
288 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
289 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
290 | 0 | } |
291 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_UpdateChildScalars", OTHER); |
292 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
293 | 0 | mozilla::ipc::LogicError("Transition error"); |
294 | 0 | } |
295 | 0 |
|
296 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
297 | 0 | return sendok__; |
298 | 0 | } |
299 | | |
300 | | auto PGPUParent::SendUpdateChildKeyedScalars(const nsTArray<KeyedScalarAction>& actions) -> bool |
301 | 0 | { |
302 | 0 | IPC::Message* msg__ = PGPU::Msg_UpdateChildKeyedScalars(MSG_ROUTING_CONTROL); |
303 | 0 |
|
304 | 0 | WriteIPDLParam(msg__, this, actions); |
305 | 0 | // Sentinel = 'actions' |
306 | 0 | (msg__)->WriteSentinel(3189730830); |
307 | 0 |
|
308 | 0 |
|
309 | 0 |
|
310 | 0 |
|
311 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
312 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
313 | 0 | } |
314 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_UpdateChildKeyedScalars", OTHER); |
315 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
316 | 0 | mozilla::ipc::LogicError("Transition error"); |
317 | 0 | } |
318 | 0 |
|
319 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
320 | 0 | return sendok__; |
321 | 0 | } |
322 | | |
323 | | auto PGPUParent::SendRecordChildEvents(const nsTArray<ChildEventData>& events) -> bool |
324 | 0 | { |
325 | 0 | IPC::Message* msg__ = PGPU::Msg_RecordChildEvents(MSG_ROUTING_CONTROL); |
326 | 0 |
|
327 | 0 | WriteIPDLParam(msg__, this, events); |
328 | 0 | // Sentinel = 'events' |
329 | 0 | (msg__)->WriteSentinel(1921707453); |
330 | 0 |
|
331 | 0 |
|
332 | 0 |
|
333 | 0 |
|
334 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
335 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
336 | 0 | } |
337 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_RecordChildEvents", OTHER); |
338 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
339 | 0 | mozilla::ipc::LogicError("Transition error"); |
340 | 0 | } |
341 | 0 |
|
342 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
343 | 0 | return sendok__; |
344 | 0 | } |
345 | | |
346 | | auto PGPUParent::SendRecordDiscardedData(const DiscardedData& data) -> bool |
347 | 0 | { |
348 | 0 | IPC::Message* msg__ = PGPU::Msg_RecordDiscardedData(MSG_ROUTING_CONTROL); |
349 | 0 |
|
350 | 0 | WriteIPDLParam(msg__, this, data); |
351 | 0 | // Sentinel = 'data' |
352 | 0 | (msg__)->WriteSentinel(843352540); |
353 | 0 |
|
354 | 0 |
|
355 | 0 |
|
356 | 0 |
|
357 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
358 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
359 | 0 | } |
360 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_RecordDiscardedData", OTHER); |
361 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
362 | 0 | mozilla::ipc::LogicError("Transition error"); |
363 | 0 | } |
364 | 0 |
|
365 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
366 | 0 | return sendok__; |
367 | 0 | } |
368 | | |
369 | | auto PGPUParent::SendNotifyDeviceReset(const GPUDeviceData& status) -> bool |
370 | 0 | { |
371 | 0 | IPC::Message* msg__ = PGPU::Msg_NotifyDeviceReset(MSG_ROUTING_CONTROL); |
372 | 0 |
|
373 | 0 | WriteIPDLParam(msg__, this, status); |
374 | 0 | // Sentinel = 'status' |
375 | 0 | (msg__)->WriteSentinel(3714608576); |
376 | 0 |
|
377 | 0 |
|
378 | 0 |
|
379 | 0 |
|
380 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
381 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
382 | 0 | } |
383 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_NotifyDeviceReset", OTHER); |
384 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
385 | 0 | mozilla::ipc::LogicError("Transition error"); |
386 | 0 | } |
387 | 0 |
|
388 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
389 | 0 | return sendok__; |
390 | 0 | } |
391 | | |
392 | | auto PGPUParent::SendAddMemoryReport(const MemoryReport& aReport) -> bool |
393 | 0 | { |
394 | 0 | IPC::Message* msg__ = PGPU::Msg_AddMemoryReport(MSG_ROUTING_CONTROL); |
395 | 0 |
|
396 | 0 | WriteIPDLParam(msg__, this, aReport); |
397 | 0 | // Sentinel = 'aReport' |
398 | 0 | (msg__)->WriteSentinel(3792799576); |
399 | 0 |
|
400 | 0 |
|
401 | 0 |
|
402 | 0 |
|
403 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
404 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
405 | 0 | } |
406 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_AddMemoryReport", OTHER); |
407 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
408 | 0 | mozilla::ipc::LogicError("Transition error"); |
409 | 0 | } |
410 | 0 |
|
411 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
412 | 0 | return sendok__; |
413 | 0 | } |
414 | | |
415 | | auto PGPUParent::SendFinishMemoryReport(const uint32_t& aGeneration) -> bool |
416 | 0 | { |
417 | 0 | IPC::Message* msg__ = PGPU::Msg_FinishMemoryReport(MSG_ROUTING_CONTROL); |
418 | 0 |
|
419 | 0 | WriteIPDLParam(msg__, this, aGeneration); |
420 | 0 | // Sentinel = 'aGeneration' |
421 | 0 | (msg__)->WriteSentinel(2329783584); |
422 | 0 |
|
423 | 0 |
|
424 | 0 |
|
425 | 0 |
|
426 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
427 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
428 | 0 | } |
429 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_FinishMemoryReport", OTHER); |
430 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
431 | 0 | mozilla::ipc::LogicError("Transition error"); |
432 | 0 | } |
433 | 0 |
|
434 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
435 | 0 | return sendok__; |
436 | 0 | } |
437 | | |
438 | | auto PGPUParent::SendUpdateFeature( |
439 | | const Feature& aFeature, |
440 | | const FeatureFailure& aChange) -> bool |
441 | 0 | { |
442 | 0 | IPC::Message* msg__ = PGPU::Msg_UpdateFeature(MSG_ROUTING_CONTROL); |
443 | 0 |
|
444 | 0 | WriteIPDLParam(msg__, this, aFeature); |
445 | 0 | // Sentinel = 'aFeature' |
446 | 0 | (msg__)->WriteSentinel(467571205); |
447 | 0 | WriteIPDLParam(msg__, this, aChange); |
448 | 0 | // Sentinel = 'aChange' |
449 | 0 | (msg__)->WriteSentinel(1262903642); |
450 | 0 |
|
451 | 0 |
|
452 | 0 |
|
453 | 0 |
|
454 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
455 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
456 | 0 | } |
457 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_UpdateFeature", OTHER); |
458 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
459 | 0 | mozilla::ipc::LogicError("Transition error"); |
460 | 0 | } |
461 | 0 |
|
462 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
463 | 0 | return sendok__; |
464 | 0 | } |
465 | | |
466 | | auto PGPUParent::SendUsedFallback( |
467 | | const Fallback& aFallback, |
468 | | const nsCString& message) -> bool |
469 | 0 | { |
470 | 0 | IPC::Message* msg__ = PGPU::Msg_UsedFallback(MSG_ROUTING_CONTROL); |
471 | 0 |
|
472 | 0 | WriteIPDLParam(msg__, this, aFallback); |
473 | 0 | // Sentinel = 'aFallback' |
474 | 0 | (msg__)->WriteSentinel(2020944874); |
475 | 0 | WriteIPDLParam(msg__, this, message); |
476 | 0 | // Sentinel = 'message' |
477 | 0 | (msg__)->WriteSentinel(1366108954); |
478 | 0 |
|
479 | 0 |
|
480 | 0 |
|
481 | 0 |
|
482 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
483 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
484 | 0 | } |
485 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_UsedFallback", OTHER); |
486 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
487 | 0 | mozilla::ipc::LogicError("Transition error"); |
488 | 0 | } |
489 | 0 |
|
490 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
491 | 0 | return sendok__; |
492 | 0 | } |
493 | | |
494 | | auto PGPUParent::SendBHRThreadHang(const HangDetails& aDetails) -> bool |
495 | 0 | { |
496 | 0 | IPC::Message* msg__ = PGPU::Msg_BHRThreadHang(MSG_ROUTING_CONTROL); |
497 | 0 |
|
498 | 0 | WriteIPDLParam(msg__, this, aDetails); |
499 | 0 | // Sentinel = 'aDetails' |
500 | 0 | (msg__)->WriteSentinel(4067591305); |
501 | 0 |
|
502 | 0 |
|
503 | 0 |
|
504 | 0 |
|
505 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
506 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
507 | 0 | } |
508 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_BHRThreadHang", OTHER); |
509 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
510 | 0 | mozilla::ipc::LogicError("Transition error"); |
511 | 0 | } |
512 | 0 |
|
513 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
514 | 0 | return sendok__; |
515 | 0 | } |
516 | | |
517 | | auto PGPUParent::RemoveManagee( |
518 | | int32_t aProtocolId, |
519 | | IProtocol* aListener) -> void |
520 | 0 | { |
521 | 0 | switch (aProtocolId) { |
522 | 0 | case PAPZInputBridgeMsgStart: |
523 | 0 | { |
524 | 0 | PAPZInputBridgeParent* actor = static_cast<PAPZInputBridgeParent*>(aListener); |
525 | 0 | auto& container = mManagedPAPZInputBridgeParent; |
526 | 0 | MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!"); |
527 | 0 |
|
528 | 0 | (container).RemoveEntry(actor); |
529 | 0 | DeallocPAPZInputBridgeParent(actor); |
530 | 0 | return; |
531 | 0 | } |
532 | 0 | default: |
533 | 0 | { |
534 | 0 | FatalError("unreached"); |
535 | 0 | return; |
536 | 0 | } |
537 | 0 | } |
538 | 0 | } |
539 | | |
540 | | auto PGPUParent::OnMessageReceived(const Message& msg__) -> PGPUParent::Result |
541 | 0 | { |
542 | 0 | int32_t route__ = (msg__).routing_id(); |
543 | 0 | if ((MSG_ROUTING_CONTROL) != (route__)) { |
544 | 0 | IProtocol* routed__ = Lookup(route__); |
545 | 0 | if ((!(routed__))) { |
546 | 0 | return MsgRouteError; |
547 | 0 | } |
548 | 0 | return (routed__)->OnMessageReceived(msg__); |
549 | 0 | } |
550 | 0 | |
551 | 0 | switch ((msg__).type()) { |
552 | 0 | case PGPU::Msg_PAPZInputBridgeConstructor__ID: |
553 | 0 | { |
554 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
555 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
556 | 0 | } |
557 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_PAPZInputBridgeConstructor", OTHER); |
558 | 0 |
|
559 | 0 | PickleIterator iter__(msg__); |
560 | 0 | ActorHandle handle__; |
561 | 0 | PAPZInputBridgeParent* actor; |
562 | 0 | LayersId aLayersId; |
563 | 0 |
|
564 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(handle__)))))) { |
565 | 0 | FatalError("Error deserializing 'ActorHandle'"); |
566 | 0 | return MsgValueError; |
567 | 0 | } |
568 | 0 | // Sentinel = 'actor' |
569 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
570 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'"); |
571 | 0 | return MsgValueError; |
572 | 0 | } |
573 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aLayersId)))))) { |
574 | 0 | FatalError("Error deserializing 'LayersId'"); |
575 | 0 | return MsgValueError; |
576 | 0 | } |
577 | 0 | // Sentinel = 'aLayersId' |
578 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1401196721)))) { |
579 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'LayersId'"); |
580 | 0 | return MsgValueError; |
581 | 0 | } |
582 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
583 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
584 | 0 | FatalError("Transition error"); |
585 | 0 | return MsgValueError; |
586 | 0 | } |
587 | 0 | actor = AllocPAPZInputBridgeParent(aLayersId); |
588 | 0 | if ((!(actor))) { |
589 | 0 | NS_WARNING("Error constructing actor PAPZInputBridgeParent"); |
590 | 0 | return MsgValueError; |
591 | 0 | } |
592 | 0 | (actor)->SetManagerAndRegister(this, (handle__).mId); |
593 | 0 | (mManagedPAPZInputBridgeParent).PutEntry(actor); |
594 | 0 | (actor)->mLivenessState = mozilla::ipc::LivenessState::Start; |
595 | 0 |
|
596 | 0 | if ((!(RecvPAPZInputBridgeConstructor(actor, aLayersId)))) { |
597 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
598 | 0 | // Error handled in mozilla::ipc::IPCResult |
599 | 0 | return MsgProcessingError; |
600 | 0 | } |
601 | 0 | |
602 | 0 | return MsgProcessed; |
603 | 0 | } |
604 | 0 | case PGPU::Msg_Init__ID: |
605 | 0 | { |
606 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
607 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
608 | 0 | } |
609 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_Init", OTHER); |
610 | 0 |
|
611 | 0 | PickleIterator iter__(msg__); |
612 | 0 | nsTArray<GfxPrefSetting> prefs; |
613 | 0 | nsTArray<GfxVarUpdate> vars; |
614 | 0 | DevicePrefs devicePrefs; |
615 | 0 | nsTArray<LayerTreeIdMapping> mapping; |
616 | 0 |
|
617 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(prefs)))))) { |
618 | 0 | FatalError("Error deserializing 'nsTArray'"); |
619 | 0 | return MsgValueError; |
620 | 0 | } |
621 | 0 | // Sentinel = 'prefs' |
622 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3194398011)))) { |
623 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'"); |
624 | 0 | return MsgValueError; |
625 | 0 | } |
626 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(vars)))))) { |
627 | 0 | FatalError("Error deserializing 'nsTArray'"); |
628 | 0 | return MsgValueError; |
629 | 0 | } |
630 | 0 | // Sentinel = 'vars' |
631 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2632090118)))) { |
632 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'"); |
633 | 0 | return MsgValueError; |
634 | 0 | } |
635 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(devicePrefs)))))) { |
636 | 0 | FatalError("Error deserializing 'DevicePrefs'"); |
637 | 0 | return MsgValueError; |
638 | 0 | } |
639 | 0 | // Sentinel = 'devicePrefs' |
640 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2200416183)))) { |
641 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'DevicePrefs'"); |
642 | 0 | return MsgValueError; |
643 | 0 | } |
644 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(mapping)))))) { |
645 | 0 | FatalError("Error deserializing 'nsTArray'"); |
646 | 0 | return MsgValueError; |
647 | 0 | } |
648 | 0 | // Sentinel = 'mapping' |
649 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 601526733)))) { |
650 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'"); |
651 | 0 | return MsgValueError; |
652 | 0 | } |
653 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
654 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
655 | 0 | FatalError("Transition error"); |
656 | 0 | return MsgValueError; |
657 | 0 | } |
658 | 0 | if ((!(RecvInit(std::move(prefs), std::move(vars), devicePrefs, std::move(mapping))))) { |
659 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
660 | 0 | // Error handled in mozilla::ipc::IPCResult |
661 | 0 | return MsgProcessingError; |
662 | 0 | } |
663 | 0 | |
664 | 0 | return MsgProcessed; |
665 | 0 | } |
666 | 0 | case PGPU::Msg_InitCompositorManager__ID: |
667 | 0 | { |
668 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
669 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
670 | 0 | } |
671 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_InitCompositorManager", OTHER); |
672 | 0 |
|
673 | 0 | PickleIterator iter__(msg__); |
674 | 0 | Endpoint<mozilla::layers::PCompositorManagerParent> endpoint; |
675 | 0 |
|
676 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(endpoint)))))) { |
677 | 0 | FatalError("Error deserializing 'Endpoint<mozilla::layers::PCompositorManagerParent>'"); |
678 | 0 | return MsgValueError; |
679 | 0 | } |
680 | 0 | // Sentinel = 'endpoint' |
681 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3610972515)))) { |
682 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<mozilla::layers::PCompositorManagerParent>'"); |
683 | 0 | return MsgValueError; |
684 | 0 | } |
685 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
686 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
687 | 0 | FatalError("Transition error"); |
688 | 0 | return MsgValueError; |
689 | 0 | } |
690 | 0 | if ((!(RecvInitCompositorManager(std::move(endpoint))))) { |
691 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
692 | 0 | // Error handled in mozilla::ipc::IPCResult |
693 | 0 | return MsgProcessingError; |
694 | 0 | } |
695 | 0 | |
696 | 0 | return MsgProcessed; |
697 | 0 | } |
698 | 0 | case PGPU::Msg_InitVsyncBridge__ID: |
699 | 0 | { |
700 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
701 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
702 | 0 | } |
703 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_InitVsyncBridge", OTHER); |
704 | 0 |
|
705 | 0 | PickleIterator iter__(msg__); |
706 | 0 | Endpoint<mozilla::gfx::PVsyncBridgeParent> endpoint; |
707 | 0 |
|
708 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(endpoint)))))) { |
709 | 0 | FatalError("Error deserializing 'Endpoint<mozilla::gfx::PVsyncBridgeParent>'"); |
710 | 0 | return MsgValueError; |
711 | 0 | } |
712 | 0 | // Sentinel = 'endpoint' |
713 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3610972515)))) { |
714 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<mozilla::gfx::PVsyncBridgeParent>'"); |
715 | 0 | return MsgValueError; |
716 | 0 | } |
717 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
718 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
719 | 0 | FatalError("Transition error"); |
720 | 0 | return MsgValueError; |
721 | 0 | } |
722 | 0 | if ((!(RecvInitVsyncBridge(std::move(endpoint))))) { |
723 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
724 | 0 | // Error handled in mozilla::ipc::IPCResult |
725 | 0 | return MsgProcessingError; |
726 | 0 | } |
727 | 0 | |
728 | 0 | return MsgProcessed; |
729 | 0 | } |
730 | 0 | case PGPU::Msg_InitImageBridge__ID: |
731 | 0 | { |
732 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
733 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
734 | 0 | } |
735 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_InitImageBridge", OTHER); |
736 | 0 |
|
737 | 0 | PickleIterator iter__(msg__); |
738 | 0 | Endpoint<mozilla::layers::PImageBridgeParent> endpoint; |
739 | 0 |
|
740 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(endpoint)))))) { |
741 | 0 | FatalError("Error deserializing 'Endpoint<mozilla::layers::PImageBridgeParent>'"); |
742 | 0 | return MsgValueError; |
743 | 0 | } |
744 | 0 | // Sentinel = 'endpoint' |
745 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3610972515)))) { |
746 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<mozilla::layers::PImageBridgeParent>'"); |
747 | 0 | return MsgValueError; |
748 | 0 | } |
749 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
750 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
751 | 0 | FatalError("Transition error"); |
752 | 0 | return MsgValueError; |
753 | 0 | } |
754 | 0 | if ((!(RecvInitImageBridge(std::move(endpoint))))) { |
755 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
756 | 0 | // Error handled in mozilla::ipc::IPCResult |
757 | 0 | return MsgProcessingError; |
758 | 0 | } |
759 | 0 | |
760 | 0 | return MsgProcessed; |
761 | 0 | } |
762 | 0 | case PGPU::Msg_InitVRManager__ID: |
763 | 0 | { |
764 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
765 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
766 | 0 | } |
767 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_InitVRManager", OTHER); |
768 | 0 |
|
769 | 0 | PickleIterator iter__(msg__); |
770 | 0 | Endpoint<mozilla::gfx::PVRManagerParent> endpoint; |
771 | 0 |
|
772 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(endpoint)))))) { |
773 | 0 | FatalError("Error deserializing 'Endpoint<mozilla::gfx::PVRManagerParent>'"); |
774 | 0 | return MsgValueError; |
775 | 0 | } |
776 | 0 | // Sentinel = 'endpoint' |
777 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3610972515)))) { |
778 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<mozilla::gfx::PVRManagerParent>'"); |
779 | 0 | return MsgValueError; |
780 | 0 | } |
781 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
782 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
783 | 0 | FatalError("Transition error"); |
784 | 0 | return MsgValueError; |
785 | 0 | } |
786 | 0 | if ((!(RecvInitVRManager(std::move(endpoint))))) { |
787 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
788 | 0 | // Error handled in mozilla::ipc::IPCResult |
789 | 0 | return MsgProcessingError; |
790 | 0 | } |
791 | 0 | |
792 | 0 | return MsgProcessed; |
793 | 0 | } |
794 | 0 | case PGPU::Msg_InitUiCompositorController__ID: |
795 | 0 | { |
796 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
797 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
798 | 0 | } |
799 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_InitUiCompositorController", OTHER); |
800 | 0 |
|
801 | 0 | PickleIterator iter__(msg__); |
802 | 0 | LayersId rootLayerTreeId; |
803 | 0 | Endpoint<mozilla::layers::PUiCompositorControllerParent> endpoint; |
804 | 0 |
|
805 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(rootLayerTreeId)))))) { |
806 | 0 | FatalError("Error deserializing 'LayersId'"); |
807 | 0 | return MsgValueError; |
808 | 0 | } |
809 | 0 | // Sentinel = 'rootLayerTreeId' |
810 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 191972583)))) { |
811 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'LayersId'"); |
812 | 0 | return MsgValueError; |
813 | 0 | } |
814 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(endpoint)))))) { |
815 | 0 | FatalError("Error deserializing 'Endpoint<mozilla::layers::PUiCompositorControllerParent>'"); |
816 | 0 | return MsgValueError; |
817 | 0 | } |
818 | 0 | // Sentinel = 'endpoint' |
819 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3610972515)))) { |
820 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<mozilla::layers::PUiCompositorControllerParent>'"); |
821 | 0 | return MsgValueError; |
822 | 0 | } |
823 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
824 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
825 | 0 | FatalError("Transition error"); |
826 | 0 | return MsgValueError; |
827 | 0 | } |
828 | 0 | if ((!(RecvInitUiCompositorController(rootLayerTreeId, std::move(endpoint))))) { |
829 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
830 | 0 | // Error handled in mozilla::ipc::IPCResult |
831 | 0 | return MsgProcessingError; |
832 | 0 | } |
833 | 0 | |
834 | 0 | return MsgProcessed; |
835 | 0 | } |
836 | 0 | case PGPU::Msg_InitProfiler__ID: |
837 | 0 | { |
838 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
839 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
840 | 0 | } |
841 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_InitProfiler", OTHER); |
842 | 0 |
|
843 | 0 | PickleIterator iter__(msg__); |
844 | 0 | Endpoint<mozilla::PProfilerChild> endpoint; |
845 | 0 |
|
846 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(endpoint)))))) { |
847 | 0 | FatalError("Error deserializing 'Endpoint<mozilla::PProfilerChild>'"); |
848 | 0 | return MsgValueError; |
849 | 0 | } |
850 | 0 | // Sentinel = 'endpoint' |
851 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3610972515)))) { |
852 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<mozilla::PProfilerChild>'"); |
853 | 0 | return MsgValueError; |
854 | 0 | } |
855 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
856 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
857 | 0 | FatalError("Transition error"); |
858 | 0 | return MsgValueError; |
859 | 0 | } |
860 | 0 | if ((!(RecvInitProfiler(std::move(endpoint))))) { |
861 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
862 | 0 | // Error handled in mozilla::ipc::IPCResult |
863 | 0 | return MsgProcessingError; |
864 | 0 | } |
865 | 0 | |
866 | 0 | return MsgProcessed; |
867 | 0 | } |
868 | 0 | case PGPU::Msg_InitVR__ID: |
869 | 0 | { |
870 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
871 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
872 | 0 | } |
873 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_InitVR", OTHER); |
874 | 0 |
|
875 | 0 | PickleIterator iter__(msg__); |
876 | 0 | Endpoint<mozilla::gfx::PVRGPUChild> endpoint; |
877 | 0 |
|
878 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(endpoint)))))) { |
879 | 0 | FatalError("Error deserializing 'Endpoint<mozilla::gfx::PVRGPUChild>'"); |
880 | 0 | return MsgValueError; |
881 | 0 | } |
882 | 0 | // Sentinel = 'endpoint' |
883 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3610972515)))) { |
884 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<mozilla::gfx::PVRGPUChild>'"); |
885 | 0 | return MsgValueError; |
886 | 0 | } |
887 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
888 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
889 | 0 | FatalError("Transition error"); |
890 | 0 | return MsgValueError; |
891 | 0 | } |
892 | 0 | if ((!(RecvInitVR(std::move(endpoint))))) { |
893 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
894 | 0 | // Error handled in mozilla::ipc::IPCResult |
895 | 0 | return MsgProcessingError; |
896 | 0 | } |
897 | 0 | |
898 | 0 | return MsgProcessed; |
899 | 0 | } |
900 | 0 | case PGPU::Msg_UpdatePref__ID: |
901 | 0 | { |
902 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
903 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
904 | 0 | } |
905 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_UpdatePref", OTHER); |
906 | 0 |
|
907 | 0 | PickleIterator iter__(msg__); |
908 | 0 | GfxPrefSetting pref; |
909 | 0 |
|
910 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(pref)))))) { |
911 | 0 | FatalError("Error deserializing 'GfxPrefSetting'"); |
912 | 0 | return MsgValueError; |
913 | 0 | } |
914 | 0 | // Sentinel = 'pref' |
915 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3089393963)))) { |
916 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'GfxPrefSetting'"); |
917 | 0 | return MsgValueError; |
918 | 0 | } |
919 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
920 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
921 | 0 | FatalError("Transition error"); |
922 | 0 | return MsgValueError; |
923 | 0 | } |
924 | 0 | if ((!(RecvUpdatePref(pref)))) { |
925 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
926 | 0 | // Error handled in mozilla::ipc::IPCResult |
927 | 0 | return MsgProcessingError; |
928 | 0 | } |
929 | 0 | |
930 | 0 | return MsgProcessed; |
931 | 0 | } |
932 | 0 | case PGPU::Msg_UpdateVar__ID: |
933 | 0 | { |
934 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
935 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
936 | 0 | } |
937 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_UpdateVar", OTHER); |
938 | 0 |
|
939 | 0 | PickleIterator iter__(msg__); |
940 | 0 | GfxVarUpdate var; |
941 | 0 |
|
942 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(var)))))) { |
943 | 0 | FatalError("Error deserializing 'GfxVarUpdate'"); |
944 | 0 | return MsgValueError; |
945 | 0 | } |
946 | 0 | // Sentinel = 'var' |
947 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2283110200)))) { |
948 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'GfxVarUpdate'"); |
949 | 0 | return MsgValueError; |
950 | 0 | } |
951 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
952 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
953 | 0 | FatalError("Transition error"); |
954 | 0 | return MsgValueError; |
955 | 0 | } |
956 | 0 | if ((!(RecvUpdateVar(var)))) { |
957 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
958 | 0 | // Error handled in mozilla::ipc::IPCResult |
959 | 0 | return MsgProcessingError; |
960 | 0 | } |
961 | 0 | |
962 | 0 | return MsgProcessed; |
963 | 0 | } |
964 | 0 | case PGPU::Msg_NewContentCompositorManager__ID: |
965 | 0 | { |
966 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
967 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
968 | 0 | } |
969 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_NewContentCompositorManager", OTHER); |
970 | 0 |
|
971 | 0 | PickleIterator iter__(msg__); |
972 | 0 | Endpoint<mozilla::layers::PCompositorManagerParent> endpoint; |
973 | 0 |
|
974 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(endpoint)))))) { |
975 | 0 | FatalError("Error deserializing 'Endpoint<mozilla::layers::PCompositorManagerParent>'"); |
976 | 0 | return MsgValueError; |
977 | 0 | } |
978 | 0 | // Sentinel = 'endpoint' |
979 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3610972515)))) { |
980 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<mozilla::layers::PCompositorManagerParent>'"); |
981 | 0 | return MsgValueError; |
982 | 0 | } |
983 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
984 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
985 | 0 | FatalError("Transition error"); |
986 | 0 | return MsgValueError; |
987 | 0 | } |
988 | 0 | if ((!(RecvNewContentCompositorManager(std::move(endpoint))))) { |
989 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
990 | 0 | // Error handled in mozilla::ipc::IPCResult |
991 | 0 | return MsgProcessingError; |
992 | 0 | } |
993 | 0 | |
994 | 0 | return MsgProcessed; |
995 | 0 | } |
996 | 0 | case PGPU::Msg_NewContentImageBridge__ID: |
997 | 0 | { |
998 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
999 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1000 | 0 | } |
1001 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_NewContentImageBridge", OTHER); |
1002 | 0 |
|
1003 | 0 | PickleIterator iter__(msg__); |
1004 | 0 | Endpoint<mozilla::layers::PImageBridgeParent> endpoint; |
1005 | 0 |
|
1006 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(endpoint)))))) { |
1007 | 0 | FatalError("Error deserializing 'Endpoint<mozilla::layers::PImageBridgeParent>'"); |
1008 | 0 | return MsgValueError; |
1009 | 0 | } |
1010 | 0 | // Sentinel = 'endpoint' |
1011 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3610972515)))) { |
1012 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<mozilla::layers::PImageBridgeParent>'"); |
1013 | 0 | return MsgValueError; |
1014 | 0 | } |
1015 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1016 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1017 | 0 | FatalError("Transition error"); |
1018 | 0 | return MsgValueError; |
1019 | 0 | } |
1020 | 0 | if ((!(RecvNewContentImageBridge(std::move(endpoint))))) { |
1021 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1022 | 0 | // Error handled in mozilla::ipc::IPCResult |
1023 | 0 | return MsgProcessingError; |
1024 | 0 | } |
1025 | 0 | |
1026 | 0 | return MsgProcessed; |
1027 | 0 | } |
1028 | 0 | case PGPU::Msg_NewContentVRManager__ID: |
1029 | 0 | { |
1030 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
1031 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1032 | 0 | } |
1033 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_NewContentVRManager", OTHER); |
1034 | 0 |
|
1035 | 0 | PickleIterator iter__(msg__); |
1036 | 0 | Endpoint<mozilla::gfx::PVRManagerParent> endpoint; |
1037 | 0 |
|
1038 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(endpoint)))))) { |
1039 | 0 | FatalError("Error deserializing 'Endpoint<mozilla::gfx::PVRManagerParent>'"); |
1040 | 0 | return MsgValueError; |
1041 | 0 | } |
1042 | 0 | // Sentinel = 'endpoint' |
1043 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3610972515)))) { |
1044 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<mozilla::gfx::PVRManagerParent>'"); |
1045 | 0 | return MsgValueError; |
1046 | 0 | } |
1047 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1048 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1049 | 0 | FatalError("Transition error"); |
1050 | 0 | return MsgValueError; |
1051 | 0 | } |
1052 | 0 | if ((!(RecvNewContentVRManager(std::move(endpoint))))) { |
1053 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1054 | 0 | // Error handled in mozilla::ipc::IPCResult |
1055 | 0 | return MsgProcessingError; |
1056 | 0 | } |
1057 | 0 | |
1058 | 0 | return MsgProcessed; |
1059 | 0 | } |
1060 | 0 | case PGPU::Msg_NewContentVideoDecoderManager__ID: |
1061 | 0 | { |
1062 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
1063 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1064 | 0 | } |
1065 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_NewContentVideoDecoderManager", OTHER); |
1066 | 0 |
|
1067 | 0 | PickleIterator iter__(msg__); |
1068 | 0 | Endpoint<mozilla::dom::PVideoDecoderManagerParent> endpoint; |
1069 | 0 |
|
1070 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(endpoint)))))) { |
1071 | 0 | FatalError("Error deserializing 'Endpoint<mozilla::dom::PVideoDecoderManagerParent>'"); |
1072 | 0 | return MsgValueError; |
1073 | 0 | } |
1074 | 0 | // Sentinel = 'endpoint' |
1075 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3610972515)))) { |
1076 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<mozilla::dom::PVideoDecoderManagerParent>'"); |
1077 | 0 | return MsgValueError; |
1078 | 0 | } |
1079 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1080 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1081 | 0 | FatalError("Transition error"); |
1082 | 0 | return MsgValueError; |
1083 | 0 | } |
1084 | 0 | if ((!(RecvNewContentVideoDecoderManager(std::move(endpoint))))) { |
1085 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1086 | 0 | // Error handled in mozilla::ipc::IPCResult |
1087 | 0 | return MsgProcessingError; |
1088 | 0 | } |
1089 | 0 | |
1090 | 0 | return MsgProcessed; |
1091 | 0 | } |
1092 | 0 | case PGPU::Msg_RemoveLayerTreeIdMapping__ID: |
1093 | 0 | { |
1094 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
1095 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1096 | 0 | } |
1097 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_RemoveLayerTreeIdMapping", OTHER); |
1098 | 0 |
|
1099 | 0 | PickleIterator iter__(msg__); |
1100 | 0 | LayerTreeIdMapping mapping; |
1101 | 0 |
|
1102 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(mapping)))))) { |
1103 | 0 | FatalError("Error deserializing 'LayerTreeIdMapping'"); |
1104 | 0 | return MsgValueError; |
1105 | 0 | } |
1106 | 0 | // Sentinel = 'mapping' |
1107 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 601526733)))) { |
1108 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'LayerTreeIdMapping'"); |
1109 | 0 | return MsgValueError; |
1110 | 0 | } |
1111 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1112 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1113 | 0 | FatalError("Transition error"); |
1114 | 0 | return MsgValueError; |
1115 | 0 | } |
1116 | 0 | if ((!(RecvRemoveLayerTreeIdMapping(mapping)))) { |
1117 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1118 | 0 | // Error handled in mozilla::ipc::IPCResult |
1119 | 0 | return MsgProcessingError; |
1120 | 0 | } |
1121 | 0 | |
1122 | 0 | return MsgProcessed; |
1123 | 0 | } |
1124 | 0 | case PGPU::Msg_NotifyGpuObservers__ID: |
1125 | 0 | { |
1126 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
1127 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1128 | 0 | } |
1129 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_NotifyGpuObservers", OTHER); |
1130 | 0 |
|
1131 | 0 | PickleIterator iter__(msg__); |
1132 | 0 | nsCString aTopic; |
1133 | 0 |
|
1134 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aTopic)))))) { |
1135 | 0 | FatalError("Error deserializing 'nsCString'"); |
1136 | 0 | return MsgValueError; |
1137 | 0 | } |
1138 | 0 | // Sentinel = 'aTopic' |
1139 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2759450316)))) { |
1140 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
1141 | 0 | return MsgValueError; |
1142 | 0 | } |
1143 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1144 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1145 | 0 | FatalError("Transition error"); |
1146 | 0 | return MsgValueError; |
1147 | 0 | } |
1148 | 0 | if ((!(RecvNotifyGpuObservers(aTopic)))) { |
1149 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1150 | 0 | // Error handled in mozilla::ipc::IPCResult |
1151 | 0 | return MsgProcessingError; |
1152 | 0 | } |
1153 | 0 | |
1154 | 0 | return MsgProcessed; |
1155 | 0 | } |
1156 | 0 | case PGPU::Msg_RequestMemoryReport__ID: |
1157 | 0 | { |
1158 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
1159 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1160 | 0 | } |
1161 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_RequestMemoryReport", OTHER); |
1162 | 0 |
|
1163 | 0 | PickleIterator iter__(msg__); |
1164 | 0 | uint32_t generation; |
1165 | 0 | bool anonymize; |
1166 | 0 | bool minimizeMemoryUsage; |
1167 | 0 | MaybeFileDesc DMDFile; |
1168 | 0 |
|
1169 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(generation)))))) { |
1170 | 0 | FatalError("Error deserializing 'uint32_t'"); |
1171 | 0 | return MsgValueError; |
1172 | 0 | } |
1173 | 0 | // Sentinel = 'generation' |
1174 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1396961928)))) { |
1175 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'"); |
1176 | 0 | return MsgValueError; |
1177 | 0 | } |
1178 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(anonymize)))))) { |
1179 | 0 | FatalError("Error deserializing 'bool'"); |
1180 | 0 | return MsgValueError; |
1181 | 0 | } |
1182 | 0 | // Sentinel = 'anonymize' |
1183 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3334711915)))) { |
1184 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); |
1185 | 0 | return MsgValueError; |
1186 | 0 | } |
1187 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(minimizeMemoryUsage)))))) { |
1188 | 0 | FatalError("Error deserializing 'bool'"); |
1189 | 0 | return MsgValueError; |
1190 | 0 | } |
1191 | 0 | // Sentinel = 'minimizeMemoryUsage' |
1192 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3442464661)))) { |
1193 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); |
1194 | 0 | return MsgValueError; |
1195 | 0 | } |
1196 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(DMDFile)))))) { |
1197 | 0 | FatalError("Error deserializing 'MaybeFileDesc'"); |
1198 | 0 | return MsgValueError; |
1199 | 0 | } |
1200 | 0 | // Sentinel = 'DMDFile' |
1201 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3739167222)))) { |
1202 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'MaybeFileDesc'"); |
1203 | 0 | return MsgValueError; |
1204 | 0 | } |
1205 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1206 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1207 | 0 | FatalError("Transition error"); |
1208 | 0 | return MsgValueError; |
1209 | 0 | } |
1210 | 0 | if ((!(RecvRequestMemoryReport(generation, anonymize, minimizeMemoryUsage, DMDFile)))) { |
1211 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1212 | 0 | // Error handled in mozilla::ipc::IPCResult |
1213 | 0 | return MsgProcessingError; |
1214 | 0 | } |
1215 | 0 | |
1216 | 0 | return MsgProcessed; |
1217 | 0 | } |
1218 | 0 | case PGPU::Msg_ShutdownVR__ID: |
1219 | 0 | { |
1220 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
1221 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1222 | 0 | } |
1223 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_ShutdownVR", OTHER); |
1224 | 0 |
|
1225 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1226 | 0 | FatalError("Transition error"); |
1227 | 0 | return MsgValueError; |
1228 | 0 | } |
1229 | 0 | if ((!(RecvShutdownVR()))) { |
1230 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1231 | 0 | // Error handled in mozilla::ipc::IPCResult |
1232 | 0 | return MsgProcessingError; |
1233 | 0 | } |
1234 | 0 | |
1235 | 0 | return MsgProcessed; |
1236 | 0 | } |
1237 | 0 | default: |
1238 | 0 | { |
1239 | 0 | return MsgNotKnown; |
1240 | 0 | } |
1241 | 0 | case SHMEM_CREATED_MESSAGE_TYPE: |
1242 | 0 | { |
1243 | 0 | if ((!(ShmemCreated(msg__)))) { |
1244 | 0 | return MsgPayloadError; |
1245 | 0 | } |
1246 | 0 | return MsgProcessed; |
1247 | 0 | } |
1248 | 0 | case SHMEM_DESTROYED_MESSAGE_TYPE: |
1249 | 0 | { |
1250 | 0 | if ((!(ShmemDestroyed(msg__)))) { |
1251 | 0 | return MsgPayloadError; |
1252 | 0 | } |
1253 | 0 | return MsgProcessed; |
1254 | 0 | } |
1255 | 0 | } |
1256 | 0 | } |
1257 | | |
1258 | | auto PGPUParent::OnMessageReceived( |
1259 | | const Message& msg__, |
1260 | | Message*& reply__) -> PGPUParent::Result |
1261 | 0 | { |
1262 | 0 | int32_t route__ = (msg__).routing_id(); |
1263 | 0 | if ((MSG_ROUTING_CONTROL) != (route__)) { |
1264 | 0 | IProtocol* routed__ = Lookup(route__); |
1265 | 0 | if ((!(routed__))) { |
1266 | 0 | return MsgRouteError; |
1267 | 0 | } |
1268 | 0 | return (routed__)->OnMessageReceived(msg__, reply__); |
1269 | 0 | } |
1270 | 0 | |
1271 | 0 | switch ((msg__).type()) { |
1272 | 0 | case PGPU::Msg_AddLayerTreeIdMapping__ID: |
1273 | 0 | { |
1274 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
1275 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1276 | 0 | } |
1277 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_AddLayerTreeIdMapping", OTHER); |
1278 | 0 |
|
1279 | 0 | PickleIterator iter__(msg__); |
1280 | 0 | LayerTreeIdMapping mapping; |
1281 | 0 |
|
1282 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(mapping)))))) { |
1283 | 0 | FatalError("Error deserializing 'LayerTreeIdMapping'"); |
1284 | 0 | return MsgValueError; |
1285 | 0 | } |
1286 | 0 | // Sentinel = 'mapping' |
1287 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 601526733)))) { |
1288 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'LayerTreeIdMapping'"); |
1289 | 0 | return MsgValueError; |
1290 | 0 | } |
1291 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1292 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1293 | 0 | FatalError("Transition error"); |
1294 | 0 | return MsgValueError; |
1295 | 0 | } |
1296 | 0 | int32_t id__ = MSG_ROUTING_CONTROL; |
1297 | 0 | if ((!(RecvAddLayerTreeIdMapping(mapping)))) { |
1298 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1299 | 0 | // Error handled in mozilla::ipc::IPCResult |
1300 | 0 | return MsgProcessingError; |
1301 | 0 | } |
1302 | 0 | |
1303 | 0 | reply__ = PGPU::Reply_AddLayerTreeIdMapping(id__); |
1304 | 0 |
|
1305 | 0 |
|
1306 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
1307 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1308 | 0 | } |
1309 | 0 | return MsgProcessed; |
1310 | 0 | } |
1311 | 0 | case PGPU::Msg_GetDeviceStatus__ID: |
1312 | 0 | { |
1313 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
1314 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1315 | 0 | } |
1316 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_GetDeviceStatus", OTHER); |
1317 | 0 |
|
1318 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1319 | 0 | FatalError("Transition error"); |
1320 | 0 | return MsgValueError; |
1321 | 0 | } |
1322 | 0 | int32_t id__ = MSG_ROUTING_CONTROL; |
1323 | 0 | GPUDeviceData status; |
1324 | 0 | if ((!(RecvGetDeviceStatus((&(status)))))) { |
1325 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1326 | 0 | // Error handled in mozilla::ipc::IPCResult |
1327 | 0 | return MsgProcessingError; |
1328 | 0 | } |
1329 | 0 | |
1330 | 0 | reply__ = PGPU::Reply_GetDeviceStatus(id__); |
1331 | 0 |
|
1332 | 0 | WriteIPDLParam(reply__, this, status); |
1333 | 0 | // Sentinel = 'status' |
1334 | 0 | (reply__)->WriteSentinel(3714608576); |
1335 | 0 |
|
1336 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
1337 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1338 | 0 | } |
1339 | 0 | return MsgProcessed; |
1340 | 0 | } |
1341 | 0 | case PGPU::Msg_SimulateDeviceReset__ID: |
1342 | 0 | { |
1343 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
1344 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1345 | 0 | } |
1346 | 0 | AUTO_PROFILER_LABEL("PGPU::Msg_SimulateDeviceReset", OTHER); |
1347 | 0 |
|
1348 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1349 | 0 | FatalError("Transition error"); |
1350 | 0 | return MsgValueError; |
1351 | 0 | } |
1352 | 0 | int32_t id__ = MSG_ROUTING_CONTROL; |
1353 | 0 | GPUDeviceData status; |
1354 | 0 | if ((!(RecvSimulateDeviceReset((&(status)))))) { |
1355 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1356 | 0 | // Error handled in mozilla::ipc::IPCResult |
1357 | 0 | return MsgProcessingError; |
1358 | 0 | } |
1359 | 0 | |
1360 | 0 | reply__ = PGPU::Reply_SimulateDeviceReset(id__); |
1361 | 0 |
|
1362 | 0 | WriteIPDLParam(reply__, this, status); |
1363 | 0 | // Sentinel = 'status' |
1364 | 0 | (reply__)->WriteSentinel(3714608576); |
1365 | 0 |
|
1366 | 0 | if (mozilla::ipc::LoggingEnabledFor("PGPUParent")) { |
1367 | 0 | mozilla::ipc::LogMessageForProtocol("PGPUParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1368 | 0 | } |
1369 | 0 | return MsgProcessed; |
1370 | 0 | } |
1371 | 0 | default: |
1372 | 0 | { |
1373 | 0 | return MsgNotKnown; |
1374 | 0 | } |
1375 | 0 | } |
1376 | 0 | } |
1377 | | |
1378 | | auto PGPUParent::OnCallReceived( |
1379 | | const Message& msg__, |
1380 | | Message*& reply__) -> PGPUParent::Result |
1381 | 0 | { |
1382 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
1383 | 0 | return MsgNotKnown; |
1384 | 0 | } |
1385 | | |
1386 | | auto PGPUParent::GetProtocolTypeId() -> int32_t |
1387 | 0 | { |
1388 | 0 | return PGPUMsgStart; |
1389 | 0 | } |
1390 | | |
1391 | | auto PGPUParent::OnChannelClose() -> void |
1392 | 0 | { |
1393 | 0 | DestroySubtree(NormalShutdown); |
1394 | 0 | DeallocSubtree(); |
1395 | 0 | DeallocShmems(); |
1396 | 0 | DeallocPGPUParent(); |
1397 | 0 | } |
1398 | | |
1399 | | auto PGPUParent::OnChannelError() -> void |
1400 | 0 | { |
1401 | 0 | DestroySubtree(AbnormalShutdown); |
1402 | 0 | DeallocSubtree(); |
1403 | 0 | DeallocShmems(); |
1404 | 0 | DeallocPGPUParent(); |
1405 | 0 | } |
1406 | | |
1407 | | auto PGPUParent::DestroySubtree(ActorDestroyReason why) -> void |
1408 | 0 | { |
1409 | 0 | ActorDestroyReason subtreewhy = (((why) == (Deletion)) || ((why) == (FailedConstructor)) ? AncestorDeletion : why); |
1410 | 0 |
|
1411 | 0 | { |
1412 | 0 | // Recursively shutting down PAPZInputBridge kids |
1413 | 0 | nsTArray<PAPZInputBridgeParent*> kids; |
1414 | 0 | // Accumulate kids into a stable structure to iterate over |
1415 | 0 | ManagedPAPZInputBridgeParent(kids); |
1416 | 0 | for (auto& kid : kids) { |
1417 | 0 | // Guarding against a child removing a sibling from the list during the iteration. |
1418 | 0 | if ((mManagedPAPZInputBridgeParent).Contains(kid)) { |
1419 | 0 | (kid)->DestroySubtree(subtreewhy); |
1420 | 0 | } |
1421 | 0 | } |
1422 | 0 | } |
1423 | 0 |
|
1424 | 0 | // Reject owning pending responses. |
1425 | 0 | (GetIPCChannel())->RejectPendingResponsesForActor(this); |
1426 | 0 |
|
1427 | 0 | // Finally, destroy "us". |
1428 | 0 | ActorDestroy(why); |
1429 | 0 | } |
1430 | | |
1431 | | auto PGPUParent::DeallocSubtree() -> void |
1432 | 0 | { |
1433 | 0 | { |
1434 | 0 | // Recursively deleting PAPZInputBridge kids |
1435 | 0 | for (auto iter = (mManagedPAPZInputBridgeParent).Iter(); (!((iter).Done())); (iter).Next()) { |
1436 | 0 | (((iter).Get())->GetKey())->DeallocSubtree(); |
1437 | 0 | } |
1438 | 0 |
|
1439 | 0 | for (auto iter = (mManagedPAPZInputBridgeParent).Iter(); (!((iter).Done())); (iter).Next()) { |
1440 | 0 | DeallocPAPZInputBridgeParent(((iter).Get())->GetKey()); |
1441 | 0 | } |
1442 | 0 | (mManagedPAPZInputBridgeParent).Clear(); |
1443 | 0 | } |
1444 | 0 | } |
1445 | | |
1446 | | auto PGPUParent::DeallocPGPUParent() -> void |
1447 | 0 | { |
1448 | 0 | } |
1449 | | |
1450 | | |
1451 | | |
1452 | | } // namespace gfx |
1453 | | } // namespace mozilla |
1454 | | namespace mozilla { |
1455 | | namespace ipc { |
1456 | | auto IPDLParamTraits<mozilla::gfx::PGPUParent>::Write( |
1457 | | IPC::Message* aMsg, |
1458 | | mozilla::ipc::IProtocol* aActor, |
1459 | | const paramType& aVar) -> void |
1460 | 0 | { |
1461 | 0 | int32_t id; |
1462 | 0 | if ((!(aVar))) { |
1463 | 0 | id = 0; |
1464 | 0 | } |
1465 | 0 | else { |
1466 | 0 | id = (aVar)->Id(); |
1467 | 0 | if ((1) == (id)) { |
1468 | 0 | (aActor)->FatalError("actor has been |delete|d"); |
1469 | 0 | } |
1470 | 0 | } |
1471 | 0 | WriteIPDLParam(aMsg, aActor, id); |
1472 | 0 | } |
1473 | | |
1474 | | auto IPDLParamTraits<mozilla::gfx::PGPUParent>::Read( |
1475 | | const IPC::Message* aMsg, |
1476 | | PickleIterator* aIter, |
1477 | | mozilla::ipc::IProtocol* aActor, |
1478 | | paramType* aVar) -> bool |
1479 | 0 | { |
1480 | 0 | mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PGPU", PGPUMsgStart); |
1481 | 0 | if ((actor).isNothing()) { |
1482 | 0 | return false; |
1483 | 0 | } |
1484 | 0 | |
1485 | 0 | (*(aVar)) = static_cast<mozilla::gfx::PGPUParent*>((actor).value()); |
1486 | 0 | return true; |
1487 | 0 | } |
1488 | | |
1489 | | } // namespace ipc |
1490 | | } // namespace mozilla |