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