// // Automatically generated by ipdlc. // Edit at your own risk // #include "mozilla/layers/PUiCompositorControllerParent.h" #include "mozilla/GfxMessageUtils.h" #include "mozilla/ProfilerLabels.h" #include "mozilla/layers/LayersMessageUtils.h" #include "mozilla/layers/UiCompositorControllerParent.h" #include "ipc/IPCMessageUtils.h" #include "ipc/IPCMessageUtilsSpecializations.h" #include "nsIFile.h" #include "mozilla/ipc/Endpoint.h" #include "mozilla/ipc/ProtocolMessageUtils.h" #include "mozilla/ipc/ProtocolUtils.h" #include "mozilla/ipc/ShmemMessageUtils.h" #include "mozilla/ipc/TaintingIPCUtils.h" namespace mozilla { namespace layers { auto PUiCompositorControllerParent::ProcessingError( Result aCode, const char* aReason) -> void { } auto PUiCompositorControllerParent::ShouldContinueFromReplyTimeout() -> bool { return true; } MOZ_IMPLICIT PUiCompositorControllerParent::PUiCompositorControllerParent() : mozilla::ipc::IToplevelProtocol("PUiCompositorControllerParent", kProtocolId, mozilla::ipc::ParentSide) { MOZ_COUNT_CTOR(PUiCompositorControllerParent); } PUiCompositorControllerParent::~PUiCompositorControllerParent() { MOZ_COUNT_DTOR(PUiCompositorControllerParent); } auto PUiCompositorControllerParent::ActorAlloc() -> void { MOZ_RELEASE_ASSERT(XRE_IsParentProcess() || XRE_IsGPUProcess(), "Invalid process for `PUiCompositorControllerParent'"); AddRef(); } auto PUiCompositorControllerParent::ActorDealloc() -> void { Release(); } auto PUiCompositorControllerParent::OtherPid() const -> ::base::ProcessId { ::base::ProcessId pid = ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid(); MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId); return pid; } auto PUiCompositorControllerParent::OtherChildID() const -> ::GeckoChildID { ::GeckoChildID childID = ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid(); MOZ_RELEASE_ASSERT(childID != -1); return childID; } auto PUiCompositorControllerParent::OtherEndpointProcInfo() const -> ::mozilla::ipc::EndpointProcInfo { return ::mozilla::ipc::EndpointProcInfo{OtherPid(), OtherChildID()}; } auto PUiCompositorControllerParent::ManagedProtocolIds() const -> mozilla::Span { return {}; } auto PUiCompositorControllerParent::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer* { switch (aProtocol) { default: return nullptr; } } auto PUiCompositorControllerParent::SendToolbarAnimatorMessageFromCompositor(const int32_t& aMessage) -> bool { UniquePtr msg__ = PUiCompositorController::Msg_ToolbarAnimatorMessageFromCompositor(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), aMessage); // Sentinel = 'aMessage' ((&(writer__)))->WriteSentinel(233440039); if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_ToolbarAnimatorMessageFromCompositor", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PUiCompositorControllerParent::SendNotifyCompositorScrollUpdates(mozilla::Span aUpdates) -> bool { UniquePtr msg__ = PUiCompositorController::Msg_NotifyCompositorScrollUpdates(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), aUpdates); // Sentinel = 'aUpdates' ((&(writer__)))->WriteSentinel(236192568); if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_NotifyCompositorScrollUpdates", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PUiCompositorControllerParent::SendScreenPixels( const uint64_t& aRequestId, const bool& aSuccess, const mozilla::Maybe& aAcquireFence) -> bool { UniquePtr msg__ = PUiCompositorController::Msg_ScreenPixels(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), aRequestId); // Sentinel = 'aRequestId' ((&(writer__)))->WriteSentinel(365560824); IPC::WriteParam((&(writer__)), aSuccess); // Sentinel = 'aSuccess' ((&(writer__)))->WriteSentinel(236323643); IPC::WriteParam((&(writer__)), aAcquireFence); // Sentinel = 'aAcquireFence' ((&(writer__)))->WriteSentinel(586745101); if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_ScreenPixels", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PUiCompositorControllerParent::DeallocManagee( mozilla::ipc::ProtocolId aProtocolId, IProtocol* aListener) -> void { FatalError("unreached"); return; } auto PUiCompositorControllerParent::OnMessageReceived(const Message& msg__) -> PUiCompositorControllerParent::Result { if (!CanSend()) { if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Ignored message for dead actor", (&(msg__))->type(), mozilla::ipc::MessageDirection::eSending); } return MsgProcessed; } switch (msg__.type()) { case PUiCompositorController::Msg_InvalidateAndRender__ID: { if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_InvalidateAndRender", OTHER); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::UiCompositorControllerParent*>(this))->RecvInvalidateAndRender(); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } case PUiCompositorController::Msg_FixedBottomOffset__ID: { if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_FixedBottomOffset", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__aOffset = IPC::ReadParam((&(reader__))); if (!maybe__aOffset) { FatalError("Error deserializing 'int32_t'"); return MsgValueError; } auto& aOffset = *maybe__aOffset; // Sentinel = 'aOffset' if ((!(((&(reader__)))->ReadSentinel(179634889)))) { mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::UiCompositorControllerParent*>(this))->RecvFixedBottomOffset(std::move(aOffset)); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } case PUiCompositorController::Msg_DefaultClearColor__ID: { if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_DefaultClearColor", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__aColor = IPC::ReadParam((&(reader__))); if (!maybe__aColor) { FatalError("Error deserializing 'uint32_t'"); return MsgValueError; } auto& aColor = *maybe__aColor; // Sentinel = 'aColor' if ((!(((&(reader__)))->ReadSentinel(132842081)))) { mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::UiCompositorControllerParent*>(this))->RecvDefaultClearColor(std::move(aColor)); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } case PUiCompositorController::Msg_RequestScreenPixels__ID: { if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_RequestScreenPixels", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__aRequestId = IPC::ReadParam((&(reader__))); if (!maybe__aRequestId) { FatalError("Error deserializing 'uint64_t'"); return MsgValueError; } auto& aRequestId = *maybe__aRequestId; // Sentinel = 'aRequestId' if ((!(((&(reader__)))->ReadSentinel(365560824)))) { mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'"); return MsgValueError; } auto maybe__aSourceRect = IPC::ReadParam((&(reader__))); if (!maybe__aSourceRect) { FatalError("Error deserializing 'IntRect'"); return MsgValueError; } auto& aSourceRect = *maybe__aSourceRect; // Sentinel = 'aSourceRect' if ((!(((&(reader__)))->ReadSentinel(438109281)))) { mozilla::ipc::SentinelReadError("Error deserializing 'IntRect'"); return MsgValueError; } auto maybe__aHardwareBuffer = IPC::ReadParam((&(reader__))); if (!maybe__aHardwareBuffer) { FatalError("Error deserializing 'FileDescriptor'"); return MsgValueError; } auto& aHardwareBuffer = *maybe__aHardwareBuffer; // Sentinel = 'aHardwareBuffer' if ((!(((&(reader__)))->ReadSentinel(779879914)))) { mozilla::ipc::SentinelReadError("Error deserializing 'FileDescriptor'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::UiCompositorControllerParent*>(this))->RecvRequestScreenPixels(std::move(aRequestId), std::move(aSourceRect), std::move(aHardwareBuffer)); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } case PUiCompositorController::Msg_EnableLayerUpdateNotifications__ID: { if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_EnableLayerUpdateNotifications", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__aEnable = IPC::ReadParam((&(reader__))); if (!maybe__aEnable) { FatalError("Error deserializing 'bool'"); return MsgValueError; } auto& aEnable = *maybe__aEnable; // Sentinel = 'aEnable' if ((!(((&(reader__)))->ReadSentinel(173605545)))) { mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::UiCompositorControllerParent*>(this))->RecvEnableLayerUpdateNotifications(std::move(aEnable)); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } default: return MsgNotKnown; case SHMEM_CREATED_MESSAGE_TYPE: { if (!ShmemCreated(msg__)) { return MsgPayloadError; } return MsgProcessed; } case SHMEM_DESTROYED_MESSAGE_TYPE: { if (!ShmemDestroyed(msg__)) { return MsgPayloadError; } return MsgProcessed; } } } auto PUiCompositorControllerParent::OnMessageReceived( const Message& msg__, UniquePtr& reply__) -> PUiCompositorControllerParent::Result { if (!CanSend()) { return MsgDropped; } switch (msg__.type()) { case PUiCompositorController::Msg_Pause__ID: { if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_Pause", OTHER); mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL; mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::UiCompositorControllerParent*>(this))->RecvPause(); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } reply__ = PUiCompositorController::Reply_Pause(id__); IPC::MessageWriter writer__{ (*(reply__)), this}; if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending reply ", reply__->type(), mozilla::ipc::MessageDirection::eSending); } return MsgProcessed; } case PUiCompositorController::Msg_Resume__ID: { if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_Resume", OTHER); mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL; bool aOutResumed{}; mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::UiCompositorControllerParent*>(this))->RecvResume((&(aOutResumed))); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } reply__ = PUiCompositorController::Reply_Resume(id__); IPC::MessageWriter writer__{ (*(reply__)), this}; IPC::WriteParam((&(writer__)), aOutResumed); // Sentinel = 'aOutResumed' ((&(writer__)))->WriteSentinel(439157871); if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending reply ", reply__->type(), mozilla::ipc::MessageDirection::eSending); } return MsgProcessed; } case PUiCompositorController::Msg_ResumeAndResize__ID: { if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_ResumeAndResize", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__aX = IPC::ReadParam((&(reader__))); if (!maybe__aX) { FatalError("Error deserializing 'int32_t'"); return MsgValueError; } auto& aX = *maybe__aX; // Sentinel = 'aX' if ((!(((&(reader__)))->ReadSentinel(18612410)))) { mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'"); return MsgValueError; } auto maybe__aY = IPC::ReadParam((&(reader__))); if (!maybe__aY) { FatalError("Error deserializing 'int32_t'"); return MsgValueError; } auto& aY = *maybe__aY; // Sentinel = 'aY' if ((!(((&(reader__)))->ReadSentinel(18677947)))) { mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'"); return MsgValueError; } auto maybe__aWidth = IPC::ReadParam((&(reader__))); if (!maybe__aWidth) { FatalError("Error deserializing 'int32_t'"); return MsgValueError; } auto& aWidth = *maybe__aWidth; // Sentinel = 'aWidth' if ((!(((&(reader__)))->ReadSentinel(136249954)))) { mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'"); return MsgValueError; } auto maybe__aHeight = IPC::ReadParam((&(reader__))); if (!maybe__aHeight) { FatalError("Error deserializing 'int32_t'"); return MsgValueError; } auto& aHeight = *maybe__aHeight; // Sentinel = 'aHeight' if ((!(((&(reader__)))->ReadSentinel(175375035)))) { mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL; bool aOutResumed{}; mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::UiCompositorControllerParent*>(this))->RecvResumeAndResize(std::move(aX), std::move(aY), std::move(aWidth), std::move(aHeight), (&(aOutResumed))); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } reply__ = PUiCompositorController::Reply_ResumeAndResize(id__); IPC::MessageWriter writer__{ (*(reply__)), this}; IPC::WriteParam((&(writer__)), aOutResumed); // Sentinel = 'aOutResumed' ((&(writer__)))->WriteSentinel(439157871); if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending reply ", reply__->type(), mozilla::ipc::MessageDirection::eSending); } return MsgProcessed; } default: return MsgNotKnown; } } } // namespace layers } // namespace mozilla