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