/work/obj-fuzz/ipc/ipdl/PCompositorBridgeParent.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | // |
2 | | // Automatically generated by ipdlc. |
3 | | // Edit at your own risk |
4 | | // |
5 | | |
6 | | |
7 | | #include "mozilla/layers/PCompositorBridgeParent.h" |
8 | | #include "FrameMetrics.h" |
9 | | #include "ipc/IPCMessageUtils.h" |
10 | | #include "mozilla/TimeStamp.h" |
11 | | #include "mozilla/layers/CompositorTypes.h" |
12 | | #include "mozilla/layers/FrameUniformityData.h" |
13 | | #include "mozilla/layers/LayersTypes.h" |
14 | | |
15 | | #include "mozilla/layers/PAPZParent.h" |
16 | | #include "mozilla/layers/PAPZCTreeManagerParent.h" |
17 | | #include "mozilla/dom/PBrowserParent.h" |
18 | | #include "mozilla/layers/PCompositorManagerParent.h" |
19 | | #include "mozilla/widget/PCompositorWidgetParent.h" |
20 | | #include "mozilla/layers/PLayerTransactionParent.h" |
21 | | #include "mozilla/layers/PTextureParent.h" |
22 | | #include "mozilla/layers/PWebRenderBridgeParent.h" |
23 | | |
24 | | #include "nsIFile.h" |
25 | | #include "GeckoProfiler.h" |
26 | | |
27 | | namespace mozilla { |
28 | | namespace layers { |
29 | | |
30 | | |
31 | | auto PCompositorBridgeParent::Recv__delete__() -> mozilla::ipc::IPCResult |
32 | 0 | { |
33 | 0 | return IPC_OK(); |
34 | 0 | } |
35 | | |
36 | | auto PCompositorBridgeParent::RecvPCompositorWidgetConstructor( |
37 | | PCompositorWidgetParent* actor, |
38 | | const CompositorWidgetInitData& aInitData) -> mozilla::ipc::IPCResult |
39 | 0 | { |
40 | 0 | return IPC_OK(); |
41 | 0 | } |
42 | | |
43 | | auto PCompositorBridgeParent::RecvPAPZConstructor( |
44 | | PAPZParent* actor, |
45 | | const LayersId& layersId) -> mozilla::ipc::IPCResult |
46 | 0 | { |
47 | 0 | return IPC_OK(); |
48 | 0 | } |
49 | | |
50 | | auto PCompositorBridgeParent::RecvPAPZCTreeManagerConstructor( |
51 | | PAPZCTreeManagerParent* actor, |
52 | | const LayersId& layersId) -> mozilla::ipc::IPCResult |
53 | 0 | { |
54 | 0 | return IPC_OK(); |
55 | 0 | } |
56 | | |
57 | | auto PCompositorBridgeParent::RecvPLayerTransactionConstructor( |
58 | | PLayerTransactionParent* actor, |
59 | | nsTArray<LayersBackend>&& layersBackendHints, |
60 | | const LayersId& id) -> mozilla::ipc::IPCResult |
61 | 0 | { |
62 | 0 | return IPC_OK(); |
63 | 0 | } |
64 | | |
65 | | auto PCompositorBridgeParent::RecvPTextureConstructor( |
66 | | PTextureParent* actor, |
67 | | const SurfaceDescriptor& aSharedData, |
68 | | const ReadLockDescriptor& aReadLock, |
69 | | const LayersBackend& aBackend, |
70 | | const TextureFlags& aTextureFlags, |
71 | | const LayersId& id, |
72 | | const uint64_t& aSerial, |
73 | | const MaybeExternalImageId& aExternalImageId) -> mozilla::ipc::IPCResult |
74 | 0 | { |
75 | 0 | return IPC_OK(); |
76 | 0 | } |
77 | | |
78 | | auto PCompositorBridgeParent::RecvPWebRenderBridgeConstructor( |
79 | | PWebRenderBridgeParent* actor, |
80 | | const PipelineId& pipelineId, |
81 | | const LayoutDeviceIntSize& aSize, |
82 | | TextureFactoryIdentifier* textureFactoryIdentifier, |
83 | | IdNamespace* idNamespace) -> mozilla::ipc::IPCResult |
84 | 0 | { |
85 | 0 | return IPC_OK(); |
86 | 0 | } |
87 | | |
88 | | auto PCompositorBridgeParent::ActorDestroy(ActorDestroyReason aWhy) -> void |
89 | 0 | { |
90 | 0 | } |
91 | | |
92 | | MOZ_IMPLICIT PCompositorBridgeParent::PCompositorBridgeParent() : |
93 | | mozilla::ipc::IProtocol(mozilla::ipc::ParentSide), |
94 | | mLivenessState(mozilla::ipc::LivenessState::Dead) |
95 | 0 | { |
96 | 0 | MOZ_COUNT_CTOR(PCompositorBridgeParent); |
97 | 0 | } |
98 | | |
99 | | PCompositorBridgeParent::~PCompositorBridgeParent() |
100 | 0 | { |
101 | 0 | MOZ_COUNT_DTOR(PCompositorBridgeParent); |
102 | 0 | } |
103 | | |
104 | | auto PCompositorBridgeParent::Manager() const -> PCompositorManagerParent* |
105 | 0 | { |
106 | 0 | return static_cast<PCompositorManagerParent*>(IProtocol::Manager()); |
107 | 0 | } |
108 | | |
109 | | auto PCompositorBridgeParent::ManagedPAPZParent(nsTArray<PAPZParent*>& aArr) const -> void |
110 | 0 | { |
111 | 0 | (mManagedPAPZParent).ToArray(aArr); |
112 | 0 | } |
113 | | |
114 | | auto PCompositorBridgeParent::ManagedPAPZParent() const -> const ManagedContainer<PAPZParent>& |
115 | 0 | { |
116 | 0 | return mManagedPAPZParent; |
117 | 0 | } |
118 | | |
119 | | auto PCompositorBridgeParent::ManagedPAPZCTreeManagerParent(nsTArray<PAPZCTreeManagerParent*>& aArr) const -> void |
120 | 0 | { |
121 | 0 | (mManagedPAPZCTreeManagerParent).ToArray(aArr); |
122 | 0 | } |
123 | | |
124 | | auto PCompositorBridgeParent::ManagedPAPZCTreeManagerParent() const -> const ManagedContainer<PAPZCTreeManagerParent>& |
125 | 0 | { |
126 | 0 | return mManagedPAPZCTreeManagerParent; |
127 | 0 | } |
128 | | |
129 | | auto PCompositorBridgeParent::ManagedPLayerTransactionParent(nsTArray<PLayerTransactionParent*>& aArr) const -> void |
130 | 0 | { |
131 | 0 | (mManagedPLayerTransactionParent).ToArray(aArr); |
132 | 0 | } |
133 | | |
134 | | auto PCompositorBridgeParent::ManagedPLayerTransactionParent() const -> const ManagedContainer<PLayerTransactionParent>& |
135 | 0 | { |
136 | 0 | return mManagedPLayerTransactionParent; |
137 | 0 | } |
138 | | |
139 | | auto PCompositorBridgeParent::ManagedPTextureParent(nsTArray<PTextureParent*>& aArr) const -> void |
140 | 0 | { |
141 | 0 | (mManagedPTextureParent).ToArray(aArr); |
142 | 0 | } |
143 | | |
144 | | auto PCompositorBridgeParent::ManagedPTextureParent() const -> const ManagedContainer<PTextureParent>& |
145 | 0 | { |
146 | 0 | return mManagedPTextureParent; |
147 | 0 | } |
148 | | |
149 | | auto PCompositorBridgeParent::ManagedPCompositorWidgetParent(nsTArray<PCompositorWidgetParent*>& aArr) const -> void |
150 | 0 | { |
151 | 0 | (mManagedPCompositorWidgetParent).ToArray(aArr); |
152 | 0 | } |
153 | | |
154 | | auto PCompositorBridgeParent::ManagedPCompositorWidgetParent() const -> const ManagedContainer<PCompositorWidgetParent>& |
155 | 0 | { |
156 | 0 | return mManagedPCompositorWidgetParent; |
157 | 0 | } |
158 | | |
159 | | auto PCompositorBridgeParent::ManagedPWebRenderBridgeParent(nsTArray<PWebRenderBridgeParent*>& aArr) const -> void |
160 | 0 | { |
161 | 0 | (mManagedPWebRenderBridgeParent).ToArray(aArr); |
162 | 0 | } |
163 | | |
164 | | auto PCompositorBridgeParent::ManagedPWebRenderBridgeParent() const -> const ManagedContainer<PWebRenderBridgeParent>& |
165 | 0 | { |
166 | 0 | return mManagedPWebRenderBridgeParent; |
167 | 0 | } |
168 | | |
169 | | auto PCompositorBridgeParent::SendInvalidateLayers(const LayersId& layersId) -> bool |
170 | 0 | { |
171 | 0 | IPC::Message* msg__ = PCompositorBridge::Msg_InvalidateLayers(Id()); |
172 | 0 |
|
173 | 0 | WriteIPDLParam(msg__, this, layersId); |
174 | 0 | // Sentinel = 'layersId' |
175 | 0 | (msg__)->WriteSentinel(2382073245); |
176 | 0 |
|
177 | 0 |
|
178 | 0 |
|
179 | 0 |
|
180 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
181 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
182 | 0 | } |
183 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_InvalidateLayers", OTHER); |
184 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
185 | 0 | mozilla::ipc::LogicError("Transition error"); |
186 | 0 | } |
187 | 0 |
|
188 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
189 | 0 | return sendok__; |
190 | 0 | } |
191 | | |
192 | | auto PCompositorBridgeParent::SendDidComposite( |
193 | | const LayersId& id, |
194 | | const TransactionId& transactionId, |
195 | | const TimeStamp& compositeStart, |
196 | | const TimeStamp& compositeEnd) -> bool |
197 | 0 | { |
198 | 0 | IPC::Message* msg__ = PCompositorBridge::Msg_DidComposite(Id()); |
199 | 0 |
|
200 | 0 | WriteIPDLParam(msg__, this, id); |
201 | 0 | // Sentinel = 'id' |
202 | 0 | (msg__)->WriteSentinel(2794505629); |
203 | 0 | WriteIPDLParam(msg__, this, transactionId); |
204 | 0 | // Sentinel = 'transactionId' |
205 | 0 | (msg__)->WriteSentinel(3330976378); |
206 | 0 | WriteIPDLParam(msg__, this, compositeStart); |
207 | 0 | // Sentinel = 'compositeStart' |
208 | 0 | (msg__)->WriteSentinel(2314271973); |
209 | 0 | WriteIPDLParam(msg__, this, compositeEnd); |
210 | 0 | // Sentinel = 'compositeEnd' |
211 | 0 | (msg__)->WriteSentinel(3871762396); |
212 | 0 |
|
213 | 0 |
|
214 | 0 |
|
215 | 0 |
|
216 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
217 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
218 | 0 | } |
219 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_DidComposite", OTHER); |
220 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
221 | 0 | mozilla::ipc::LogicError("Transition error"); |
222 | 0 | } |
223 | 0 |
|
224 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
225 | 0 | return sendok__; |
226 | 0 | } |
227 | | |
228 | | auto PCompositorBridgeParent::SendRemotePaintIsReady() -> bool |
229 | 0 | { |
230 | 0 | IPC::Message* msg__ = PCompositorBridge::Msg_RemotePaintIsReady(Id()); |
231 | 0 |
|
232 | 0 |
|
233 | 0 |
|
234 | 0 |
|
235 | 0 |
|
236 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
237 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
238 | 0 | } |
239 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_RemotePaintIsReady", OTHER); |
240 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
241 | 0 | mozilla::ipc::LogicError("Transition error"); |
242 | 0 | } |
243 | 0 |
|
244 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
245 | 0 | return sendok__; |
246 | 0 | } |
247 | | |
248 | | auto PCompositorBridgeParent::SendUpdatePluginConfigurations( |
249 | | const LayoutDeviceIntPoint& aContentOffset, |
250 | | const LayoutDeviceIntRegion& aVisibleRegion, |
251 | | const nsTArray<PluginWindowData>& aPlugins) -> bool |
252 | 0 | { |
253 | 0 | IPC::Message* msg__ = PCompositorBridge::Msg_UpdatePluginConfigurations(Id()); |
254 | 0 |
|
255 | 0 | WriteIPDLParam(msg__, this, aContentOffset); |
256 | 0 | // Sentinel = 'aContentOffset' |
257 | 0 | (msg__)->WriteSentinel(2149079995); |
258 | 0 | WriteIPDLParam(msg__, this, aVisibleRegion); |
259 | 0 | // Sentinel = 'aVisibleRegion' |
260 | 0 | (msg__)->WriteSentinel(24324155); |
261 | 0 | WriteIPDLParam(msg__, this, aPlugins); |
262 | 0 | // Sentinel = 'aPlugins' |
263 | 0 | (msg__)->WriteSentinel(1444186915); |
264 | 0 |
|
265 | 0 |
|
266 | 0 |
|
267 | 0 |
|
268 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
269 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
270 | 0 | } |
271 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_UpdatePluginConfigurations", OTHER); |
272 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
273 | 0 | mozilla::ipc::LogicError("Transition error"); |
274 | 0 | } |
275 | 0 |
|
276 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
277 | 0 | return sendok__; |
278 | 0 | } |
279 | | |
280 | | auto PCompositorBridgeParent::SendCaptureAllPlugins(const uintptr_t& aParentWidget) -> bool |
281 | 0 | { |
282 | 0 | IPC::Message* msg__ = PCompositorBridge::Msg_CaptureAllPlugins(Id()); |
283 | 0 |
|
284 | 0 | WriteIPDLParam(msg__, this, aParentWidget); |
285 | 0 | // Sentinel = 'aParentWidget' |
286 | 0 | (msg__)->WriteSentinel(2198235748); |
287 | 0 |
|
288 | 0 |
|
289 | 0 |
|
290 | 0 |
|
291 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
292 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
293 | 0 | } |
294 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_CaptureAllPlugins", OTHER); |
295 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
296 | 0 | mozilla::ipc::LogicError("Transition error"); |
297 | 0 | } |
298 | 0 |
|
299 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
300 | 0 | return sendok__; |
301 | 0 | } |
302 | | |
303 | | auto PCompositorBridgeParent::SendHideAllPlugins(const uintptr_t& aParentWidget) -> bool |
304 | 0 | { |
305 | 0 | IPC::Message* msg__ = PCompositorBridge::Msg_HideAllPlugins(Id()); |
306 | 0 |
|
307 | 0 | WriteIPDLParam(msg__, this, aParentWidget); |
308 | 0 | // Sentinel = 'aParentWidget' |
309 | 0 | (msg__)->WriteSentinel(2198235748); |
310 | 0 |
|
311 | 0 |
|
312 | 0 |
|
313 | 0 |
|
314 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
315 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
316 | 0 | } |
317 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_HideAllPlugins", OTHER); |
318 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
319 | 0 | mozilla::ipc::LogicError("Transition error"); |
320 | 0 | } |
321 | 0 |
|
322 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
323 | 0 | return sendok__; |
324 | 0 | } |
325 | | |
326 | | auto PCompositorBridgeParent::SendParentAsyncMessages(const nsTArray<AsyncParentMessageData>& aMessages) -> bool |
327 | 0 | { |
328 | 0 | IPC::Message* msg__ = PCompositorBridge::Msg_ParentAsyncMessages(Id()); |
329 | 0 |
|
330 | 0 | WriteIPDLParam(msg__, this, aMessages); |
331 | 0 | // Sentinel = 'aMessages' |
332 | 0 | (msg__)->WriteSentinel(1923086976); |
333 | 0 |
|
334 | 0 |
|
335 | 0 |
|
336 | 0 |
|
337 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
338 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
339 | 0 | } |
340 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_ParentAsyncMessages", OTHER); |
341 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
342 | 0 | mozilla::ipc::LogicError("Transition error"); |
343 | 0 | } |
344 | 0 |
|
345 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
346 | 0 | return sendok__; |
347 | 0 | } |
348 | | |
349 | | auto PCompositorBridgeParent::SendObserveLayersUpdate( |
350 | | const LayersId& aLayersId, |
351 | | const LayersObserverEpoch& aEpoch, |
352 | | const bool& aActive) -> bool |
353 | 0 | { |
354 | 0 | IPC::Message* msg__ = PCompositorBridge::Msg_ObserveLayersUpdate(Id()); |
355 | 0 |
|
356 | 0 | WriteIPDLParam(msg__, this, aLayersId); |
357 | 0 | // Sentinel = 'aLayersId' |
358 | 0 | (msg__)->WriteSentinel(1401196721); |
359 | 0 | WriteIPDLParam(msg__, this, aEpoch); |
360 | 0 | // Sentinel = 'aEpoch' |
361 | 0 | (msg__)->WriteSentinel(2333012390); |
362 | 0 | WriteIPDLParam(msg__, this, aActive); |
363 | 0 | // Sentinel = 'aActive' |
364 | 0 | (msg__)->WriteSentinel(1215369048); |
365 | 0 |
|
366 | 0 |
|
367 | 0 |
|
368 | 0 |
|
369 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
370 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
371 | 0 | } |
372 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_ObserveLayersUpdate", OTHER); |
373 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
374 | 0 | mozilla::ipc::LogicError("Transition error"); |
375 | 0 | } |
376 | 0 |
|
377 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
378 | 0 | return sendok__; |
379 | 0 | } |
380 | | |
381 | | auto PCompositorBridgeParent::SendSharedCompositorFrameMetrics( |
382 | | const Handle& metrics, |
383 | | const CrossProcessMutexHandle& mutex, |
384 | | const LayersId& aLayersId, |
385 | | const uint32_t& aAPZCId) -> bool |
386 | 0 | { |
387 | 0 | IPC::Message* msg__ = PCompositorBridge::Msg_SharedCompositorFrameMetrics(Id()); |
388 | 0 |
|
389 | 0 | WriteIPDLParam(msg__, this, metrics); |
390 | 0 | // Sentinel = 'metrics' |
391 | 0 | (msg__)->WriteSentinel(293471184); |
392 | 0 | WriteIPDLParam(msg__, this, mutex); |
393 | 0 | // Sentinel = 'mutex' |
394 | 0 | (msg__)->WriteSentinel(4247164084); |
395 | 0 | WriteIPDLParam(msg__, this, aLayersId); |
396 | 0 | // Sentinel = 'aLayersId' |
397 | 0 | (msg__)->WriteSentinel(1401196721); |
398 | 0 | WriteIPDLParam(msg__, this, aAPZCId); |
399 | 0 | // Sentinel = 'aAPZCId' |
400 | 0 | (msg__)->WriteSentinel(1661101435); |
401 | 0 |
|
402 | 0 |
|
403 | 0 |
|
404 | 0 |
|
405 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
406 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
407 | 0 | } |
408 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_SharedCompositorFrameMetrics", OTHER); |
409 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
410 | 0 | mozilla::ipc::LogicError("Transition error"); |
411 | 0 | } |
412 | 0 |
|
413 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
414 | 0 | return sendok__; |
415 | 0 | } |
416 | | |
417 | | auto PCompositorBridgeParent::SendReleaseSharedCompositorFrameMetrics( |
418 | | const ViewID& aId, |
419 | | const uint32_t& aAPZCId) -> bool |
420 | 0 | { |
421 | 0 | IPC::Message* msg__ = PCompositorBridge::Msg_ReleaseSharedCompositorFrameMetrics(Id()); |
422 | 0 |
|
423 | 0 | WriteIPDLParam(msg__, this, aId); |
424 | 0 | // Sentinel = 'aId' |
425 | 0 | (msg__)->WriteSentinel(2735041817); |
426 | 0 | WriteIPDLParam(msg__, this, aAPZCId); |
427 | 0 | // Sentinel = 'aAPZCId' |
428 | 0 | (msg__)->WriteSentinel(1661101435); |
429 | 0 |
|
430 | 0 |
|
431 | 0 |
|
432 | 0 |
|
433 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
434 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
435 | 0 | } |
436 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_ReleaseSharedCompositorFrameMetrics", OTHER); |
437 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
438 | 0 | mozilla::ipc::LogicError("Transition error"); |
439 | 0 | } |
440 | 0 |
|
441 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
442 | 0 | return sendok__; |
443 | 0 | } |
444 | | |
445 | | auto PCompositorBridgeParent::SendNotifyWebRenderError(const WebRenderError& error) -> bool |
446 | 0 | { |
447 | 0 | IPC::Message* msg__ = PCompositorBridge::Msg_NotifyWebRenderError(Id()); |
448 | 0 |
|
449 | 0 | WriteIPDLParam(msg__, this, error); |
450 | 0 | // Sentinel = 'error' |
451 | 0 | (msg__)->WriteSentinel(313726327); |
452 | 0 |
|
453 | 0 |
|
454 | 0 |
|
455 | 0 |
|
456 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
457 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
458 | 0 | } |
459 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_NotifyWebRenderError", OTHER); |
460 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
461 | 0 | mozilla::ipc::LogicError("Transition error"); |
462 | 0 | } |
463 | 0 |
|
464 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
465 | 0 | return sendok__; |
466 | 0 | } |
467 | | |
468 | | auto PCompositorBridgeParent::RemoveManagee( |
469 | | int32_t aProtocolId, |
470 | | IProtocol* aListener) -> void |
471 | 0 | { |
472 | 0 | switch (aProtocolId) { |
473 | 0 | case PAPZMsgStart: |
474 | 0 | { |
475 | 0 | PAPZParent* actor = static_cast<PAPZParent*>(aListener); |
476 | 0 | auto& container = mManagedPAPZParent; |
477 | 0 | MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!"); |
478 | 0 |
|
479 | 0 | (container).RemoveEntry(actor); |
480 | 0 | DeallocPAPZParent(actor); |
481 | 0 | return; |
482 | 0 | } |
483 | 0 | case PAPZCTreeManagerMsgStart: |
484 | 0 | { |
485 | 0 | PAPZCTreeManagerParent* actor = static_cast<PAPZCTreeManagerParent*>(aListener); |
486 | 0 | auto& container = mManagedPAPZCTreeManagerParent; |
487 | 0 | MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!"); |
488 | 0 |
|
489 | 0 | (container).RemoveEntry(actor); |
490 | 0 | DeallocPAPZCTreeManagerParent(actor); |
491 | 0 | return; |
492 | 0 | } |
493 | 0 | case PLayerTransactionMsgStart: |
494 | 0 | { |
495 | 0 | PLayerTransactionParent* actor = static_cast<PLayerTransactionParent*>(aListener); |
496 | 0 | auto& container = mManagedPLayerTransactionParent; |
497 | 0 | MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!"); |
498 | 0 |
|
499 | 0 | (container).RemoveEntry(actor); |
500 | 0 | DeallocPLayerTransactionParent(actor); |
501 | 0 | return; |
502 | 0 | } |
503 | 0 | case PTextureMsgStart: |
504 | 0 | { |
505 | 0 | PTextureParent* actor = static_cast<PTextureParent*>(aListener); |
506 | 0 | auto& container = mManagedPTextureParent; |
507 | 0 | MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!"); |
508 | 0 |
|
509 | 0 | (container).RemoveEntry(actor); |
510 | 0 | DeallocPTextureParent(actor); |
511 | 0 | return; |
512 | 0 | } |
513 | 0 | case PCompositorWidgetMsgStart: |
514 | 0 | { |
515 | 0 | PCompositorWidgetParent* actor = static_cast<PCompositorWidgetParent*>(aListener); |
516 | 0 | auto& container = mManagedPCompositorWidgetParent; |
517 | 0 | MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!"); |
518 | 0 |
|
519 | 0 | (container).RemoveEntry(actor); |
520 | 0 | DeallocPCompositorWidgetParent(actor); |
521 | 0 | return; |
522 | 0 | } |
523 | 0 | case PWebRenderBridgeMsgStart: |
524 | 0 | { |
525 | 0 | PWebRenderBridgeParent* actor = static_cast<PWebRenderBridgeParent*>(aListener); |
526 | 0 | auto& container = mManagedPWebRenderBridgeParent; |
527 | 0 | MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!"); |
528 | 0 |
|
529 | 0 | (container).RemoveEntry(actor); |
530 | 0 | DeallocPWebRenderBridgeParent(actor); |
531 | 0 | return; |
532 | 0 | } |
533 | 0 | default: |
534 | 0 | { |
535 | 0 | FatalError("unreached"); |
536 | 0 | return; |
537 | 0 | } |
538 | 0 | } |
539 | 0 | } |
540 | | |
541 | | auto PCompositorBridgeParent::OnMessageReceived(const Message& msg__) -> PCompositorBridgeParent::Result |
542 | 0 | { |
543 | 0 | switch ((msg__).type()) { |
544 | 0 | case PCompositorBridge::Msg___delete____ID: |
545 | 0 | { |
546 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
547 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
548 | 0 | } |
549 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg___delete__", OTHER); |
550 | 0 |
|
551 | 0 | PickleIterator iter__(msg__); |
552 | 0 | PCompositorBridgeParent* actor; |
553 | 0 |
|
554 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(actor)))))) { |
555 | 0 | FatalError("Error deserializing 'PCompositorBridgeParent'"); |
556 | 0 | return MsgValueError; |
557 | 0 | } |
558 | 0 | if ((!((*((&(actor))))))) { |
559 | 0 | FatalError("Error deserializing 'PCompositorBridgeParent'"); |
560 | 0 | return MsgValueError; |
561 | 0 | } |
562 | 0 | // Sentinel = 'actor' |
563 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
564 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PCompositorBridgeParent'"); |
565 | 0 | return MsgValueError; |
566 | 0 | } |
567 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
568 | 0 | if ((!(StateTransition(true, (&(mLivenessState)))))) { |
569 | 0 | FatalError("Transition error"); |
570 | 0 | return MsgValueError; |
571 | 0 | } |
572 | 0 | if ((!(Recv__delete__()))) { |
573 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
574 | 0 | // Error handled in mozilla::ipc::IPCResult |
575 | 0 | return MsgProcessingError; |
576 | 0 | } |
577 | 0 | |
578 | 0 | |
579 | 0 | IProtocol* mgr = (actor)->Manager(); |
580 | 0 | (actor)->DestroySubtree(Deletion); |
581 | 0 | (actor)->DeallocSubtree(); |
582 | 0 | (mgr)->RemoveManagee(PCompositorBridgeMsgStart, actor); |
583 | 0 |
|
584 | 0 | return MsgProcessed; |
585 | 0 | } |
586 | 0 | case PCompositorBridge::Msg_PCompositorWidgetConstructor__ID: |
587 | 0 | { |
588 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
589 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
590 | 0 | } |
591 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_PCompositorWidgetConstructor", OTHER); |
592 | 0 |
|
593 | 0 | PickleIterator iter__(msg__); |
594 | 0 | ActorHandle handle__; |
595 | 0 | PCompositorWidgetParent* actor; |
596 | 0 | CompositorWidgetInitData aInitData; |
597 | 0 |
|
598 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(handle__)))))) { |
599 | 0 | FatalError("Error deserializing 'ActorHandle'"); |
600 | 0 | return MsgValueError; |
601 | 0 | } |
602 | 0 | // Sentinel = 'actor' |
603 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
604 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'"); |
605 | 0 | return MsgValueError; |
606 | 0 | } |
607 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aInitData)))))) { |
608 | 0 | FatalError("Error deserializing 'CompositorWidgetInitData'"); |
609 | 0 | return MsgValueError; |
610 | 0 | } |
611 | 0 | // Sentinel = 'aInitData' |
612 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 897514454)))) { |
613 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'CompositorWidgetInitData'"); |
614 | 0 | return MsgValueError; |
615 | 0 | } |
616 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
617 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
618 | 0 | FatalError("Transition error"); |
619 | 0 | return MsgValueError; |
620 | 0 | } |
621 | 0 | actor = AllocPCompositorWidgetParent(aInitData); |
622 | 0 | if ((!(actor))) { |
623 | 0 | NS_WARNING("Error constructing actor PCompositorWidgetParent"); |
624 | 0 | return MsgValueError; |
625 | 0 | } |
626 | 0 | (actor)->SetManagerAndRegister(this, (handle__).mId); |
627 | 0 | (mManagedPCompositorWidgetParent).PutEntry(actor); |
628 | 0 | (actor)->mLivenessState = mozilla::ipc::LivenessState::Start; |
629 | 0 |
|
630 | 0 | if ((!(RecvPCompositorWidgetConstructor(actor, aInitData)))) { |
631 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
632 | 0 | // Error handled in mozilla::ipc::IPCResult |
633 | 0 | return MsgProcessingError; |
634 | 0 | } |
635 | 0 | |
636 | 0 | return MsgProcessed; |
637 | 0 | } |
638 | 0 | case PCompositorBridge::Msg_PAPZConstructor__ID: |
639 | 0 | { |
640 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
641 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
642 | 0 | } |
643 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_PAPZConstructor", OTHER); |
644 | 0 |
|
645 | 0 | PickleIterator iter__(msg__); |
646 | 0 | ActorHandle handle__; |
647 | 0 | PAPZParent* actor; |
648 | 0 | LayersId layersId; |
649 | 0 |
|
650 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(handle__)))))) { |
651 | 0 | FatalError("Error deserializing 'ActorHandle'"); |
652 | 0 | return MsgValueError; |
653 | 0 | } |
654 | 0 | // Sentinel = 'actor' |
655 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
656 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'"); |
657 | 0 | return MsgValueError; |
658 | 0 | } |
659 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(layersId)))))) { |
660 | 0 | FatalError("Error deserializing 'LayersId'"); |
661 | 0 | return MsgValueError; |
662 | 0 | } |
663 | 0 | // Sentinel = 'layersId' |
664 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2382073245)))) { |
665 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'LayersId'"); |
666 | 0 | return MsgValueError; |
667 | 0 | } |
668 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
669 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
670 | 0 | FatalError("Transition error"); |
671 | 0 | return MsgValueError; |
672 | 0 | } |
673 | 0 | actor = AllocPAPZParent(layersId); |
674 | 0 | if ((!(actor))) { |
675 | 0 | NS_WARNING("Error constructing actor PAPZParent"); |
676 | 0 | return MsgValueError; |
677 | 0 | } |
678 | 0 | (actor)->SetManagerAndRegister(this, (handle__).mId); |
679 | 0 | (mManagedPAPZParent).PutEntry(actor); |
680 | 0 | (actor)->mLivenessState = mozilla::ipc::LivenessState::Start; |
681 | 0 |
|
682 | 0 | if ((!(RecvPAPZConstructor(actor, layersId)))) { |
683 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
684 | 0 | // Error handled in mozilla::ipc::IPCResult |
685 | 0 | return MsgProcessingError; |
686 | 0 | } |
687 | 0 | |
688 | 0 | return MsgProcessed; |
689 | 0 | } |
690 | 0 | case PCompositorBridge::Msg_PAPZCTreeManagerConstructor__ID: |
691 | 0 | { |
692 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
693 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
694 | 0 | } |
695 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_PAPZCTreeManagerConstructor", OTHER); |
696 | 0 |
|
697 | 0 | PickleIterator iter__(msg__); |
698 | 0 | ActorHandle handle__; |
699 | 0 | PAPZCTreeManagerParent* actor; |
700 | 0 | LayersId layersId; |
701 | 0 |
|
702 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(handle__)))))) { |
703 | 0 | FatalError("Error deserializing 'ActorHandle'"); |
704 | 0 | return MsgValueError; |
705 | 0 | } |
706 | 0 | // Sentinel = 'actor' |
707 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
708 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'"); |
709 | 0 | return MsgValueError; |
710 | 0 | } |
711 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(layersId)))))) { |
712 | 0 | FatalError("Error deserializing 'LayersId'"); |
713 | 0 | return MsgValueError; |
714 | 0 | } |
715 | 0 | // Sentinel = 'layersId' |
716 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2382073245)))) { |
717 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'LayersId'"); |
718 | 0 | return MsgValueError; |
719 | 0 | } |
720 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
721 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
722 | 0 | FatalError("Transition error"); |
723 | 0 | return MsgValueError; |
724 | 0 | } |
725 | 0 | actor = AllocPAPZCTreeManagerParent(layersId); |
726 | 0 | if ((!(actor))) { |
727 | 0 | NS_WARNING("Error constructing actor PAPZCTreeManagerParent"); |
728 | 0 | return MsgValueError; |
729 | 0 | } |
730 | 0 | (actor)->SetManagerAndRegister(this, (handle__).mId); |
731 | 0 | (mManagedPAPZCTreeManagerParent).PutEntry(actor); |
732 | 0 | (actor)->mLivenessState = mozilla::ipc::LivenessState::Start; |
733 | 0 |
|
734 | 0 | if ((!(RecvPAPZCTreeManagerConstructor(actor, layersId)))) { |
735 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
736 | 0 | // Error handled in mozilla::ipc::IPCResult |
737 | 0 | return MsgProcessingError; |
738 | 0 | } |
739 | 0 | |
740 | 0 | return MsgProcessed; |
741 | 0 | } |
742 | 0 | case PCompositorBridge::Msg_RemotePluginsReady__ID: |
743 | 0 | { |
744 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
745 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
746 | 0 | } |
747 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_RemotePluginsReady", OTHER); |
748 | 0 |
|
749 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
750 | 0 | FatalError("Transition error"); |
751 | 0 | return MsgValueError; |
752 | 0 | } |
753 | 0 | if ((!(RecvRemotePluginsReady()))) { |
754 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
755 | 0 | // Error handled in mozilla::ipc::IPCResult |
756 | 0 | return MsgProcessingError; |
757 | 0 | } |
758 | 0 | |
759 | 0 | return MsgProcessed; |
760 | 0 | } |
761 | 0 | case PCompositorBridge::Msg_AdoptChild__ID: |
762 | 0 | { |
763 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
764 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
765 | 0 | } |
766 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_AdoptChild", OTHER); |
767 | 0 |
|
768 | 0 | PickleIterator iter__(msg__); |
769 | 0 | LayersId id; |
770 | 0 |
|
771 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(id)))))) { |
772 | 0 | FatalError("Error deserializing 'LayersId'"); |
773 | 0 | return MsgValueError; |
774 | 0 | } |
775 | 0 | // Sentinel = 'id' |
776 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2794505629)))) { |
777 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'LayersId'"); |
778 | 0 | return MsgValueError; |
779 | 0 | } |
780 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
781 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
782 | 0 | FatalError("Transition error"); |
783 | 0 | return MsgValueError; |
784 | 0 | } |
785 | 0 | if ((!(RecvAdoptChild(id)))) { |
786 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
787 | 0 | // Error handled in mozilla::ipc::IPCResult |
788 | 0 | return MsgProcessingError; |
789 | 0 | } |
790 | 0 | |
791 | 0 | return MsgProcessed; |
792 | 0 | } |
793 | 0 | case PCompositorBridge::Msg_FlushRenderingAsync__ID: |
794 | 0 | { |
795 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
796 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
797 | 0 | } |
798 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_FlushRenderingAsync", OTHER); |
799 | 0 |
|
800 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
801 | 0 | FatalError("Transition error"); |
802 | 0 | return MsgValueError; |
803 | 0 | } |
804 | 0 | if ((!(RecvFlushRenderingAsync()))) { |
805 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
806 | 0 | // Error handled in mozilla::ipc::IPCResult |
807 | 0 | return MsgProcessingError; |
808 | 0 | } |
809 | 0 | |
810 | 0 | return MsgProcessed; |
811 | 0 | } |
812 | 0 | case PCompositorBridge::Msg_ForcePresent__ID: |
813 | 0 | { |
814 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
815 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
816 | 0 | } |
817 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_ForcePresent", OTHER); |
818 | 0 |
|
819 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
820 | 0 | FatalError("Transition error"); |
821 | 0 | return MsgValueError; |
822 | 0 | } |
823 | 0 | if ((!(RecvForcePresent()))) { |
824 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
825 | 0 | // Error handled in mozilla::ipc::IPCResult |
826 | 0 | return MsgProcessingError; |
827 | 0 | } |
828 | 0 | |
829 | 0 | return MsgProcessed; |
830 | 0 | } |
831 | 0 | case PCompositorBridge::Msg_PLayerTransactionConstructor__ID: |
832 | 0 | { |
833 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
834 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
835 | 0 | } |
836 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_PLayerTransactionConstructor", OTHER); |
837 | 0 |
|
838 | 0 | PickleIterator iter__(msg__); |
839 | 0 | ActorHandle handle__; |
840 | 0 | PLayerTransactionParent* actor; |
841 | 0 | nsTArray<LayersBackend> layersBackendHints; |
842 | 0 | LayersId id; |
843 | 0 |
|
844 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(handle__)))))) { |
845 | 0 | FatalError("Error deserializing 'ActorHandle'"); |
846 | 0 | return MsgValueError; |
847 | 0 | } |
848 | 0 | // Sentinel = 'actor' |
849 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
850 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'"); |
851 | 0 | return MsgValueError; |
852 | 0 | } |
853 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(layersBackendHints)))))) { |
854 | 0 | FatalError("Error deserializing 'nsTArray'"); |
855 | 0 | return MsgValueError; |
856 | 0 | } |
857 | 0 | // Sentinel = 'layersBackendHints' |
858 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3491646450)))) { |
859 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'"); |
860 | 0 | return MsgValueError; |
861 | 0 | } |
862 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(id)))))) { |
863 | 0 | FatalError("Error deserializing 'LayersId'"); |
864 | 0 | return MsgValueError; |
865 | 0 | } |
866 | 0 | // Sentinel = 'id' |
867 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2794505629)))) { |
868 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'LayersId'"); |
869 | 0 | return MsgValueError; |
870 | 0 | } |
871 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
872 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
873 | 0 | FatalError("Transition error"); |
874 | 0 | return MsgValueError; |
875 | 0 | } |
876 | 0 | actor = AllocPLayerTransactionParent(layersBackendHints, id); |
877 | 0 | if ((!(actor))) { |
878 | 0 | NS_WARNING("Error constructing actor PLayerTransactionParent"); |
879 | 0 | return MsgValueError; |
880 | 0 | } |
881 | 0 | (actor)->SetManagerAndRegister(this, (handle__).mId); |
882 | 0 | (mManagedPLayerTransactionParent).PutEntry(actor); |
883 | 0 | (actor)->mLivenessState = mozilla::ipc::LivenessState::Start; |
884 | 0 |
|
885 | 0 | if ((!(RecvPLayerTransactionConstructor(actor, std::move(layersBackendHints), id)))) { |
886 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
887 | 0 | // Error handled in mozilla::ipc::IPCResult |
888 | 0 | return MsgProcessingError; |
889 | 0 | } |
890 | 0 | |
891 | 0 | return MsgProcessed; |
892 | 0 | } |
893 | 0 | case PCompositorBridge::Msg_NotifyRegionInvalidated__ID: |
894 | 0 | { |
895 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
896 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
897 | 0 | } |
898 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_NotifyRegionInvalidated", OTHER); |
899 | 0 |
|
900 | 0 | PickleIterator iter__(msg__); |
901 | 0 | nsIntRegion region; |
902 | 0 |
|
903 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(region)))))) { |
904 | 0 | FatalError("Error deserializing 'nsIntRegion'"); |
905 | 0 | return MsgValueError; |
906 | 0 | } |
907 | 0 | // Sentinel = 'region' |
908 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 688844010)))) { |
909 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsIntRegion'"); |
910 | 0 | return MsgValueError; |
911 | 0 | } |
912 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
913 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
914 | 0 | FatalError("Transition error"); |
915 | 0 | return MsgValueError; |
916 | 0 | } |
917 | 0 | if ((!(RecvNotifyRegionInvalidated(region)))) { |
918 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
919 | 0 | // Error handled in mozilla::ipc::IPCResult |
920 | 0 | return MsgProcessingError; |
921 | 0 | } |
922 | 0 | |
923 | 0 | return MsgProcessed; |
924 | 0 | } |
925 | 0 | case PCompositorBridge::Msg_RequestNotifyAfterRemotePaint__ID: |
926 | 0 | { |
927 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
928 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
929 | 0 | } |
930 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_RequestNotifyAfterRemotePaint", OTHER); |
931 | 0 |
|
932 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
933 | 0 | FatalError("Transition error"); |
934 | 0 | return MsgValueError; |
935 | 0 | } |
936 | 0 | if ((!(RecvRequestNotifyAfterRemotePaint()))) { |
937 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
938 | 0 | // Error handled in mozilla::ipc::IPCResult |
939 | 0 | return MsgProcessingError; |
940 | 0 | } |
941 | 0 | |
942 | 0 | return MsgProcessed; |
943 | 0 | } |
944 | 0 | case PCompositorBridge::Msg_AllPluginsCaptured__ID: |
945 | 0 | { |
946 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
947 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
948 | 0 | } |
949 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_AllPluginsCaptured", OTHER); |
950 | 0 |
|
951 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
952 | 0 | FatalError("Transition error"); |
953 | 0 | return MsgValueError; |
954 | 0 | } |
955 | 0 | if ((!(RecvAllPluginsCaptured()))) { |
956 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
957 | 0 | // Error handled in mozilla::ipc::IPCResult |
958 | 0 | return MsgProcessingError; |
959 | 0 | } |
960 | 0 | |
961 | 0 | return MsgProcessed; |
962 | 0 | } |
963 | 0 | case PCompositorBridge::Msg_PTextureConstructor__ID: |
964 | 0 | { |
965 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
966 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
967 | 0 | } |
968 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_PTextureConstructor", OTHER); |
969 | 0 |
|
970 | 0 | PickleIterator iter__(msg__); |
971 | 0 | ActorHandle handle__; |
972 | 0 | PTextureParent* actor; |
973 | 0 | SurfaceDescriptor aSharedData; |
974 | 0 | ReadLockDescriptor aReadLock; |
975 | 0 | LayersBackend aBackend; |
976 | 0 | TextureFlags aTextureFlags; |
977 | 0 | LayersId id; |
978 | 0 | uint64_t aSerial; |
979 | 0 | MaybeExternalImageId aExternalImageId; |
980 | 0 |
|
981 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(handle__)))))) { |
982 | 0 | FatalError("Error deserializing 'ActorHandle'"); |
983 | 0 | return MsgValueError; |
984 | 0 | } |
985 | 0 | // Sentinel = 'actor' |
986 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
987 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'"); |
988 | 0 | return MsgValueError; |
989 | 0 | } |
990 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aSharedData)))))) { |
991 | 0 | FatalError("Error deserializing 'SurfaceDescriptor'"); |
992 | 0 | return MsgValueError; |
993 | 0 | } |
994 | 0 | // Sentinel = 'aSharedData' |
995 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3013593029)))) { |
996 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'SurfaceDescriptor'"); |
997 | 0 | return MsgValueError; |
998 | 0 | } |
999 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aReadLock)))))) { |
1000 | 0 | FatalError("Error deserializing 'ReadLockDescriptor'"); |
1001 | 0 | return MsgValueError; |
1002 | 0 | } |
1003 | 0 | // Sentinel = 'aReadLock' |
1004 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1208527801)))) { |
1005 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ReadLockDescriptor'"); |
1006 | 0 | return MsgValueError; |
1007 | 0 | } |
1008 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aBackend)))))) { |
1009 | 0 | FatalError("Error deserializing 'LayersBackend'"); |
1010 | 0 | return MsgValueError; |
1011 | 0 | } |
1012 | 0 | // Sentinel = 'aBackend' |
1013 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2878499283)))) { |
1014 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'LayersBackend'"); |
1015 | 0 | return MsgValueError; |
1016 | 0 | } |
1017 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aTextureFlags)))))) { |
1018 | 0 | FatalError("Error deserializing 'TextureFlags'"); |
1019 | 0 | return MsgValueError; |
1020 | 0 | } |
1021 | 0 | // Sentinel = 'aTextureFlags' |
1022 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3005687826)))) { |
1023 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'TextureFlags'"); |
1024 | 0 | return MsgValueError; |
1025 | 0 | } |
1026 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(id)))))) { |
1027 | 0 | FatalError("Error deserializing 'LayersId'"); |
1028 | 0 | return MsgValueError; |
1029 | 0 | } |
1030 | 0 | // Sentinel = 'id' |
1031 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2794505629)))) { |
1032 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'LayersId'"); |
1033 | 0 | return MsgValueError; |
1034 | 0 | } |
1035 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aSerial)))))) { |
1036 | 0 | FatalError("Error deserializing 'uint64_t'"); |
1037 | 0 | return MsgValueError; |
1038 | 0 | } |
1039 | 0 | // Sentinel = 'aSerial' |
1040 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1247987114)))) { |
1041 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'"); |
1042 | 0 | return MsgValueError; |
1043 | 0 | } |
1044 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aExternalImageId)))))) { |
1045 | 0 | FatalError("Error deserializing 'MaybeExternalImageId'"); |
1046 | 0 | return MsgValueError; |
1047 | 0 | } |
1048 | 0 | // Sentinel = 'aExternalImageId' |
1049 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2889998824)))) { |
1050 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'MaybeExternalImageId'"); |
1051 | 0 | return MsgValueError; |
1052 | 0 | } |
1053 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1054 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1055 | 0 | FatalError("Transition error"); |
1056 | 0 | return MsgValueError; |
1057 | 0 | } |
1058 | 0 | actor = AllocPTextureParent(aSharedData, aReadLock, aBackend, aTextureFlags, id, aSerial, aExternalImageId); |
1059 | 0 | if ((!(actor))) { |
1060 | 0 | NS_WARNING("Error constructing actor PTextureParent"); |
1061 | 0 | return MsgValueError; |
1062 | 0 | } |
1063 | 0 | (actor)->SetManagerAndRegister(this, (handle__).mId); |
1064 | 0 | (mManagedPTextureParent).PutEntry(actor); |
1065 | 0 | (actor)->mLivenessState = mozilla::ipc::LivenessState::Start; |
1066 | 0 |
|
1067 | 0 | if ((!(RecvPTextureConstructor(actor, aSharedData, aReadLock, aBackend, aTextureFlags, id, aSerial, aExternalImageId)))) { |
1068 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1069 | 0 | // Error handled in mozilla::ipc::IPCResult |
1070 | 0 | return MsgProcessingError; |
1071 | 0 | } |
1072 | 0 | |
1073 | 0 | return MsgProcessed; |
1074 | 0 | } |
1075 | 0 | default: |
1076 | 0 | { |
1077 | 0 | return MsgNotKnown; |
1078 | 0 | } |
1079 | 0 | } |
1080 | 0 | } |
1081 | | |
1082 | | auto PCompositorBridgeParent::OnMessageReceived( |
1083 | | const Message& msg__, |
1084 | | Message*& reply__) -> PCompositorBridgeParent::Result |
1085 | 0 | { |
1086 | 0 | switch ((msg__).type()) { |
1087 | 0 | case PCompositorBridge::Msg_Initialize__ID: |
1088 | 0 | { |
1089 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1090 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1091 | 0 | } |
1092 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_Initialize", OTHER); |
1093 | 0 |
|
1094 | 0 | PickleIterator iter__(msg__); |
1095 | 0 | LayersId rootLayerTreeId; |
1096 | 0 |
|
1097 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(rootLayerTreeId)))))) { |
1098 | 0 | FatalError("Error deserializing 'LayersId'"); |
1099 | 0 | return MsgValueError; |
1100 | 0 | } |
1101 | 0 | // Sentinel = 'rootLayerTreeId' |
1102 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 191972583)))) { |
1103 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'LayersId'"); |
1104 | 0 | return MsgValueError; |
1105 | 0 | } |
1106 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1107 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1108 | 0 | FatalError("Transition error"); |
1109 | 0 | return MsgValueError; |
1110 | 0 | } |
1111 | 0 | int32_t id__ = Id(); |
1112 | 0 | if ((!(RecvInitialize(rootLayerTreeId)))) { |
1113 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1114 | 0 | // Error handled in mozilla::ipc::IPCResult |
1115 | 0 | return MsgProcessingError; |
1116 | 0 | } |
1117 | 0 | |
1118 | 0 | reply__ = PCompositorBridge::Reply_Initialize(id__); |
1119 | 0 |
|
1120 | 0 |
|
1121 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1122 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1123 | 0 | } |
1124 | 0 | return MsgProcessed; |
1125 | 0 | } |
1126 | 0 | case PCompositorBridge::Msg_GetFrameUniformity__ID: |
1127 | 0 | { |
1128 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1129 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1130 | 0 | } |
1131 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_GetFrameUniformity", OTHER); |
1132 | 0 |
|
1133 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1134 | 0 | FatalError("Transition error"); |
1135 | 0 | return MsgValueError; |
1136 | 0 | } |
1137 | 0 | int32_t id__ = Id(); |
1138 | 0 | FrameUniformityData data; |
1139 | 0 | if ((!(RecvGetFrameUniformity((&(data)))))) { |
1140 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1141 | 0 | // Error handled in mozilla::ipc::IPCResult |
1142 | 0 | return MsgProcessingError; |
1143 | 0 | } |
1144 | 0 | |
1145 | 0 | reply__ = PCompositorBridge::Reply_GetFrameUniformity(id__); |
1146 | 0 |
|
1147 | 0 | WriteIPDLParam(reply__, this, data); |
1148 | 0 | // Sentinel = 'data' |
1149 | 0 | (reply__)->WriteSentinel(843352540); |
1150 | 0 |
|
1151 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1152 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1153 | 0 | } |
1154 | 0 | return MsgProcessed; |
1155 | 0 | } |
1156 | 0 | case PCompositorBridge::Msg_WillClose__ID: |
1157 | 0 | { |
1158 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1159 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1160 | 0 | } |
1161 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_WillClose", OTHER); |
1162 | 0 |
|
1163 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1164 | 0 | FatalError("Transition error"); |
1165 | 0 | return MsgValueError; |
1166 | 0 | } |
1167 | 0 | int32_t id__ = Id(); |
1168 | 0 | if ((!(RecvWillClose()))) { |
1169 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1170 | 0 | // Error handled in mozilla::ipc::IPCResult |
1171 | 0 | return MsgProcessingError; |
1172 | 0 | } |
1173 | 0 | |
1174 | 0 | reply__ = PCompositorBridge::Reply_WillClose(id__); |
1175 | 0 |
|
1176 | 0 |
|
1177 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1178 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1179 | 0 | } |
1180 | 0 | return MsgProcessed; |
1181 | 0 | } |
1182 | 0 | case PCompositorBridge::Msg_Pause__ID: |
1183 | 0 | { |
1184 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1185 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1186 | 0 | } |
1187 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_Pause", OTHER); |
1188 | 0 |
|
1189 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1190 | 0 | FatalError("Transition error"); |
1191 | 0 | return MsgValueError; |
1192 | 0 | } |
1193 | 0 | int32_t id__ = Id(); |
1194 | 0 | if ((!(RecvPause()))) { |
1195 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1196 | 0 | // Error handled in mozilla::ipc::IPCResult |
1197 | 0 | return MsgProcessingError; |
1198 | 0 | } |
1199 | 0 | |
1200 | 0 | reply__ = PCompositorBridge::Reply_Pause(id__); |
1201 | 0 |
|
1202 | 0 |
|
1203 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1204 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1205 | 0 | } |
1206 | 0 | return MsgProcessed; |
1207 | 0 | } |
1208 | 0 | case PCompositorBridge::Msg_Resume__ID: |
1209 | 0 | { |
1210 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1211 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1212 | 0 | } |
1213 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_Resume", OTHER); |
1214 | 0 |
|
1215 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1216 | 0 | FatalError("Transition error"); |
1217 | 0 | return MsgValueError; |
1218 | 0 | } |
1219 | 0 | int32_t id__ = Id(); |
1220 | 0 | if ((!(RecvResume()))) { |
1221 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1222 | 0 | // Error handled in mozilla::ipc::IPCResult |
1223 | 0 | return MsgProcessingError; |
1224 | 0 | } |
1225 | 0 | |
1226 | 0 | reply__ = PCompositorBridge::Reply_Resume(id__); |
1227 | 0 |
|
1228 | 0 |
|
1229 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1230 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1231 | 0 | } |
1232 | 0 | return MsgProcessed; |
1233 | 0 | } |
1234 | 0 | case PCompositorBridge::Msg_NotifyChildCreated__ID: |
1235 | 0 | { |
1236 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1237 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1238 | 0 | } |
1239 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_NotifyChildCreated", OTHER); |
1240 | 0 |
|
1241 | 0 | PickleIterator iter__(msg__); |
1242 | 0 | LayersId id; |
1243 | 0 |
|
1244 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(id)))))) { |
1245 | 0 | FatalError("Error deserializing 'LayersId'"); |
1246 | 0 | return MsgValueError; |
1247 | 0 | } |
1248 | 0 | // Sentinel = 'id' |
1249 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2794505629)))) { |
1250 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'LayersId'"); |
1251 | 0 | return MsgValueError; |
1252 | 0 | } |
1253 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1254 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1255 | 0 | FatalError("Transition error"); |
1256 | 0 | return MsgValueError; |
1257 | 0 | } |
1258 | 0 | int32_t id__ = Id(); |
1259 | 0 | CompositorOptions compositorOptions; |
1260 | 0 | if ((!(RecvNotifyChildCreated(id, (&(compositorOptions)))))) { |
1261 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1262 | 0 | // Error handled in mozilla::ipc::IPCResult |
1263 | 0 | return MsgProcessingError; |
1264 | 0 | } |
1265 | 0 | |
1266 | 0 | reply__ = PCompositorBridge::Reply_NotifyChildCreated(id__); |
1267 | 0 |
|
1268 | 0 | WriteIPDLParam(reply__, this, compositorOptions); |
1269 | 0 | // Sentinel = 'compositorOptions' |
1270 | 0 | (reply__)->WriteSentinel(1905928698); |
1271 | 0 |
|
1272 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1273 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1274 | 0 | } |
1275 | 0 | return MsgProcessed; |
1276 | 0 | } |
1277 | 0 | case PCompositorBridge::Msg_MapAndNotifyChildCreated__ID: |
1278 | 0 | { |
1279 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1280 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1281 | 0 | } |
1282 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_MapAndNotifyChildCreated", OTHER); |
1283 | 0 |
|
1284 | 0 | PickleIterator iter__(msg__); |
1285 | 0 | LayersId id; |
1286 | 0 | ProcessId owner; |
1287 | 0 |
|
1288 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(id)))))) { |
1289 | 0 | FatalError("Error deserializing 'LayersId'"); |
1290 | 0 | return MsgValueError; |
1291 | 0 | } |
1292 | 0 | // Sentinel = 'id' |
1293 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2794505629)))) { |
1294 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'LayersId'"); |
1295 | 0 | return MsgValueError; |
1296 | 0 | } |
1297 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(owner)))))) { |
1298 | 0 | FatalError("Error deserializing 'ProcessId'"); |
1299 | 0 | return MsgValueError; |
1300 | 0 | } |
1301 | 0 | // Sentinel = 'owner' |
1302 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 622631704)))) { |
1303 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ProcessId'"); |
1304 | 0 | return MsgValueError; |
1305 | 0 | } |
1306 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1307 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1308 | 0 | FatalError("Transition error"); |
1309 | 0 | return MsgValueError; |
1310 | 0 | } |
1311 | 0 | int32_t id__ = Id(); |
1312 | 0 | CompositorOptions compositorOptions; |
1313 | 0 | if ((!(RecvMapAndNotifyChildCreated(id, owner, (&(compositorOptions)))))) { |
1314 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1315 | 0 | // Error handled in mozilla::ipc::IPCResult |
1316 | 0 | return MsgProcessingError; |
1317 | 0 | } |
1318 | 0 | |
1319 | 0 | reply__ = PCompositorBridge::Reply_MapAndNotifyChildCreated(id__); |
1320 | 0 |
|
1321 | 0 | WriteIPDLParam(reply__, this, compositorOptions); |
1322 | 0 | // Sentinel = 'compositorOptions' |
1323 | 0 | (reply__)->WriteSentinel(1905928698); |
1324 | 0 |
|
1325 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1326 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1327 | 0 | } |
1328 | 0 | return MsgProcessed; |
1329 | 0 | } |
1330 | 0 | case PCompositorBridge::Msg_NotifyChildRecreated__ID: |
1331 | 0 | { |
1332 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1333 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1334 | 0 | } |
1335 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_NotifyChildRecreated", OTHER); |
1336 | 0 |
|
1337 | 0 | PickleIterator iter__(msg__); |
1338 | 0 | LayersId id; |
1339 | 0 |
|
1340 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(id)))))) { |
1341 | 0 | FatalError("Error deserializing 'LayersId'"); |
1342 | 0 | return MsgValueError; |
1343 | 0 | } |
1344 | 0 | // Sentinel = 'id' |
1345 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2794505629)))) { |
1346 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'LayersId'"); |
1347 | 0 | return MsgValueError; |
1348 | 0 | } |
1349 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1350 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1351 | 0 | FatalError("Transition error"); |
1352 | 0 | return MsgValueError; |
1353 | 0 | } |
1354 | 0 | int32_t id__ = Id(); |
1355 | 0 | CompositorOptions compositorOptions; |
1356 | 0 | if ((!(RecvNotifyChildRecreated(id, (&(compositorOptions)))))) { |
1357 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1358 | 0 | // Error handled in mozilla::ipc::IPCResult |
1359 | 0 | return MsgProcessingError; |
1360 | 0 | } |
1361 | 0 | |
1362 | 0 | reply__ = PCompositorBridge::Reply_NotifyChildRecreated(id__); |
1363 | 0 |
|
1364 | 0 | WriteIPDLParam(reply__, this, compositorOptions); |
1365 | 0 | // Sentinel = 'compositorOptions' |
1366 | 0 | (reply__)->WriteSentinel(1905928698); |
1367 | 0 |
|
1368 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1369 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1370 | 0 | } |
1371 | 0 | return MsgProcessed; |
1372 | 0 | } |
1373 | 0 | case PCompositorBridge::Msg_MakeSnapshot__ID: |
1374 | 0 | { |
1375 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1376 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1377 | 0 | } |
1378 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_MakeSnapshot", OTHER); |
1379 | 0 |
|
1380 | 0 | PickleIterator iter__(msg__); |
1381 | 0 | SurfaceDescriptor inSnapshot; |
1382 | 0 | IntRect dirtyRect; |
1383 | 0 |
|
1384 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(inSnapshot)))))) { |
1385 | 0 | FatalError("Error deserializing 'SurfaceDescriptor'"); |
1386 | 0 | return MsgValueError; |
1387 | 0 | } |
1388 | 0 | // Sentinel = 'inSnapshot' |
1389 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1570595367)))) { |
1390 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'SurfaceDescriptor'"); |
1391 | 0 | return MsgValueError; |
1392 | 0 | } |
1393 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(dirtyRect)))))) { |
1394 | 0 | FatalError("Error deserializing 'IntRect'"); |
1395 | 0 | return MsgValueError; |
1396 | 0 | } |
1397 | 0 | // Sentinel = 'dirtyRect' |
1398 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1726016483)))) { |
1399 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'IntRect'"); |
1400 | 0 | return MsgValueError; |
1401 | 0 | } |
1402 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1403 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1404 | 0 | FatalError("Transition error"); |
1405 | 0 | return MsgValueError; |
1406 | 0 | } |
1407 | 0 | int32_t id__ = Id(); |
1408 | 0 | if ((!(RecvMakeSnapshot(inSnapshot, dirtyRect)))) { |
1409 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1410 | 0 | // Error handled in mozilla::ipc::IPCResult |
1411 | 0 | return MsgProcessingError; |
1412 | 0 | } |
1413 | 0 | |
1414 | 0 | reply__ = PCompositorBridge::Reply_MakeSnapshot(id__); |
1415 | 0 |
|
1416 | 0 |
|
1417 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1418 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1419 | 0 | } |
1420 | 0 | return MsgProcessed; |
1421 | 0 | } |
1422 | 0 | case PCompositorBridge::Msg_FlushRendering__ID: |
1423 | 0 | { |
1424 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1425 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1426 | 0 | } |
1427 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_FlushRendering", OTHER); |
1428 | 0 |
|
1429 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1430 | 0 | FatalError("Transition error"); |
1431 | 0 | return MsgValueError; |
1432 | 0 | } |
1433 | 0 | int32_t id__ = Id(); |
1434 | 0 | if ((!(RecvFlushRendering()))) { |
1435 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1436 | 0 | // Error handled in mozilla::ipc::IPCResult |
1437 | 0 | return MsgProcessingError; |
1438 | 0 | } |
1439 | 0 | |
1440 | 0 | reply__ = PCompositorBridge::Reply_FlushRendering(id__); |
1441 | 0 |
|
1442 | 0 |
|
1443 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1444 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1445 | 0 | } |
1446 | 0 | return MsgProcessed; |
1447 | 0 | } |
1448 | 0 | case PCompositorBridge::Msg_WaitOnTransactionProcessed__ID: |
1449 | 0 | { |
1450 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1451 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1452 | 0 | } |
1453 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_WaitOnTransactionProcessed", OTHER); |
1454 | 0 |
|
1455 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1456 | 0 | FatalError("Transition error"); |
1457 | 0 | return MsgValueError; |
1458 | 0 | } |
1459 | 0 | int32_t id__ = Id(); |
1460 | 0 | if ((!(RecvWaitOnTransactionProcessed()))) { |
1461 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1462 | 0 | // Error handled in mozilla::ipc::IPCResult |
1463 | 0 | return MsgProcessingError; |
1464 | 0 | } |
1465 | 0 | |
1466 | 0 | reply__ = PCompositorBridge::Reply_WaitOnTransactionProcessed(id__); |
1467 | 0 |
|
1468 | 0 |
|
1469 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1470 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1471 | 0 | } |
1472 | 0 | return MsgProcessed; |
1473 | 0 | } |
1474 | 0 | case PCompositorBridge::Msg_StartFrameTimeRecording__ID: |
1475 | 0 | { |
1476 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1477 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1478 | 0 | } |
1479 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_StartFrameTimeRecording", OTHER); |
1480 | 0 |
|
1481 | 0 | PickleIterator iter__(msg__); |
1482 | 0 | int32_t bufferSize; |
1483 | 0 |
|
1484 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(bufferSize)))))) { |
1485 | 0 | FatalError("Error deserializing 'int32_t'"); |
1486 | 0 | return MsgValueError; |
1487 | 0 | } |
1488 | 0 | // Sentinel = 'bufferSize' |
1489 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3444538779)))) { |
1490 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'"); |
1491 | 0 | return MsgValueError; |
1492 | 0 | } |
1493 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1494 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1495 | 0 | FatalError("Transition error"); |
1496 | 0 | return MsgValueError; |
1497 | 0 | } |
1498 | 0 | int32_t id__ = Id(); |
1499 | 0 | uint32_t startIndex; |
1500 | 0 | if ((!(RecvStartFrameTimeRecording(bufferSize, (&(startIndex)))))) { |
1501 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1502 | 0 | // Error handled in mozilla::ipc::IPCResult |
1503 | 0 | return MsgProcessingError; |
1504 | 0 | } |
1505 | 0 | |
1506 | 0 | reply__ = PCompositorBridge::Reply_StartFrameTimeRecording(id__); |
1507 | 0 |
|
1508 | 0 | WriteIPDLParam(reply__, this, startIndex); |
1509 | 0 | // Sentinel = 'startIndex' |
1510 | 0 | (reply__)->WriteSentinel(4220530450); |
1511 | 0 |
|
1512 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1513 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1514 | 0 | } |
1515 | 0 | return MsgProcessed; |
1516 | 0 | } |
1517 | 0 | case PCompositorBridge::Msg_StopFrameTimeRecording__ID: |
1518 | 0 | { |
1519 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1520 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1521 | 0 | } |
1522 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_StopFrameTimeRecording", OTHER); |
1523 | 0 |
|
1524 | 0 | PickleIterator iter__(msg__); |
1525 | 0 | uint32_t startIndex; |
1526 | 0 |
|
1527 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(startIndex)))))) { |
1528 | 0 | FatalError("Error deserializing 'uint32_t'"); |
1529 | 0 | return MsgValueError; |
1530 | 0 | } |
1531 | 0 | // Sentinel = 'startIndex' |
1532 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4220530450)))) { |
1533 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'"); |
1534 | 0 | return MsgValueError; |
1535 | 0 | } |
1536 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1537 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1538 | 0 | FatalError("Transition error"); |
1539 | 0 | return MsgValueError; |
1540 | 0 | } |
1541 | 0 | int32_t id__ = Id(); |
1542 | 0 | nsTArray<float> intervals; |
1543 | 0 | if ((!(RecvStopFrameTimeRecording(startIndex, (&(intervals)))))) { |
1544 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1545 | 0 | // Error handled in mozilla::ipc::IPCResult |
1546 | 0 | return MsgProcessingError; |
1547 | 0 | } |
1548 | 0 | |
1549 | 0 | reply__ = PCompositorBridge::Reply_StopFrameTimeRecording(id__); |
1550 | 0 |
|
1551 | 0 | WriteIPDLParam(reply__, this, intervals); |
1552 | 0 | // Sentinel = 'intervals' |
1553 | 0 | (reply__)->WriteSentinel(470677011); |
1554 | 0 |
|
1555 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1556 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1557 | 0 | } |
1558 | 0 | return MsgProcessed; |
1559 | 0 | } |
1560 | 0 | case PCompositorBridge::Msg_SyncWithCompositor__ID: |
1561 | 0 | { |
1562 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1563 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1564 | 0 | } |
1565 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_SyncWithCompositor", OTHER); |
1566 | 0 |
|
1567 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1568 | 0 | FatalError("Transition error"); |
1569 | 0 | return MsgValueError; |
1570 | 0 | } |
1571 | 0 | int32_t id__ = Id(); |
1572 | 0 | if ((!(RecvSyncWithCompositor()))) { |
1573 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1574 | 0 | // Error handled in mozilla::ipc::IPCResult |
1575 | 0 | return MsgProcessingError; |
1576 | 0 | } |
1577 | 0 | |
1578 | 0 | reply__ = PCompositorBridge::Reply_SyncWithCompositor(id__); |
1579 | 0 |
|
1580 | 0 |
|
1581 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1582 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1583 | 0 | } |
1584 | 0 | return MsgProcessed; |
1585 | 0 | } |
1586 | 0 | case PCompositorBridge::Msg_PWebRenderBridgeConstructor__ID: |
1587 | 0 | { |
1588 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1589 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1590 | 0 | } |
1591 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_PWebRenderBridgeConstructor", OTHER); |
1592 | 0 |
|
1593 | 0 | PickleIterator iter__(msg__); |
1594 | 0 | ActorHandle handle__; |
1595 | 0 | PWebRenderBridgeParent* actor; |
1596 | 0 | PipelineId pipelineId; |
1597 | 0 | LayoutDeviceIntSize aSize; |
1598 | 0 |
|
1599 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(handle__)))))) { |
1600 | 0 | FatalError("Error deserializing 'ActorHandle'"); |
1601 | 0 | return MsgValueError; |
1602 | 0 | } |
1603 | 0 | // Sentinel = 'actor' |
1604 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
1605 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'"); |
1606 | 0 | return MsgValueError; |
1607 | 0 | } |
1608 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(pipelineId)))))) { |
1609 | 0 | FatalError("Error deserializing 'PipelineId'"); |
1610 | 0 | return MsgValueError; |
1611 | 0 | } |
1612 | 0 | // Sentinel = 'pipelineId' |
1613 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4067092043)))) { |
1614 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PipelineId'"); |
1615 | 0 | return MsgValueError; |
1616 | 0 | } |
1617 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aSize)))))) { |
1618 | 0 | FatalError("Error deserializing 'LayoutDeviceIntSize'"); |
1619 | 0 | return MsgValueError; |
1620 | 0 | } |
1621 | 0 | // Sentinel = 'aSize' |
1622 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2556665555)))) { |
1623 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'LayoutDeviceIntSize'"); |
1624 | 0 | return MsgValueError; |
1625 | 0 | } |
1626 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1627 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1628 | 0 | FatalError("Transition error"); |
1629 | 0 | return MsgValueError; |
1630 | 0 | } |
1631 | 0 | TextureFactoryIdentifier textureFactoryIdentifier; |
1632 | 0 | IdNamespace idNamespace; |
1633 | 0 | actor = AllocPWebRenderBridgeParent(pipelineId, aSize, (&(textureFactoryIdentifier)), (&(idNamespace))); |
1634 | 0 | if ((!(actor))) { |
1635 | 0 | NS_WARNING("Error constructing actor PWebRenderBridgeParent"); |
1636 | 0 | return MsgValueError; |
1637 | 0 | } |
1638 | 0 | (actor)->SetManagerAndRegister(this, (handle__).mId); |
1639 | 0 | (mManagedPWebRenderBridgeParent).PutEntry(actor); |
1640 | 0 | (actor)->mLivenessState = mozilla::ipc::LivenessState::Start; |
1641 | 0 |
|
1642 | 0 | int32_t id__ = Id(); |
1643 | 0 | if ((!(RecvPWebRenderBridgeConstructor(actor, pipelineId, aSize, (&(textureFactoryIdentifier)), (&(idNamespace)))))) { |
1644 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1645 | 0 | // Error handled in mozilla::ipc::IPCResult |
1646 | 0 | return MsgProcessingError; |
1647 | 0 | } |
1648 | 0 | reply__ = PCompositorBridge::Reply_PWebRenderBridgeConstructor(id__); |
1649 | 0 |
|
1650 | 0 | WriteIPDLParam(reply__, this, textureFactoryIdentifier); |
1651 | 0 | // Sentinel = 'textureFactoryIdentifier' |
1652 | 0 | (reply__)->WriteSentinel(1630882508); |
1653 | 0 | WriteIPDLParam(reply__, this, idNamespace); |
1654 | 0 | // Sentinel = 'idNamespace' |
1655 | 0 | (reply__)->WriteSentinel(1477745059); |
1656 | 0 |
|
1657 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1658 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1659 | 0 | } |
1660 | 0 |
|
1661 | 0 | return MsgProcessed; |
1662 | 0 | } |
1663 | 0 | case PCompositorBridge::Msg_CheckContentOnlyTDR__ID: |
1664 | 0 | { |
1665 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1666 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1667 | 0 | } |
1668 | 0 | AUTO_PROFILER_LABEL("PCompositorBridge::Msg_CheckContentOnlyTDR", OTHER); |
1669 | 0 |
|
1670 | 0 | PickleIterator iter__(msg__); |
1671 | 0 | uint32_t sequenceNum; |
1672 | 0 |
|
1673 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(sequenceNum)))))) { |
1674 | 0 | FatalError("Error deserializing 'uint32_t'"); |
1675 | 0 | return MsgValueError; |
1676 | 0 | } |
1677 | 0 | // Sentinel = 'sequenceNum' |
1678 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1222681202)))) { |
1679 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'"); |
1680 | 0 | return MsgValueError; |
1681 | 0 | } |
1682 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1683 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1684 | 0 | FatalError("Transition error"); |
1685 | 0 | return MsgValueError; |
1686 | 0 | } |
1687 | 0 | int32_t id__ = Id(); |
1688 | 0 | bool isContentOnlyTDR; |
1689 | 0 | if ((!(RecvCheckContentOnlyTDR(sequenceNum, (&(isContentOnlyTDR)))))) { |
1690 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1691 | 0 | // Error handled in mozilla::ipc::IPCResult |
1692 | 0 | return MsgProcessingError; |
1693 | 0 | } |
1694 | 0 | |
1695 | 0 | reply__ = PCompositorBridge::Reply_CheckContentOnlyTDR(id__); |
1696 | 0 |
|
1697 | 0 | WriteIPDLParam(reply__, this, isContentOnlyTDR); |
1698 | 0 | // Sentinel = 'isContentOnlyTDR' |
1699 | 0 | (reply__)->WriteSentinel(1577543213); |
1700 | 0 |
|
1701 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCompositorBridgeParent")) { |
1702 | 0 | mozilla::ipc::LogMessageForProtocol("PCompositorBridgeParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1703 | 0 | } |
1704 | 0 | return MsgProcessed; |
1705 | 0 | } |
1706 | 0 | default: |
1707 | 0 | { |
1708 | 0 | return MsgNotKnown; |
1709 | 0 | } |
1710 | 0 | } |
1711 | 0 | } |
1712 | | |
1713 | | auto PCompositorBridgeParent::OnCallReceived( |
1714 | | const Message& msg__, |
1715 | | Message*& reply__) -> PCompositorBridgeParent::Result |
1716 | 0 | { |
1717 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
1718 | 0 | return MsgNotKnown; |
1719 | 0 | } |
1720 | | |
1721 | | auto PCompositorBridgeParent::GetProtocolTypeId() -> int32_t |
1722 | 0 | { |
1723 | 0 | return PCompositorBridgeMsgStart; |
1724 | 0 | } |
1725 | | |
1726 | | auto PCompositorBridgeParent::DestroySubtree(ActorDestroyReason why) -> void |
1727 | 0 | { |
1728 | 0 | // Unregister from our manager. |
1729 | 0 | Unregister(Id()); |
1730 | 0 |
|
1731 | 0 | ActorDestroyReason subtreewhy = (((why) == (Deletion)) || ((why) == (FailedConstructor)) ? AncestorDeletion : why); |
1732 | 0 |
|
1733 | 0 | { |
1734 | 0 | // Recursively shutting down PAPZ kids |
1735 | 0 | nsTArray<PAPZParent*> kids; |
1736 | 0 | // Accumulate kids into a stable structure to iterate over |
1737 | 0 | ManagedPAPZParent(kids); |
1738 | 0 | for (auto& kid : kids) { |
1739 | 0 | // Guarding against a child removing a sibling from the list during the iteration. |
1740 | 0 | if ((mManagedPAPZParent).Contains(kid)) { |
1741 | 0 | (kid)->DestroySubtree(subtreewhy); |
1742 | 0 | } |
1743 | 0 | } |
1744 | 0 | } |
1745 | 0 | { |
1746 | 0 | // Recursively shutting down PAPZCTreeManager kids |
1747 | 0 | nsTArray<PAPZCTreeManagerParent*> kids; |
1748 | 0 | // Accumulate kids into a stable structure to iterate over |
1749 | 0 | ManagedPAPZCTreeManagerParent(kids); |
1750 | 0 | for (auto& kid : kids) { |
1751 | 0 | // Guarding against a child removing a sibling from the list during the iteration. |
1752 | 0 | if ((mManagedPAPZCTreeManagerParent).Contains(kid)) { |
1753 | 0 | (kid)->DestroySubtree(subtreewhy); |
1754 | 0 | } |
1755 | 0 | } |
1756 | 0 | } |
1757 | 0 | { |
1758 | 0 | // Recursively shutting down PLayerTransaction kids |
1759 | 0 | nsTArray<PLayerTransactionParent*> kids; |
1760 | 0 | // Accumulate kids into a stable structure to iterate over |
1761 | 0 | ManagedPLayerTransactionParent(kids); |
1762 | 0 | for (auto& kid : kids) { |
1763 | 0 | // Guarding against a child removing a sibling from the list during the iteration. |
1764 | 0 | if ((mManagedPLayerTransactionParent).Contains(kid)) { |
1765 | 0 | (kid)->DestroySubtree(subtreewhy); |
1766 | 0 | } |
1767 | 0 | } |
1768 | 0 | } |
1769 | 0 | { |
1770 | 0 | // Recursively shutting down PTexture kids |
1771 | 0 | nsTArray<PTextureParent*> kids; |
1772 | 0 | // Accumulate kids into a stable structure to iterate over |
1773 | 0 | ManagedPTextureParent(kids); |
1774 | 0 | for (auto& kid : kids) { |
1775 | 0 | // Guarding against a child removing a sibling from the list during the iteration. |
1776 | 0 | if ((mManagedPTextureParent).Contains(kid)) { |
1777 | 0 | (kid)->DestroySubtree(subtreewhy); |
1778 | 0 | } |
1779 | 0 | } |
1780 | 0 | } |
1781 | 0 | { |
1782 | 0 | // Recursively shutting down PCompositorWidget kids |
1783 | 0 | nsTArray<PCompositorWidgetParent*> kids; |
1784 | 0 | // Accumulate kids into a stable structure to iterate over |
1785 | 0 | ManagedPCompositorWidgetParent(kids); |
1786 | 0 | for (auto& kid : kids) { |
1787 | 0 | // Guarding against a child removing a sibling from the list during the iteration. |
1788 | 0 | if ((mManagedPCompositorWidgetParent).Contains(kid)) { |
1789 | 0 | (kid)->DestroySubtree(subtreewhy); |
1790 | 0 | } |
1791 | 0 | } |
1792 | 0 | } |
1793 | 0 | { |
1794 | 0 | // Recursively shutting down PWebRenderBridge kids |
1795 | 0 | nsTArray<PWebRenderBridgeParent*> kids; |
1796 | 0 | // Accumulate kids into a stable structure to iterate over |
1797 | 0 | ManagedPWebRenderBridgeParent(kids); |
1798 | 0 | for (auto& kid : kids) { |
1799 | 0 | // Guarding against a child removing a sibling from the list during the iteration. |
1800 | 0 | if ((mManagedPWebRenderBridgeParent).Contains(kid)) { |
1801 | 0 | (kid)->DestroySubtree(subtreewhy); |
1802 | 0 | } |
1803 | 0 | } |
1804 | 0 | } |
1805 | 0 |
|
1806 | 0 | // Reject owning pending responses. |
1807 | 0 | (GetIPCChannel())->RejectPendingResponsesForActor(this); |
1808 | 0 |
|
1809 | 0 | // Finally, destroy "us". |
1810 | 0 | ActorDestroy(why); |
1811 | 0 | } |
1812 | | |
1813 | | auto PCompositorBridgeParent::DeallocSubtree() -> void |
1814 | 0 | { |
1815 | 0 | { |
1816 | 0 | // Recursively deleting PAPZ kids |
1817 | 0 | for (auto iter = (mManagedPAPZParent).Iter(); (!((iter).Done())); (iter).Next()) { |
1818 | 0 | (((iter).Get())->GetKey())->DeallocSubtree(); |
1819 | 0 | } |
1820 | 0 |
|
1821 | 0 | for (auto iter = (mManagedPAPZParent).Iter(); (!((iter).Done())); (iter).Next()) { |
1822 | 0 | DeallocPAPZParent(((iter).Get())->GetKey()); |
1823 | 0 | } |
1824 | 0 | (mManagedPAPZParent).Clear(); |
1825 | 0 | } |
1826 | 0 | { |
1827 | 0 | // Recursively deleting PAPZCTreeManager kids |
1828 | 0 | for (auto iter = (mManagedPAPZCTreeManagerParent).Iter(); (!((iter).Done())); (iter).Next()) { |
1829 | 0 | (((iter).Get())->GetKey())->DeallocSubtree(); |
1830 | 0 | } |
1831 | 0 |
|
1832 | 0 | for (auto iter = (mManagedPAPZCTreeManagerParent).Iter(); (!((iter).Done())); (iter).Next()) { |
1833 | 0 | DeallocPAPZCTreeManagerParent(((iter).Get())->GetKey()); |
1834 | 0 | } |
1835 | 0 | (mManagedPAPZCTreeManagerParent).Clear(); |
1836 | 0 | } |
1837 | 0 | { |
1838 | 0 | // Recursively deleting PLayerTransaction kids |
1839 | 0 | for (auto iter = (mManagedPLayerTransactionParent).Iter(); (!((iter).Done())); (iter).Next()) { |
1840 | 0 | (((iter).Get())->GetKey())->DeallocSubtree(); |
1841 | 0 | } |
1842 | 0 |
|
1843 | 0 | for (auto iter = (mManagedPLayerTransactionParent).Iter(); (!((iter).Done())); (iter).Next()) { |
1844 | 0 | DeallocPLayerTransactionParent(((iter).Get())->GetKey()); |
1845 | 0 | } |
1846 | 0 | (mManagedPLayerTransactionParent).Clear(); |
1847 | 0 | } |
1848 | 0 | { |
1849 | 0 | // Recursively deleting PTexture kids |
1850 | 0 | for (auto iter = (mManagedPTextureParent).Iter(); (!((iter).Done())); (iter).Next()) { |
1851 | 0 | (((iter).Get())->GetKey())->DeallocSubtree(); |
1852 | 0 | } |
1853 | 0 |
|
1854 | 0 | for (auto iter = (mManagedPTextureParent).Iter(); (!((iter).Done())); (iter).Next()) { |
1855 | 0 | DeallocPTextureParent(((iter).Get())->GetKey()); |
1856 | 0 | } |
1857 | 0 | (mManagedPTextureParent).Clear(); |
1858 | 0 | } |
1859 | 0 | { |
1860 | 0 | // Recursively deleting PCompositorWidget kids |
1861 | 0 | for (auto iter = (mManagedPCompositorWidgetParent).Iter(); (!((iter).Done())); (iter).Next()) { |
1862 | 0 | (((iter).Get())->GetKey())->DeallocSubtree(); |
1863 | 0 | } |
1864 | 0 |
|
1865 | 0 | for (auto iter = (mManagedPCompositorWidgetParent).Iter(); (!((iter).Done())); (iter).Next()) { |
1866 | 0 | DeallocPCompositorWidgetParent(((iter).Get())->GetKey()); |
1867 | 0 | } |
1868 | 0 | (mManagedPCompositorWidgetParent).Clear(); |
1869 | 0 | } |
1870 | 0 | { |
1871 | 0 | // Recursively deleting PWebRenderBridge kids |
1872 | 0 | for (auto iter = (mManagedPWebRenderBridgeParent).Iter(); (!((iter).Done())); (iter).Next()) { |
1873 | 0 | (((iter).Get())->GetKey())->DeallocSubtree(); |
1874 | 0 | } |
1875 | 0 |
|
1876 | 0 | for (auto iter = (mManagedPWebRenderBridgeParent).Iter(); (!((iter).Done())); (iter).Next()) { |
1877 | 0 | DeallocPWebRenderBridgeParent(((iter).Get())->GetKey()); |
1878 | 0 | } |
1879 | 0 | (mManagedPWebRenderBridgeParent).Clear(); |
1880 | 0 | } |
1881 | 0 | } |
1882 | | |
1883 | | |
1884 | | |
1885 | | } // namespace layers |
1886 | | } // namespace mozilla |
1887 | | namespace mozilla { |
1888 | | namespace ipc { |
1889 | | auto IPDLParamTraits<mozilla::layers::PCompositorBridgeParent>::Write( |
1890 | | IPC::Message* aMsg, |
1891 | | mozilla::ipc::IProtocol* aActor, |
1892 | | const paramType& aVar) -> void |
1893 | 0 | { |
1894 | 0 | int32_t id; |
1895 | 0 | if ((!(aVar))) { |
1896 | 0 | id = 0; |
1897 | 0 | } |
1898 | 0 | else { |
1899 | 0 | id = (aVar)->Id(); |
1900 | 0 | if ((1) == (id)) { |
1901 | 0 | (aActor)->FatalError("actor has been |delete|d"); |
1902 | 0 | } |
1903 | 0 | } |
1904 | 0 | WriteIPDLParam(aMsg, aActor, id); |
1905 | 0 | } |
1906 | | |
1907 | | auto IPDLParamTraits<mozilla::layers::PCompositorBridgeParent>::Read( |
1908 | | const IPC::Message* aMsg, |
1909 | | PickleIterator* aIter, |
1910 | | mozilla::ipc::IProtocol* aActor, |
1911 | | paramType* aVar) -> bool |
1912 | 0 | { |
1913 | 0 | mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PCompositorBridge", PCompositorBridgeMsgStart); |
1914 | 0 | if ((actor).isNothing()) { |
1915 | 0 | return false; |
1916 | 0 | } |
1917 | 0 | |
1918 | 0 | (*(aVar)) = static_cast<mozilla::layers::PCompositorBridgeParent*>((actor).value()); |
1919 | 0 | return true; |
1920 | 0 | } |
1921 | | |
1922 | | } // namespace ipc |
1923 | | } // namespace mozilla |