Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/gfx/PVRLayerParent.h"
8 :
9 : #include "mozilla/gfx/PVRManagerParent.h"
10 : #include "mozilla/layers/PTextureParent.h"
11 :
12 : #include "nsIFile.h"
13 : #include "GeckoProfiler.h"
14 :
15 : namespace mozilla {
16 : namespace gfx {
17 :
18 :
19 :
20 0 : MOZ_IMPLICIT PVRLayerParent::PVRLayerParent() :
21 : mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
22 0 : mState(PVRLayer::__Dead)
23 : {
24 0 : MOZ_COUNT_CTOR(PVRLayerParent);
25 0 : }
26 :
27 0 : PVRLayerParent::~PVRLayerParent()
28 : {
29 0 : MOZ_COUNT_DTOR(PVRLayerParent);
30 0 : }
31 :
32 0 : auto PVRLayerParent::Manager() const -> PVRManagerParent*
33 : {
34 0 : return static_cast<PVRManagerParent*>(IProtocol::Manager());
35 : }
36 :
37 0 : auto PVRLayerParent::Send__delete__(PVRLayerParent* actor) -> bool
38 : {
39 0 : if ((!(actor))) {
40 0 : return false;
41 : }
42 :
43 0 : IPC::Message* msg__ = PVRLayer::Msg___delete__((actor)->Id());
44 :
45 0 : (actor)->Write(actor, msg__, false);
46 : // Sentinel = 'actor'
47 0 : (msg__)->WriteSentinel(875202478);
48 :
49 :
50 :
51 0 : if (mozilla::ipc::LoggingEnabledFor("PVRLayerParent")) {
52 0 : mozilla::ipc::LogMessageForProtocol("PVRLayerParent", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
53 : }
54 0 : AUTO_PROFILER_LABEL("PVRLayer::Msg___delete__", OTHER);
55 0 : PVRLayer::Transition(PVRLayer::Msg___delete____ID, (&((actor)->mState)));
56 :
57 0 : bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
58 :
59 0 : IProtocol* mgr = (actor)->Manager();
60 0 : (actor)->DestroySubtree(Deletion);
61 0 : (actor)->DeallocSubtree();
62 0 : (mgr)->RemoveManagee(PVRLayerMsgStart, actor);
63 0 : return sendok__;
64 : }
65 :
66 0 : auto PVRLayerParent::RemoveManagee(
67 : int32_t aProtocolId,
68 : ProtocolBase* aListener) -> void
69 : {
70 0 : FatalError("unreached");
71 0 : return;
72 : }
73 :
74 0 : auto PVRLayerParent::OnMessageReceived(const Message& msg__) -> PVRLayerParent::Result
75 : {
76 0 : switch ((msg__).type()) {
77 : case PVRLayer::Msg_SubmitFrame__ID:
78 : {
79 0 : if (mozilla::ipc::LoggingEnabledFor("PVRLayerParent")) {
80 0 : mozilla::ipc::LogMessageForProtocol("PVRLayerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
81 : }
82 0 : AUTO_PROFILER_LABEL("PVRLayer::Msg_SubmitFrame", OTHER);
83 :
84 0 : PickleIterator iter__(msg__);
85 : PTextureParent* aTexture;
86 :
87 0 : if ((!(Read((&(aTexture)), (&(msg__)), (&(iter__)), false)))) {
88 0 : FatalError("Error deserializing 'PTextureParent'");
89 0 : return MsgValueError;
90 : }
91 : // Sentinel = 'aTexture'
92 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 562633310)))) {
93 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PTextureParent'");
94 0 : return MsgValueError;
95 : }
96 0 : (msg__).EndRead(iter__, (msg__).type());
97 0 : PVRLayer::Transition(PVRLayer::Msg_SubmitFrame__ID, (&(mState)));
98 0 : if ((!(RecvSubmitFrame(mozilla::Move(aTexture))))) {
99 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
100 : // Error handled in mozilla::ipc::IPCResult
101 0 : return MsgProcessingError;
102 : }
103 :
104 0 : return MsgProcessed;
105 : }
106 : case PVRLayer::Msg_Destroy__ID:
107 : {
108 0 : if (mozilla::ipc::LoggingEnabledFor("PVRLayerParent")) {
109 0 : mozilla::ipc::LogMessageForProtocol("PVRLayerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
110 : }
111 0 : AUTO_PROFILER_LABEL("PVRLayer::Msg_Destroy", OTHER);
112 :
113 0 : PVRLayer::Transition(PVRLayer::Msg_Destroy__ID, (&(mState)));
114 0 : if ((!(RecvDestroy()))) {
115 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
116 : // Error handled in mozilla::ipc::IPCResult
117 0 : return MsgProcessingError;
118 : }
119 :
120 0 : return MsgProcessed;
121 : }
122 : case PVRLayer::Reply___delete____ID:
123 : {
124 0 : return MsgProcessed;
125 : }
126 : default:
127 : {
128 0 : return MsgNotKnown;
129 : }
130 : }
131 : }
132 :
133 0 : auto PVRLayerParent::OnMessageReceived(
134 : const Message& msg__,
135 : Message*& reply__) -> PVRLayerParent::Result
136 : {
137 0 : return MsgNotKnown;
138 : }
139 :
140 0 : auto PVRLayerParent::OnCallReceived(
141 : const Message& msg__,
142 : Message*& reply__) -> PVRLayerParent::Result
143 : {
144 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
145 : return MsgNotKnown;
146 : }
147 :
148 0 : auto PVRLayerParent::GetProtocolTypeId() -> int32_t
149 : {
150 0 : return PVRLayerMsgStart;
151 : }
152 :
153 0 : auto PVRLayerParent::ProtocolName() const -> const char*
154 : {
155 0 : return "PVRLayerParent";
156 : }
157 :
158 0 : auto PVRLayerParent::DestroySubtree(ActorDestroyReason why) -> void
159 : {
160 : // Unregister from our manager.
161 0 : Unregister(Id());
162 :
163 : // Reject owning pending promises.
164 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
165 :
166 : // Finally, destroy "us".
167 0 : ActorDestroy(why);
168 0 : }
169 :
170 0 : auto PVRLayerParent::DeallocSubtree() -> void
171 : {
172 0 : }
173 :
174 0 : auto PVRLayerParent::Write(
175 : const PVRLayerParent* v__,
176 : Message* msg__,
177 : bool nullable__) -> void
178 : {
179 : int32_t id;
180 0 : if ((!(v__))) {
181 0 : if ((!(nullable__))) {
182 0 : FatalError("NULL actor value passed to non-nullable param");
183 : }
184 0 : id = 0;
185 : }
186 : else {
187 0 : id = (v__)->Id();
188 0 : if ((1) == (id)) {
189 0 : FatalError("actor has been |delete|d");
190 : }
191 : }
192 :
193 0 : Write(id, msg__);
194 0 : }
195 :
196 0 : auto PVRLayerParent::Read(
197 : PVRLayerParent** v__,
198 : const Message* msg__,
199 : PickleIterator* iter__,
200 : bool nullable__) -> bool
201 : {
202 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PVRLayer", PVRLayerMsgStart);
203 0 : if ((actor).isNothing()) {
204 0 : return false;
205 : }
206 :
207 0 : (*(v__)) = static_cast<PVRLayerParent*>((actor).value());
208 0 : return true;
209 : }
210 :
211 0 : auto PVRLayerParent::Write(
212 : const PTextureParent* v__,
213 : Message* msg__,
214 : bool nullable__) -> void
215 : {
216 : int32_t id;
217 0 : if ((!(v__))) {
218 0 : if ((!(nullable__))) {
219 0 : FatalError("NULL actor value passed to non-nullable param");
220 : }
221 0 : id = 0;
222 : }
223 : else {
224 0 : id = (v__)->Id();
225 0 : if ((1) == (id)) {
226 0 : FatalError("actor has been |delete|d");
227 : }
228 : }
229 :
230 0 : Write(id, msg__);
231 0 : }
232 :
233 0 : auto PVRLayerParent::Read(
234 : PTextureParent** v__,
235 : const Message* msg__,
236 : PickleIterator* iter__,
237 : bool nullable__) -> bool
238 : {
239 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PTexture", PTextureMsgStart);
240 0 : if ((actor).isNothing()) {
241 0 : return false;
242 : }
243 :
244 0 : (*(v__)) = static_cast<PTextureParent*>((actor).value());
245 0 : return true;
246 : }
247 :
248 :
249 :
250 : } // namespace gfx
251 : } // namespace mozilla
|