// // Automatically generated by ipdlc. // Edit at your own risk // #include "mozilla/gfx/PVsyncBridgeChild.h" #include "mozilla/ProfilerLabels.h" #include "mozilla/TimeStamp.h" #include "mozilla/gfx/VsyncBridgeChild.h" #include "mozilla/layers/LayersMessageUtils.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 gfx { auto PVsyncBridgeChild::ProcessingError( Result aCode, const char* aReason) -> void { } auto PVsyncBridgeChild::ShouldContinueFromReplyTimeout() -> bool { return true; } MOZ_IMPLICIT PVsyncBridgeChild::PVsyncBridgeChild() : mozilla::ipc::IToplevelProtocol("PVsyncBridgeChild", kProtocolId, mozilla::ipc::ChildSide) { MOZ_COUNT_CTOR(PVsyncBridgeChild); } PVsyncBridgeChild::~PVsyncBridgeChild() { MOZ_COUNT_DTOR(PVsyncBridgeChild); } auto PVsyncBridgeChild::ActorAlloc() -> void { MOZ_RELEASE_ASSERT(XRE_IsParentProcess(), "Invalid process for `PVsyncBridgeChild'"); AddRef(); } auto PVsyncBridgeChild::ActorDealloc() -> void { Release(); } auto PVsyncBridgeChild::OtherPid() const -> ::base::ProcessId { ::base::ProcessId pid = ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid(); MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId); return pid; } auto PVsyncBridgeChild::OtherChildID() const -> ::GeckoChildID { ::GeckoChildID childID = ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid(); MOZ_RELEASE_ASSERT(childID != -1); return childID; } auto PVsyncBridgeChild::OtherEndpointProcInfo() const -> ::mozilla::ipc::EndpointProcInfo { return ::mozilla::ipc::EndpointProcInfo{OtherPid(), OtherChildID()}; } auto PVsyncBridgeChild::ManagedProtocolIds() const -> mozilla::Span { return {}; } auto PVsyncBridgeChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer* { switch (aProtocol) { default: return nullptr; } } auto PVsyncBridgeChild::SendNotifyVsync( const VsyncEvent& vsync, const LayersId& layersId) -> bool { UniquePtr msg__ = PVsyncBridge::Msg_NotifyVsync(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), vsync); // Sentinel = 'vsync' ((&(writer__)))->WriteSentinel(113836596); IPC::WriteParam((&(writer__)), layersId); // Sentinel = 'layersId' ((&(writer__)))->WriteSentinel(250938174); if (mozilla::ipc::LoggingEnabledFor("PVsyncBridge", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PVsyncBridgeChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PVsyncBridge::Msg_NotifyVsync", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PVsyncBridgeChild::DeallocManagee( mozilla::ipc::ProtocolId aProtocolId, IProtocol* aListener) -> void { FatalError("unreached"); return; } auto PVsyncBridgeChild::OnMessageReceived(const Message& msg__) -> PVsyncBridgeChild::Result { if (!CanSend()) { if (mozilla::ipc::LoggingEnabledFor("PVsyncBridge", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PVsyncBridgeChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Ignored message for dead actor", (&(msg__))->type(), mozilla::ipc::MessageDirection::eSending); } return MsgProcessed; } switch (msg__.type()) { 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 PVsyncBridgeChild::OnMessageReceived( const Message& msg__, UniquePtr& reply__) -> PVsyncBridgeChild::Result { if (!CanSend()) { return MsgDropped; } return MsgNotKnown; } } // namespace gfx } // namespace mozilla