//
// Automatically generated by ipdlc.
// Edit at your own risk
//


#include "mozilla/gfx/PGPUChild.h"
#include "mozilla/D3DMessageUtils.h"
#include "mozilla/GfxMessageUtils.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/ProfilerMarkers.h"
#include "mozilla/gfx/GPUChild.h"
#include "mozilla/ipc/ByteBufUtils.h"
#include "mozilla/ipc/IPCCore.h"
#include "mozilla/layers/LayersMessageUtils.h"

#include "mozilla/layers/PAPZInputBridgeChild.h"
#include "mozilla/layers/PCompositorManagerChild.h"
#include "mozilla/layers/PImageBridgeChild.h"
#include "mozilla/PProfilerChild.h"
#include "mozilla/gfx/PVRGPUChild.h"
#include "mozilla/gfx/PVRManagerChild.h"
#include "mozilla/layers/PVideoBridgeChild.h"
#include "mozilla/gfx/PVsyncBridgeChild.h"
#include "mozilla/layers/PUiCompositorControllerChild.h"
#include "mozilla/PRemoteMediaManagerChild.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 PGPUChild::ProcessingError(
        Result aCode,
        const char* aReason) -> void
{
}

auto PGPUChild::ShouldContinueFromReplyTimeout() -> bool
{
    return true;
}

MOZ_IMPLICIT PGPUChild::PGPUChild() :
    mozilla::ipc::IToplevelProtocol("PGPUChild", kProtocolId, mozilla::ipc::ChildSide)
{
    MOZ_COUNT_CTOR(PGPUChild);
}

PGPUChild::~PGPUChild()
{
    MOZ_COUNT_DTOR(PGPUChild);
}

auto PGPUChild::ActorAlloc() -> void
{
    MOZ_RELEASE_ASSERT(XRE_IsParentProcess(), "Invalid process for `PGPUChild'");
    AddRef();
}

auto PGPUChild::ActorDealloc() -> void
{
    Release();
}

auto PGPUChild::OtherPid() const -> ::base::ProcessId
{
    ::base::ProcessId pid =
        ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid();
    MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId);
    return pid;
}

auto PGPUChild::OtherChildID() const -> ::GeckoChildID
{
    ::GeckoChildID childID =
        ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid();
    MOZ_RELEASE_ASSERT(childID != -1);
    return childID;
}

auto PGPUChild::OtherEndpointProcInfo() const -> ::mozilla::ipc::EndpointProcInfo
{
    return ::mozilla::ipc::EndpointProcInfo{OtherPid(), OtherChildID()};
}

auto PGPUChild::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
    return {};
}

auto PGPUChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
    switch (aProtocol) {
    default:
        return nullptr;
    }
}

auto PGPUChild::RejectPendingResponses(ResponseRejectReason aReason) -> void
{
    mAsyncCallbacks.RejectPendingResponses(aReason);
}

auto PGPUChild::SendInit(
        mozilla::Span<GfxVarUpdate const> vars,
        const DevicePrefs& devicePrefs,
        mozilla::Span<LayerTreeIdMapping const> mapping,
        mozilla::Span<GfxInfoFeatureStatus const> features,
        const uint32_t& wrNamespace,
        mozilla::ipc::ResolveCallback<GPUDeviceData>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_Init(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), vars);
    // Sentinel = 'vars'
    ((&(writer__)))->WriteSentinel(72745405);
    IPC::WriteParam((&(writer__)), devicePrefs);
    // Sentinel = 'devicePrefs'
    ((&(writer__)))->WriteSentinel(445645937);
    IPC::WriteParam((&(writer__)), mapping);
    // Sentinel = 'mapping'
    ((&(writer__)))->WriteSentinel(196477677);
    IPC::WriteParam((&(writer__)), features);
    // Sentinel = 'features'
    ((&(writer__)))->WriteSentinel(250348384);
    IPC::WriteParam((&(writer__)), wrNamespace);
    // Sentinel = 'wrNamespace'
    ((&(writer__)))->WriteSentinel(453510263);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_Init", OTHER);

    IPC::Message::seqno_t seqno__ = 0;
    if (ChannelSend(std::move(msg__), (&(seqno__)))) {
        mAsyncCallbacks.AddCallback(seqno__, PGPU::Reply_Init__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
            auto maybe__data = IPC::ReadParam<GPUDeviceData>(aReader);
            if (!maybe__data) {
                (aReader)->FatalError("Error deserializing 'GPUDeviceData'");
                return MsgValueError;

            }
            auto& data = *maybe__data;
            // Sentinel = 'data'
            if ((!((aReader)->ReadSentinel(67109275)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'GPUDeviceData'");
                return MsgValueError;
            }


            aReader->EndRead();

            resolve(std::move(data));
            return MsgProcessed;
        }, std::move(aReject));
    }
    else {
        aReject(::mozilla::ipc::ResponseRejectReason::SendError);
    }
    return;
}

auto PGPUChild::SendInit(
        mozilla::Span<GfxVarUpdate const> vars,
        const DevicePrefs& devicePrefs,
        mozilla::Span<LayerTreeIdMapping const> mapping,
        mozilla::Span<GfxInfoFeatureStatus const> features,
        const uint32_t& wrNamespace) -> RefPtr<InitPromise>
{
    RefPtr<MozPromise<GPUDeviceData, ResponseRejectReason, true>::Private> promise__ = new MozPromise<GPUDeviceData, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendInit(std::forward<mozilla::Span<GfxVarUpdate const>>(vars), std::forward<const DevicePrefs&>(devicePrefs), std::forward<mozilla::Span<LayerTreeIdMapping const>>(mapping), std::forward<mozilla::Span<GfxInfoFeatureStatus const>>(features), std::forward<const uint32_t&>(wrNamespace), [promise__](GPUDeviceData&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PGPUChild::SendInitCompositorManager(
        Endpoint<::mozilla::layers::PCompositorManagerParent>&& endpoint,
        const uint32_t& aNamespace) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_InitCompositorManager(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), std::move(endpoint));
    // Sentinel = 'endpoint'
    ((&(writer__)))->WriteSentinel(251724642);
    IPC::WriteParam((&(writer__)), aNamespace);
    // Sentinel = 'aNamespace'
    ((&(writer__)))->WriteSentinel(356516847);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_InitCompositorManager", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendInitVsyncBridge(Endpoint<::mozilla::gfx::PVsyncBridgeParent>&& endpoint) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_InitVsyncBridge(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), std::move(endpoint));
    // Sentinel = 'endpoint'
    ((&(writer__)))->WriteSentinel(251724642);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_InitVsyncBridge", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendInitImageBridge(
        Endpoint<::mozilla::layers::PImageBridgeParent>&& endpoint,
        const uint32_t& aNamespace) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_InitImageBridge(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), std::move(endpoint));
    // Sentinel = 'endpoint'
    ((&(writer__)))->WriteSentinel(251724642);
    IPC::WriteParam((&(writer__)), aNamespace);
    // Sentinel = 'aNamespace'
    ((&(writer__)))->WriteSentinel(356516847);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_InitImageBridge", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendInitVideoBridge(
        Endpoint<::mozilla::layers::PVideoBridgeParent>&& endpoint,
        const VideoBridgeSource& aSource) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_InitVideoBridge(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), std::move(endpoint));
    // Sentinel = 'endpoint'
    ((&(writer__)))->WriteSentinel(251724642);
    IPC::WriteParam((&(writer__)), aSource);
    // Sentinel = 'aSource'
    ((&(writer__)))->WriteSentinel(186647251);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_InitVideoBridge", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendInitVRManager(
        Endpoint<::mozilla::gfx::PVRManagerParent>&& endpoint,
        const uint32_t& aNamespace) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_InitVRManager(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), std::move(endpoint));
    // Sentinel = 'endpoint'
    ((&(writer__)))->WriteSentinel(251724642);
    IPC::WriteParam((&(writer__)), aNamespace);
    // Sentinel = 'aNamespace'
    ((&(writer__)))->WriteSentinel(356516847);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_InitVRManager", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendInitUiCompositorController(
        const LayersId& rootLayerTreeId,
        Endpoint<::mozilla::layers::PUiCompositorControllerParent>&& endpoint) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_InitUiCompositorController(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), rootLayerTreeId);
    // Sentinel = 'rootLayerTreeId'
    ((&(writer__)))->WriteSentinel(828507647);
    IPC::WriteParam((&(writer__)), std::move(endpoint));
    // Sentinel = 'endpoint'
    ((&(writer__)))->WriteSentinel(251724642);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_InitUiCompositorController", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendInitAPZInputBridge(
        const LayersId& layersId,
        Endpoint<::mozilla::layers::PAPZInputBridgeParent>&& endpoint) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_InitAPZInputBridge(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), layersId);
    // Sentinel = 'layersId'
    ((&(writer__)))->WriteSentinel(250938174);
    IPC::WriteParam((&(writer__)), std::move(endpoint));
    // Sentinel = 'endpoint'
    ((&(writer__)))->WriteSentinel(251724642);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_InitAPZInputBridge", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendInitProfiler(Endpoint<::mozilla::PProfilerChild>&& endpoint) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_InitProfiler(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), std::move(endpoint));
    // Sentinel = 'endpoint'
    ((&(writer__)))->WriteSentinel(251724642);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_InitProfiler", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendInitVR(Endpoint<::mozilla::gfx::PVRGPUChild>&& endpoint) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_InitVR(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), std::move(endpoint));
    // Sentinel = 'endpoint'
    ((&(writer__)))->WriteSentinel(251724642);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_InitVR", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendUpdateVar(mozilla::Span<GfxVarUpdate const> var) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_UpdateVar(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), var);
    // Sentinel = 'var'
    ((&(writer__)))->WriteSentinel(43581770);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_UpdateVar", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendPreferenceUpdate(const Pref& pref) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_PreferenceUpdate(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), pref);
    // Sentinel = 'pref'
    ((&(writer__)))->WriteSentinel(71958958);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_PreferenceUpdate", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendScreenInformationChanged() -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_ScreenInformationChanged(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_ScreenInformationChanged", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendNotifyBatteryInfo(const BatteryInformation& aBatteryInfo) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_NotifyBatteryInfo(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aBatteryInfo);
    // Sentinel = 'aBatteryInfo'
    ((&(writer__)))->WriteSentinel(509674697);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_NotifyBatteryInfo", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendNewContentCompositorManager(
        Endpoint<::mozilla::layers::PCompositorManagerParent>&& endpoint,
        const ContentParentId& childId,
        const uint32_t& aNamespace,
        const uint32_t& aContentBridgeNamespace) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_NewContentCompositorManager(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), std::move(endpoint));
    // Sentinel = 'endpoint'
    ((&(writer__)))->WriteSentinel(251724642);
    IPC::WriteParam((&(writer__)), childId);
    // Sentinel = 'childId'
    ((&(writer__)))->WriteSentinel(185270962);
    IPC::WriteParam((&(writer__)), aNamespace);
    // Sentinel = 'aNamespace'
    ((&(writer__)))->WriteSentinel(356516847);
    IPC::WriteParam((&(writer__)), aContentBridgeNamespace);
    // Sentinel = 'aContentBridgeNamespace'
    ((&(writer__)))->WriteSentinel(1819347223);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_NewContentCompositorManager", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendNewContentImageBridge(
        Endpoint<::mozilla::layers::PImageBridgeParent>&& endpoint,
        const ContentParentId& childId,
        const uint32_t& aNamespace) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_NewContentImageBridge(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), std::move(endpoint));
    // Sentinel = 'endpoint'
    ((&(writer__)))->WriteSentinel(251724642);
    IPC::WriteParam((&(writer__)), childId);
    // Sentinel = 'childId'
    ((&(writer__)))->WriteSentinel(185270962);
    IPC::WriteParam((&(writer__)), aNamespace);
    // Sentinel = 'aNamespace'
    ((&(writer__)))->WriteSentinel(356516847);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_NewContentImageBridge", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendNewContentVRManager(
        Endpoint<::mozilla::gfx::PVRManagerParent>&& endpoint,
        const ContentParentId& childId,
        const uint32_t& aNamespace) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_NewContentVRManager(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), std::move(endpoint));
    // Sentinel = 'endpoint'
    ((&(writer__)))->WriteSentinel(251724642);
    IPC::WriteParam((&(writer__)), childId);
    // Sentinel = 'childId'
    ((&(writer__)))->WriteSentinel(185270962);
    IPC::WriteParam((&(writer__)), aNamespace);
    // Sentinel = 'aNamespace'
    ((&(writer__)))->WriteSentinel(356516847);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_NewContentVRManager", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendNewContentRemoteMediaManager(
        Endpoint<::mozilla::PRemoteMediaManagerParent>&& endpoint,
        const ContentParentId& childId) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_NewContentRemoteMediaManager(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), std::move(endpoint));
    // Sentinel = 'endpoint'
    ((&(writer__)))->WriteSentinel(251724642);
    IPC::WriteParam((&(writer__)), childId);
    // Sentinel = 'childId'
    ((&(writer__)))->WriteSentinel(185270962);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_NewContentRemoteMediaManager", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendAddLayerTreeIdMapping(const LayerTreeIdMapping& mapping) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_AddLayerTreeIdMapping(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), mapping);
    // Sentinel = 'mapping'
    ((&(writer__)))->WriteSentinel(196477677);

    UniquePtr<Message> reply__;

    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_AddLayerTreeIdMapping", OTHER);

    bool sendok__ = false;
    {
        AUTO_PROFILER_MARKER("PGPU::Msg_AddLayerTreeIdMapping", IPC);
        sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
    }
    if ((!(sendok__))) {
        return false;
    }

    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Received reply ",
            reply__->type(),
            mozilla::ipc::MessageDirection::eReceiving);
    }

    return true;
}

auto PGPUChild::SendRemoveLayerTreeIdMapping(const LayerTreeIdMapping& mapping) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_RemoveLayerTreeIdMapping(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), mapping);
    // Sentinel = 'mapping'
    ((&(writer__)))->WriteSentinel(196477677);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_RemoveLayerTreeIdMapping", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendGetDeviceStatus(GPUDeviceData* status) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_GetDeviceStatus(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};


    UniquePtr<Message> reply__;

    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_GetDeviceStatus", OTHER);

    bool sendok__ = false;
    {
        AUTO_PROFILER_MARKER("PGPU::Msg_GetDeviceStatus", IPC);
        sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
    }
    if ((!(sendok__))) {
        return false;
    }

    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Received reply ",
            reply__->type(),
            mozilla::ipc::MessageDirection::eReceiving);
    }

    IPC::MessageReader reader__{
            (*(reply__)),
            this};

    auto maybe__status__reply = IPC::ReadParam<GPUDeviceData>((&(reader__)));
    if (!maybe__status__reply) {
        FatalError("Error deserializing 'GPUDeviceData'");
        return false;

    }
    auto& status__reply = *maybe__status__reply;
    // Sentinel = 'status'
    if ((!(((&(reader__)))->ReadSentinel(154731173)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'GPUDeviceData'");
        return false;
    }
    (*(status)) = std::move(status__reply);
    reader__.EndRead();

    return true;
}

auto PGPUChild::SendSimulateDeviceReset() -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_SimulateDeviceReset(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_SimulateDeviceReset", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendFlushActiveCheckerboardReports() -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_FlushActiveCheckerboardReports(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_FlushActiveCheckerboardReports", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendRequestMemoryReport(
        const uint32_t& generation,
        const bool& anonymize,
        const bool& minimizeMemoryUsage,
        const mozilla::Maybe<FileDescriptor>& DMDFile,
        mozilla::ipc::ResolveCallback<uint32_t>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_RequestMemoryReport(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), generation);
    // Sentinel = 'generation'
    ((&(writer__)))->WriteSentinel(381158445);
    IPC::WriteParam((&(writer__)), anonymize);
    // Sentinel = 'anonymize'
    ((&(writer__)))->WriteSentinel(321127387);
    IPC::WriteParam((&(writer__)), minimizeMemoryUsage);
    // Sentinel = 'minimizeMemoryUsage'
    ((&(writer__)))->WriteSentinel(1321600977);
    IPC::WriteParam((&(writer__)), DMDFile);
    // Sentinel = 'DMDFile'
    ((&(writer__)))->WriteSentinel(143983190);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_RequestMemoryReport", OTHER);

    IPC::Message::seqno_t seqno__ = 0;
    if (ChannelSend(std::move(msg__), (&(seqno__)))) {
        mAsyncCallbacks.AddCallback(seqno__, PGPU::Reply_RequestMemoryReport__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
            auto maybe__aGeneration = IPC::ReadParam<uint32_t>(aReader);
            if (!maybe__aGeneration) {
                (aReader)->FatalError("Error deserializing 'uint32_t'");
                return MsgValueError;

            }
            auto& aGeneration = *maybe__aGeneration;
            // Sentinel = 'aGeneration'
            if ((!((aReader)->ReadSentinel(430179438)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
                return MsgValueError;
            }


            aReader->EndRead();

            resolve(std::move(aGeneration));
            return MsgProcessed;
        }, std::move(aReject));
    }
    else {
        aReject(::mozilla::ipc::ResponseRejectReason::SendError);
    }
    return;
}

auto PGPUChild::SendRequestMemoryReport(
        const uint32_t& generation,
        const bool& anonymize,
        const bool& minimizeMemoryUsage,
        const mozilla::Maybe<FileDescriptor>& DMDFile) -> RefPtr<RequestMemoryReportPromise>
{
    RefPtr<MozPromise<uint32_t, ResponseRejectReason, true>::Private> promise__ = new MozPromise<uint32_t, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendRequestMemoryReport(std::forward<const uint32_t&>(generation), std::forward<const bool&>(anonymize), std::forward<const bool&>(minimizeMemoryUsage), std::forward<const mozilla::Maybe<FileDescriptor>&>(DMDFile), [promise__](uint32_t&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PGPUChild::SendShutdownVR() -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_ShutdownVR(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_ShutdownVR", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendUpdatePerfStatsCollectionMask(const uint64_t& aMask) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_UpdatePerfStatsCollectionMask(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aMask);
    // Sentinel = 'aMask'
    ((&(writer__)))->WriteSentinel(93454830);


    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_UpdatePerfStatsCollectionMask", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::SendCollectPerfStatsJSON(
        mozilla::ipc::ResolveCallback<string>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_CollectPerfStatsJSON(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_CollectPerfStatsJSON", OTHER);

    IPC::Message::seqno_t seqno__ = 0;
    if (ChannelSend(std::move(msg__), (&(seqno__)))) {
        mAsyncCallbacks.AddCallback(seqno__, PGPU::Reply_CollectPerfStatsJSON__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
            auto maybe__aStats = IPC::ReadParam<string>(aReader);
            if (!maybe__aStats) {
                (aReader)->FatalError("Error deserializing 'string'");
                return MsgValueError;

            }
            auto& aStats = *maybe__aStats;
            // Sentinel = 'aStats'
            if ((!((aReader)->ReadSentinel(137953905)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'string'");
                return MsgValueError;
            }


            aReader->EndRead();

            resolve(std::move(aStats));
            return MsgProcessed;
        }, std::move(aReject));
    }
    else {
        aReject(::mozilla::ipc::ResponseRejectReason::SendError);
    }
    return;
}

auto PGPUChild::SendCollectPerfStatsJSON() -> RefPtr<CollectPerfStatsJSONPromise>
{
    RefPtr<MozPromise<string, ResponseRejectReason, true>::Private> promise__ = new MozPromise<string, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendCollectPerfStatsJSON([promise__](string&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PGPUChild::SendFlushFOGData(
        mozilla::ipc::ResolveCallback<ByteBuf>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_FlushFOGData(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_FlushFOGData", OTHER);

    IPC::Message::seqno_t seqno__ = 0;
    if (ChannelSend(std::move(msg__), (&(seqno__)))) {
        mAsyncCallbacks.AddCallback(seqno__, PGPU::Reply_FlushFOGData__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
            auto maybe__buf = IPC::ReadParam<ByteBuf>(aReader);
            if (!maybe__buf) {
                (aReader)->FatalError("Error deserializing 'ByteBuf'");
                return MsgValueError;

            }
            auto& buf = *maybe__buf;
            // Sentinel = 'buf'
            if ((!((aReader)->ReadSentinel(41484606)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ByteBuf'");
                return MsgValueError;
            }


            aReader->EndRead();

            resolve(std::move(buf));
            return MsgProcessed;
        }, std::move(aReject));
    }
    else {
        aReject(::mozilla::ipc::ResponseRejectReason::SendError);
    }
    return;
}

auto PGPUChild::SendFlushFOGData() -> RefPtr<FlushFOGDataPromise>
{
    RefPtr<MozPromise<ByteBuf, ResponseRejectReason, true>::Private> promise__ = new MozPromise<ByteBuf, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendFlushFOGData([promise__](ByteBuf&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PGPUChild::SendTestTriggerMetrics(
        mozilla::ipc::ResolveCallback<bool>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_TestTriggerMetrics(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_TestTriggerMetrics", OTHER);

    IPC::Message::seqno_t seqno__ = 0;
    if (ChannelSend(std::move(msg__), (&(seqno__)))) {
        mAsyncCallbacks.AddCallback(seqno__, PGPU::Reply_TestTriggerMetrics__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
            auto maybe__unused = IPC::ReadParam<bool>(aReader);
            if (!maybe__unused) {
                (aReader)->FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& unused = *maybe__unused;
            // Sentinel = 'unused'
            if ((!((aReader)->ReadSentinel(155517589)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }


            aReader->EndRead();

            resolve(std::move(unused));
            return MsgProcessed;
        }, std::move(aReject));
    }
    else {
        aReject(::mozilla::ipc::ResponseRejectReason::SendError);
    }
    return;
}

auto PGPUChild::SendTestTriggerMetrics() -> RefPtr<TestTriggerMetricsPromise>
{
    RefPtr<MozPromise<bool, ResponseRejectReason, true>::Private> promise__ = new MozPromise<bool, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendTestTriggerMetrics([promise__](bool&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PGPUChild::SendCrashProcess() -> bool
{
    UniquePtr<IPC::Message> msg__ = PGPU::Msg_CrashProcess(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGPUChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGPU::Msg_CrashProcess", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGPUChild::DeallocManagee(
        mozilla::ipc::ProtocolId aProtocolId,
        IProtocol* aListener) -> void
{
    FatalError("unreached");
    return;
}

auto PGPUChild::OnMessageReceived(const Message& msg__) -> PGPUChild::Result
{
    if (!CanSend()) {
        if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
            mozilla::ipc::LogMessageForProtocol(
                "PGPUChild",
                this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                "Ignored message for dead actor",
                (&(msg__))->type(),
                mozilla::ipc::MessageDirection::eSending);
        }
        return MsgProcessed;

    }
    switch (msg__.type()) {
    case PGPU::Reply_Init__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PGPU::Msg_Init", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PGPU::Reply_RequestMemoryReport__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PGPU::Msg_RequestMemoryReport", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PGPU::Reply_CollectPerfStatsJSON__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PGPU::Msg_CollectPerfStatsJSON", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PGPU::Reply_FlushFOGData__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PGPU::Msg_FlushFOGData", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PGPU::Reply_TestTriggerMetrics__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PGPU::Msg_TestTriggerMetrics", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PGPU::Msg_ReportCheckerboard__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_ReportCheckerboard", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__severity = IPC::ReadParam<uint32_t>((&(reader__)));
            if (!maybe__severity) {
                FatalError("Error deserializing 'uint32_t'");
                return MsgValueError;

            }
            auto& severity = *maybe__severity;
            // Sentinel = 'severity'
            if ((!(((&(reader__)))->ReadSentinel(260309884)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
                return MsgValueError;
            }
            auto maybe__log = IPC::ReadParam<nsCString>((&(reader__)));
            if (!maybe__log) {
                FatalError("Error deserializing 'nsCString'");
                return MsgValueError;

            }
            auto& log = *maybe__log;
            // Sentinel = 'log'
            if ((!(((&(reader__)))->ReadSentinel(42729795)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvReportCheckerboard(std::move(severity), std::move(log));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_GraphicsError__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_GraphicsError", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aError = IPC::ReadParam<nsCString>((&(reader__)));
            if (!maybe__aError) {
                FatalError("Error deserializing 'nsCString'");
                return MsgValueError;

            }
            auto& aError = *maybe__aError;
            // Sentinel = 'aError'
            if ((!(((&(reader__)))->ReadSentinel(135463532)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvGraphicsError(std::move(aError));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_InitCrashReporter__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_InitCrashReporter", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aInitArgs = IPC::ReadParam<CrashReporterInitArgs>((&(reader__)));
            if (!maybe__aInitArgs) {
                FatalError("Error deserializing 'CrashReporterInitArgs'");
                return MsgValueError;

            }
            auto& aInitArgs = *maybe__aInitArgs;
            // Sentinel = 'aInitArgs'
            if ((!(((&(reader__)))->ReadSentinel(286327683)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'CrashReporterInitArgs'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvInitCrashReporter(std::move(aInitArgs));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_CreateVRProcess__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_CreateVRProcess", OTHER);

            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvCreateVRProcess();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_ShutdownVRProcess__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_ShutdownVRProcess", OTHER);

            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvShutdownVRProcess();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_FlushActiveCheckerboardReportsDone__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_FlushActiveCheckerboardReportsDone", OTHER);

            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvFlushActiveCheckerboardReportsDone();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_AccumulateChildHistograms__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_AccumulateChildHistograms", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__accumulations = IPC::ReadParam<nsTArray<HistogramAccumulation>>((&(reader__)));
            if (!maybe__accumulations) {
                FatalError("Error deserializing 'HistogramAccumulation[]'");
                return MsgValueError;

            }
            auto& accumulations = *maybe__accumulations;
            // Sentinel = 'accumulations'
            if ((!(((&(reader__)))->ReadSentinel(632030585)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'HistogramAccumulation[]'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvAccumulateChildHistograms(std::move(accumulations));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_AccumulateChildKeyedHistograms__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_AccumulateChildKeyedHistograms", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__accumulations = IPC::ReadParam<nsTArray<KeyedHistogramAccumulation>>((&(reader__)));
            if (!maybe__accumulations) {
                FatalError("Error deserializing 'KeyedHistogramAccumulation[]'");
                return MsgValueError;

            }
            auto& accumulations = *maybe__accumulations;
            // Sentinel = 'accumulations'
            if ((!(((&(reader__)))->ReadSentinel(632030585)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'KeyedHistogramAccumulation[]'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvAccumulateChildKeyedHistograms(std::move(accumulations));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_UpdateChildScalars__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_UpdateChildScalars", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__actions = IPC::ReadParam<nsTArray<ScalarAction>>((&(reader__)));
            if (!maybe__actions) {
                FatalError("Error deserializing 'ScalarAction[]'");
                return MsgValueError;

            }
            auto& actions = *maybe__actions;
            // Sentinel = 'actions'
            if ((!(((&(reader__)))->ReadSentinel(193200882)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ScalarAction[]'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvUpdateChildScalars(std::move(actions));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_UpdateChildKeyedScalars__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_UpdateChildKeyedScalars", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__actions = IPC::ReadParam<nsTArray<KeyedScalarAction>>((&(reader__)));
            if (!maybe__actions) {
                FatalError("Error deserializing 'KeyedScalarAction[]'");
                return MsgValueError;

            }
            auto& actions = *maybe__actions;
            // Sentinel = 'actions'
            if ((!(((&(reader__)))->ReadSentinel(193200882)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'KeyedScalarAction[]'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvUpdateChildKeyedScalars(std::move(actions));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_RecordChildEvents__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_RecordChildEvents", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__events = IPC::ReadParam<nsTArray<ChildEventData>>((&(reader__)));
            if (!maybe__events) {
                FatalError("Error deserializing 'ChildEventData[]'");
                return MsgValueError;

            }
            auto& events = *maybe__events;
            // Sentinel = 'events'
            if ((!(((&(reader__)))->ReadSentinel(149619350)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ChildEventData[]'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvRecordChildEvents(std::move(events));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_RecordDiscardedData__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_RecordDiscardedData", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__data = IPC::ReadParam<DiscardedData>((&(reader__)));
            if (!maybe__data) {
                FatalError("Error deserializing 'DiscardedData'");
                return MsgValueError;

            }
            auto& data = *maybe__data;
            // Sentinel = 'data'
            if ((!(((&(reader__)))->ReadSentinel(67109275)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'DiscardedData'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvRecordDiscardedData(std::move(data));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_DeclareStable__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_DeclareStable", OTHER);

            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvDeclareStable();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_NotifyDeviceReset__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_NotifyDeviceReset", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__status = IPC::ReadParam<GPUDeviceData>((&(reader__)));
            if (!maybe__status) {
                FatalError("Error deserializing 'GPUDeviceData'");
                return MsgValueError;

            }
            auto& status = *maybe__status;
            // Sentinel = 'status'
            if ((!(((&(reader__)))->ReadSentinel(154731173)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'GPUDeviceData'");
                return MsgValueError;
            }
            auto maybe__reason = IPC::ReadParam<DeviceResetReason>((&(reader__)));
            if (!maybe__reason) {
                FatalError("Error deserializing 'DeviceResetReason'");
                return MsgValueError;

            }
            auto& reason = *maybe__reason;
            // Sentinel = 'reason'
            if ((!(((&(reader__)))->ReadSentinel(148112009)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'DeviceResetReason'");
                return MsgValueError;
            }
            auto maybe__place = IPC::ReadParam<DeviceResetDetectPlace>((&(reader__)));
            if (!maybe__place) {
                FatalError("Error deserializing 'DeviceResetDetectPlace'");
                return MsgValueError;

            }
            auto& place = *maybe__place;
            // Sentinel = 'place'
            if ((!(((&(reader__)))->ReadSentinel(104006150)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'DeviceResetDetectPlace'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvNotifyDeviceReset(std::move(status), std::move(reason), std::move(place));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_NotifyOverlayInfo__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_NotifyOverlayInfo", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__info = IPC::ReadParam<OverlayInfo>((&(reader__)));
            if (!maybe__info) {
                FatalError("Error deserializing 'OverlayInfo'");
                return MsgValueError;

            }
            auto& info = *maybe__info;
            // Sentinel = 'info'
            if ((!(((&(reader__)))->ReadSentinel(70058413)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'OverlayInfo'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvNotifyOverlayInfo(std::move(info));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_NotifySwapChainInfo__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_NotifySwapChainInfo", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__info = IPC::ReadParam<SwapChainInfo>((&(reader__)));
            if (!maybe__info) {
                FatalError("Error deserializing 'SwapChainInfo'");
                return MsgValueError;

            }
            auto& info = *maybe__info;
            // Sentinel = 'info'
            if ((!(((&(reader__)))->ReadSentinel(70058413)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'SwapChainInfo'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvNotifySwapChainInfo(std::move(info));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_NotifyDisableRemoteCanvas__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_NotifyDisableRemoteCanvas", OTHER);

            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvNotifyDisableRemoteCanvas();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_FlushMemory__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_FlushMemory", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__reason = IPC::ReadParam<nsString>((&(reader__)));
            if (!maybe__reason) {
                FatalError("Error deserializing 'nsString'");
                return MsgValueError;

            }
            auto& reason = *maybe__reason;
            // Sentinel = 'reason'
            if ((!(((&(reader__)))->ReadSentinel(148112009)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvFlushMemory(std::move(reason));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_AddMemoryReport__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_AddMemoryReport", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aReport = IPC::ReadParam<MemoryReport>((&(reader__)));
            if (!maybe__aReport) {
                FatalError("Error deserializing 'MemoryReport'");
                return MsgValueError;

            }
            auto& aReport = *maybe__aReport;
            // Sentinel = 'aReport'
            if ((!(((&(reader__)))->ReadSentinel(184025822)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'MemoryReport'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvAddMemoryReport(std::move(aReport));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_UpdateFeature__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_UpdateFeature", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aFeature = IPC::ReadParam<Feature>((&(reader__)));
            if (!maybe__aFeature) {
                FatalError("Error deserializing 'Feature'");
                return MsgValueError;

            }
            auto& aFeature = *maybe__aFeature;
            // Sentinel = 'aFeature'
            if ((!(((&(reader__)))->ReadSentinel(229966638)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'Feature'");
                return MsgValueError;
            }
            auto maybe__aChange = IPC::ReadParam<FeatureFailure>((&(reader__)));
            if (!maybe__aChange) {
                FatalError("Error deserializing 'FeatureFailure'");
                return MsgValueError;

            }
            auto& aChange = *maybe__aChange;
            // Sentinel = 'aChange'
            if ((!(((&(reader__)))->ReadSentinel(172556968)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'FeatureFailure'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvUpdateFeature(std::move(aFeature), std::move(aChange));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_UsedFallback__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_UsedFallback", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aFallback = IPC::ReadParam<Fallback>((&(reader__)));
            if (!maybe__aFallback) {
                FatalError("Error deserializing 'Fallback'");
                return MsgValueError;

            }
            auto& aFallback = *maybe__aFallback;
            // Sentinel = 'aFallback'
            if ((!(((&(reader__)))->ReadSentinel(281609074)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'Fallback'");
                return MsgValueError;
            }
            auto maybe__message = IPC::ReadParam<nsCString>((&(reader__)));
            if (!maybe__message) {
                FatalError("Error deserializing 'nsCString'");
                return MsgValueError;

            }
            auto& message = *maybe__message;
            // Sentinel = 'message'
            if ((!(((&(reader__)))->ReadSentinel(197198566)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvUsedFallback(std::move(aFallback), std::move(message));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_BHRThreadHang__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_BHRThreadHang", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aDetails = IPC::ReadParam<HangDetails>((&(reader__)));
            if (!maybe__aDetails) {
                FatalError("Error deserializing 'HangDetails'");
                return MsgValueError;

            }
            auto& aDetails = *maybe__aDetails;
            // Sentinel = 'aDetails'
            if ((!(((&(reader__)))->ReadSentinel(228066088)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'HangDetails'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvBHRThreadHang(std::move(aDetails));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_UpdateMediaCodecsSupported__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_UpdateMediaCodecsSupported", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aSupported = IPC::ReadParam<MediaCodecsSupported>((&(reader__)));
            if (!maybe__aSupported) {
                FatalError("Error deserializing 'MediaCodecsSupported'");
                return MsgValueError;

            }
            auto& aSupported = *maybe__aSupported;
            // Sentinel = 'aSupported'
            if ((!(((&(reader__)))->ReadSentinel(378799144)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'MediaCodecsSupported'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvUpdateMediaCodecsSupported(std::move(aSupported));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_FOGData__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_FOGData", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__buf = IPC::ReadParam<ByteBuf>((&(reader__)));
            if (!maybe__buf) {
                FatalError("Error deserializing 'ByteBuf'");
                return MsgValueError;

            }
            auto& buf = *maybe__buf;
            // Sentinel = 'buf'
            if ((!(((&(reader__)))->ReadSentinel(41484606)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ByteBuf'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvFOGData(std::move(buf));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGPU::Msg_ReportGLStrings__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGPU", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGPUChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGPU::Msg_ReportGLStrings", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aStrings = IPC::ReadParam<GfxInfoGLStrings>((&(reader__)));
            if (!maybe__aStrings) {
                FatalError("Error deserializing 'GfxInfoGLStrings'");
                return MsgValueError;

            }
            auto& aStrings = *maybe__aStrings;
            // Sentinel = 'aStrings'
            if ((!(((&(reader__)))->ReadSentinel(242615116)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'GfxInfoGLStrings'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gfx::GPUChild*>(this))->RecvReportGLStrings(std::move(aStrings));
            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 PGPUChild::OnMessageReceived(
        const Message& msg__,
        UniquePtr<Message>& reply__) -> PGPUChild::Result
{
    if (!CanSend()) {
        return MsgDropped;

    }
    return MsgNotKnown;
}



} // namespace gfx
} // namespace mozilla
