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


#include "mozilla/layers/LayersMessageUtils.h"
#include "mozilla/layers/WebRenderMessageUtils.h"
#include "gfxipc/ShadowLayerUtils.h"
#include "mozilla/GfxMessageUtils.h"
#include "mozilla/layers/LayersMessageUtils.h"
#include "mozilla/layers/WebRenderMessageUtils.h"
#include "gfxipc/ShadowLayerUtils.h"
#include "mozilla/GfxMessageUtils.h"
#include "mozilla/layers/LayersMessageUtils.h"
#include "mozilla/layers/PTextureParent.h"
#include "mozilla/layers/PTextureChild.h"
#include "mozilla/layers/WebRenderMessages.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"


//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct RefCountedShmem|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::RefCountedShmem>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, std::move((aVar).buffer()));
    // Sentinel = 'buffer'
    (aWriter)->WriteSentinel(144769659);
}

auto ParamTraits<::mozilla::layers::RefCountedShmem>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___buffer = IPC::ReadParam<::mozilla::ipc::Shmem>(aReader);
    if (!maybe___buffer) {
        aReader->FatalError("Error deserializing 'buffer' (Shmem) member of 'RefCountedShmem'");
        return {};

    }
    auto& _buffer = *maybe___buffer;
    // Sentinel = 'buffer'
    if ((!((aReader)->ReadSentinel(144769659)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'buffer' (Shmem) member of 'RefCountedShmem'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_buffer)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpAddSharedExternalImage|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpAddSharedExternalImage>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).externalImageId());
    // Sentinel = 'externalImageId'
    (aWriter)->WriteSentinel(827852276);
    IPC::WriteParam(aWriter, (aVar).key());
    // Sentinel = 'key'
    (aWriter)->WriteSentinel(42402122);
}

auto ParamTraits<::mozilla::layers::OpAddSharedExternalImage>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___externalImageId = IPC::ReadParam<::mozilla::wr::ExternalImageId>(aReader);
    if (!maybe___externalImageId) {
        aReader->FatalError("Error deserializing 'externalImageId' (ExternalImageId) member of 'OpAddSharedExternalImage'");
        return {};

    }
    auto& _externalImageId = *maybe___externalImageId;
    // Sentinel = 'externalImageId'
    if ((!((aReader)->ReadSentinel(827852276)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'externalImageId' (ExternalImageId) member of 'OpAddSharedExternalImage'");
        return {};
    }
    auto maybe___key = IPC::ReadParam<::mozilla::wr::ImageKey>(aReader);
    if (!maybe___key) {
        aReader->FatalError("Error deserializing 'key' (ImageKey) member of 'OpAddSharedExternalImage'");
        return {};

    }
    auto& _key = *maybe___key;
    // Sentinel = 'key'
    if ((!((aReader)->ReadSentinel(42402122)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'key' (ImageKey) member of 'OpAddSharedExternalImage'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_externalImageId),
            std::move(_key)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpPushExternalImageForTexture|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpPushExternalImageForTexture>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).externalImageId());
    // Sentinel = 'externalImageId'
    (aWriter)->WriteSentinel(827852276);
    IPC::WriteParam(aWriter, (aVar).key());
    // Sentinel = 'key'
    (aWriter)->WriteSentinel(42402122);
    IPC::WriteParam(aWriter, (aVar).texture());
    // Sentinel = 'texture'
    (aWriter)->WriteSentinel(207684370);
    IPC::WriteParam(aWriter, (aVar).isUpdate());
    // Sentinel = 'isUpdate'
    (aWriter)->WriteSentinel(245564224);
}

auto ParamTraits<::mozilla::layers::OpPushExternalImageForTexture>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___externalImageId = IPC::ReadParam<::mozilla::wr::ExternalImageId>(aReader);
    if (!maybe___externalImageId) {
        aReader->FatalError("Error deserializing 'externalImageId' (ExternalImageId) member of 'OpPushExternalImageForTexture'");
        return {};

    }
    auto& _externalImageId = *maybe___externalImageId;
    // Sentinel = 'externalImageId'
    if ((!((aReader)->ReadSentinel(827852276)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'externalImageId' (ExternalImageId) member of 'OpPushExternalImageForTexture'");
        return {};
    }
    auto maybe___key = IPC::ReadParam<::mozilla::wr::ImageKey>(aReader);
    if (!maybe___key) {
        aReader->FatalError("Error deserializing 'key' (ImageKey) member of 'OpPushExternalImageForTexture'");
        return {};

    }
    auto& _key = *maybe___key;
    // Sentinel = 'key'
    if ((!((aReader)->ReadSentinel(42402122)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'key' (ImageKey) member of 'OpPushExternalImageForTexture'");
        return {};
    }
    auto maybe___texture = IPC::ReadParam<mozilla::NotNull<::mozilla::ipc::SideVariant<::mozilla::layers::PTextureParent*, ::mozilla::layers::PTextureChild*>>>(aReader);
    if (!maybe___texture) {
        aReader->FatalError("Error deserializing 'texture' (NotNull<PTexture>) member of 'OpPushExternalImageForTexture'");
        return {};

    }
    auto& _texture = *maybe___texture;
    // Sentinel = 'texture'
    if ((!((aReader)->ReadSentinel(207684370)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'texture' (NotNull<PTexture>) member of 'OpPushExternalImageForTexture'");
        return {};
    }
    auto maybe___isUpdate = IPC::ReadParam<bool>(aReader);
    if (!maybe___isUpdate) {
        aReader->FatalError("Error deserializing 'isUpdate' (bool) member of 'OpPushExternalImageForTexture'");
        return {};

    }
    auto& _isUpdate = *maybe___isUpdate;
    // Sentinel = 'isUpdate'
    if ((!((aReader)->ReadSentinel(245564224)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'isUpdate' (bool) member of 'OpPushExternalImageForTexture'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_externalImageId),
            std::move(_key),
            std::move(_texture),
            std::move(_isUpdate)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpAddCompositorAnimations|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpAddCompositorAnimations>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).data());
    // Sentinel = 'data'
    (aWriter)->WriteSentinel(67109275);
}

auto ParamTraits<::mozilla::layers::OpAddCompositorAnimations>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___data = IPC::ReadParam<::mozilla::layers::CompositorAnimations>(aReader);
    if (!maybe___data) {
        aReader->FatalError("Error deserializing 'data' (CompositorAnimations) member of 'OpAddCompositorAnimations'");
        return {};

    }
    auto& _data = *maybe___data;
    // Sentinel = 'data'
    if ((!((aReader)->ReadSentinel(67109275)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'data' (CompositorAnimations) member of 'OpAddCompositorAnimations'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_data)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpAddPipelineIdForCompositable|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpAddPipelineIdForCompositable>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).pipelineId());
    // Sentinel = 'pipelineId'
    (aWriter)->WriteSentinel(382731268);
    IPC::WriteParam(aWriter, (aVar).handle());
    // Sentinel = 'handle'
    (aWriter)->WriteSentinel(142344813);
    IPC::WriteParam(aWriter, (aVar).owner());
    // Sentinel = 'owner'
    (aWriter)->WriteSentinel(110232108);
}

auto ParamTraits<::mozilla::layers::OpAddPipelineIdForCompositable>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___pipelineId = IPC::ReadParam<::mozilla::wr::PipelineId>(aReader);
    if (!maybe___pipelineId) {
        aReader->FatalError("Error deserializing 'pipelineId' (PipelineId) member of 'OpAddPipelineIdForCompositable'");
        return {};

    }
    auto& _pipelineId = *maybe___pipelineId;
    // Sentinel = 'pipelineId'
    if ((!((aReader)->ReadSentinel(382731268)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'pipelineId' (PipelineId) member of 'OpAddPipelineIdForCompositable'");
        return {};
    }
    auto maybe___handle = IPC::ReadParam<::mozilla::layers::CompositableHandle>(aReader);
    if (!maybe___handle) {
        aReader->FatalError("Error deserializing 'handle' (CompositableHandle) member of 'OpAddPipelineIdForCompositable'");
        return {};

    }
    auto& _handle = *maybe___handle;
    // Sentinel = 'handle'
    if ((!((aReader)->ReadSentinel(142344813)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'handle' (CompositableHandle) member of 'OpAddPipelineIdForCompositable'");
        return {};
    }
    auto maybe___owner = IPC::ReadParam<::mozilla::layers::CompositableHandleOwner>(aReader);
    if (!maybe___owner) {
        aReader->FatalError("Error deserializing 'owner' (CompositableHandleOwner) member of 'OpAddPipelineIdForCompositable'");
        return {};

    }
    auto& _owner = *maybe___owner;
    // Sentinel = 'owner'
    if ((!((aReader)->ReadSentinel(110232108)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'owner' (CompositableHandleOwner) member of 'OpAddPipelineIdForCompositable'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_pipelineId),
            std::move(_handle),
            std::move(_owner)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpRemovePipelineIdForCompositable|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpRemovePipelineIdForCompositable>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).pipelineId());
    // Sentinel = 'pipelineId'
    (aWriter)->WriteSentinel(382731268);
}

auto ParamTraits<::mozilla::layers::OpRemovePipelineIdForCompositable>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___pipelineId = IPC::ReadParam<::mozilla::wr::PipelineId>(aReader);
    if (!maybe___pipelineId) {
        aReader->FatalError("Error deserializing 'pipelineId' (PipelineId) member of 'OpRemovePipelineIdForCompositable'");
        return {};

    }
    auto& _pipelineId = *maybe___pipelineId;
    // Sentinel = 'pipelineId'
    if ((!((aReader)->ReadSentinel(382731268)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'pipelineId' (PipelineId) member of 'OpRemovePipelineIdForCompositable'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_pipelineId)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpReleaseTextureOfImage|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpReleaseTextureOfImage>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).key());
    // Sentinel = 'key'
    (aWriter)->WriteSentinel(42402122);
}

auto ParamTraits<::mozilla::layers::OpReleaseTextureOfImage>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___key = IPC::ReadParam<::mozilla::wr::ImageKey>(aReader);
    if (!maybe___key) {
        aReader->FatalError("Error deserializing 'key' (ImageKey) member of 'OpReleaseTextureOfImage'");
        return {};

    }
    auto& _key = *maybe___key;
    // Sentinel = 'key'
    if ((!((aReader)->ReadSentinel(42402122)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'key' (ImageKey) member of 'OpReleaseTextureOfImage'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_key)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpUpdateAsyncImagePipeline|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpUpdateAsyncImagePipeline>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).pipelineId());
    // Sentinel = 'pipelineId'
    (aWriter)->WriteSentinel(382731268);
    IPC::WriteParam(aWriter, (aVar).scBounds());
    // Sentinel = 'scBounds'
    (aWriter)->WriteSentinel(241500994);
    IPC::WriteParam(aWriter, (aVar).rotation());
    // Sentinel = 'rotation'
    (aWriter)->WriteSentinel(261423985);
    IPC::WriteParam(aWriter, (aVar).filter());
    // Sentinel = 'filter'
    (aWriter)->WriteSentinel(146735751);
    IPC::WriteParam(aWriter, (aVar).mixBlendMode());
    // Sentinel = 'mixBlendMode'
    (aWriter)->WriteSentinel(520488121);
}

auto ParamTraits<::mozilla::layers::OpUpdateAsyncImagePipeline>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___pipelineId = IPC::ReadParam<::mozilla::wr::PipelineId>(aReader);
    if (!maybe___pipelineId) {
        aReader->FatalError("Error deserializing 'pipelineId' (PipelineId) member of 'OpUpdateAsyncImagePipeline'");
        return {};

    }
    auto& _pipelineId = *maybe___pipelineId;
    // Sentinel = 'pipelineId'
    if ((!((aReader)->ReadSentinel(382731268)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'pipelineId' (PipelineId) member of 'OpUpdateAsyncImagePipeline'");
        return {};
    }
    auto maybe___scBounds = IPC::ReadParam<::mozilla::LayoutDeviceRect>(aReader);
    if (!maybe___scBounds) {
        aReader->FatalError("Error deserializing 'scBounds' (LayoutDeviceRect) member of 'OpUpdateAsyncImagePipeline'");
        return {};

    }
    auto& _scBounds = *maybe___scBounds;
    // Sentinel = 'scBounds'
    if ((!((aReader)->ReadSentinel(241500994)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'scBounds' (LayoutDeviceRect) member of 'OpUpdateAsyncImagePipeline'");
        return {};
    }
    auto maybe___rotation = IPC::ReadParam<::mozilla::wr::WrRotation>(aReader);
    if (!maybe___rotation) {
        aReader->FatalError("Error deserializing 'rotation' (WrRotation) member of 'OpUpdateAsyncImagePipeline'");
        return {};

    }
    auto& _rotation = *maybe___rotation;
    // Sentinel = 'rotation'
    if ((!((aReader)->ReadSentinel(261423985)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'rotation' (WrRotation) member of 'OpUpdateAsyncImagePipeline'");
        return {};
    }
    auto maybe___filter = IPC::ReadParam<::mozilla::wr::ImageRendering>(aReader);
    if (!maybe___filter) {
        aReader->FatalError("Error deserializing 'filter' (ImageRendering) member of 'OpUpdateAsyncImagePipeline'");
        return {};

    }
    auto& _filter = *maybe___filter;
    // Sentinel = 'filter'
    if ((!((aReader)->ReadSentinel(146735751)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'filter' (ImageRendering) member of 'OpUpdateAsyncImagePipeline'");
        return {};
    }
    auto maybe___mixBlendMode = IPC::ReadParam<::mozilla::wr::MixBlendMode>(aReader);
    if (!maybe___mixBlendMode) {
        aReader->FatalError("Error deserializing 'mixBlendMode' (MixBlendMode) member of 'OpUpdateAsyncImagePipeline'");
        return {};

    }
    auto& _mixBlendMode = *maybe___mixBlendMode;
    // Sentinel = 'mixBlendMode'
    if ((!((aReader)->ReadSentinel(520488121)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'mixBlendMode' (MixBlendMode) member of 'OpUpdateAsyncImagePipeline'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_pipelineId),
            std::move(_scBounds),
            std::move(_rotation),
            std::move(_filter),
            std::move(_mixBlendMode)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpUpdatedAsyncImagePipeline|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpUpdatedAsyncImagePipeline>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).pipelineId());
    // Sentinel = 'pipelineId'
    (aWriter)->WriteSentinel(382731268);
}

auto ParamTraits<::mozilla::layers::OpUpdatedAsyncImagePipeline>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___pipelineId = IPC::ReadParam<::mozilla::wr::PipelineId>(aReader);
    if (!maybe___pipelineId) {
        aReader->FatalError("Error deserializing 'pipelineId' (PipelineId) member of 'OpUpdatedAsyncImagePipeline'");
        return {};

    }
    auto& _pipelineId = *maybe___pipelineId;
    // Sentinel = 'pipelineId'
    if ((!((aReader)->ReadSentinel(382731268)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'pipelineId' (PipelineId) member of 'OpUpdatedAsyncImagePipeline'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_pipelineId)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union WebRenderParentCommand|
//
namespace mozilla {
namespace layers {
auto WebRenderParentCommand::MaybeDestroy() -> void
{
    if ((mType) == (T__None)) {
        return;
    }
    switch (mType) {
    case TOpAddPipelineIdForCompositable:
        {
            (ptr_OpAddPipelineIdForCompositable())->~OpAddPipelineIdForCompositable__tdef();
            break;
        }
    case TOpRemovePipelineIdForCompositable:
        {
            (ptr_OpRemovePipelineIdForCompositable())->~OpRemovePipelineIdForCompositable__tdef();
            break;
        }
    case TOpReleaseTextureOfImage:
        {
            (ptr_OpReleaseTextureOfImage())->~OpReleaseTextureOfImage__tdef();
            break;
        }
    case TOpUpdateAsyncImagePipeline:
        {
            (ptr_OpUpdateAsyncImagePipeline())->~OpUpdateAsyncImagePipeline__tdef();
            break;
        }
    case TOpUpdatedAsyncImagePipeline:
        {
            (ptr_OpUpdatedAsyncImagePipeline())->~OpUpdatedAsyncImagePipeline__tdef();
            break;
        }
    case TCompositableOperation:
        {
            (ptr_CompositableOperation())->~CompositableOperation__tdef();
            break;
        }
    case TOpAddCompositorAnimations:
        {
            (ptr_OpAddCompositorAnimations())->~OpAddCompositorAnimations__tdef();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("not reached");
            break;
        }
    }
}

MOZ_IMPLICIT WebRenderParentCommand::WebRenderParentCommand(const OpAddPipelineIdForCompositable& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddPipelineIdForCompositable()) OpAddPipelineIdForCompositable(aOther);
    mType = TOpAddPipelineIdForCompositable;
}

MOZ_IMPLICIT WebRenderParentCommand::WebRenderParentCommand(OpAddPipelineIdForCompositable&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddPipelineIdForCompositable()) OpAddPipelineIdForCompositable(std::move(aOther));
    mType = TOpAddPipelineIdForCompositable;
}

MOZ_IMPLICIT WebRenderParentCommand::WebRenderParentCommand(const OpRemovePipelineIdForCompositable& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpRemovePipelineIdForCompositable()) OpRemovePipelineIdForCompositable(aOther);
    mType = TOpRemovePipelineIdForCompositable;
}

MOZ_IMPLICIT WebRenderParentCommand::WebRenderParentCommand(OpRemovePipelineIdForCompositable&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpRemovePipelineIdForCompositable()) OpRemovePipelineIdForCompositable(std::move(aOther));
    mType = TOpRemovePipelineIdForCompositable;
}

MOZ_IMPLICIT WebRenderParentCommand::WebRenderParentCommand(const OpReleaseTextureOfImage& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpReleaseTextureOfImage()) OpReleaseTextureOfImage(aOther);
    mType = TOpReleaseTextureOfImage;
}

MOZ_IMPLICIT WebRenderParentCommand::WebRenderParentCommand(OpReleaseTextureOfImage&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpReleaseTextureOfImage()) OpReleaseTextureOfImage(std::move(aOther));
    mType = TOpReleaseTextureOfImage;
}

MOZ_IMPLICIT WebRenderParentCommand::WebRenderParentCommand(const OpUpdateAsyncImagePipeline& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpUpdateAsyncImagePipeline()) OpUpdateAsyncImagePipeline(aOther);
    mType = TOpUpdateAsyncImagePipeline;
}

MOZ_IMPLICIT WebRenderParentCommand::WebRenderParentCommand(OpUpdateAsyncImagePipeline&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpUpdateAsyncImagePipeline()) OpUpdateAsyncImagePipeline(std::move(aOther));
    mType = TOpUpdateAsyncImagePipeline;
}

MOZ_IMPLICIT WebRenderParentCommand::WebRenderParentCommand(const OpUpdatedAsyncImagePipeline& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpUpdatedAsyncImagePipeline()) OpUpdatedAsyncImagePipeline(aOther);
    mType = TOpUpdatedAsyncImagePipeline;
}

MOZ_IMPLICIT WebRenderParentCommand::WebRenderParentCommand(OpUpdatedAsyncImagePipeline&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpUpdatedAsyncImagePipeline()) OpUpdatedAsyncImagePipeline(std::move(aOther));
    mType = TOpUpdatedAsyncImagePipeline;
}

MOZ_IMPLICIT WebRenderParentCommand::WebRenderParentCommand(const CompositableOperation& aOther)
{
    new (mozilla::KnownNotNull, ptr_CompositableOperation()) CompositableOperation(aOther);
    mType = TCompositableOperation;
}

MOZ_IMPLICIT WebRenderParentCommand::WebRenderParentCommand(CompositableOperation&& aOther)
{
    new (mozilla::KnownNotNull, ptr_CompositableOperation()) CompositableOperation(std::move(aOther));
    mType = TCompositableOperation;
}

MOZ_IMPLICIT WebRenderParentCommand::WebRenderParentCommand(const OpAddCompositorAnimations& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddCompositorAnimations()) OpAddCompositorAnimations(aOther);
    mType = TOpAddCompositorAnimations;
}

MOZ_IMPLICIT WebRenderParentCommand::WebRenderParentCommand(OpAddCompositorAnimations&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddCompositorAnimations()) OpAddCompositorAnimations(std::move(aOther));
    mType = TOpAddCompositorAnimations;
}

MOZ_IMPLICIT WebRenderParentCommand::WebRenderParentCommand(const WebRenderParentCommand& aOther)
{
    (aOther).AssertSanity();
    switch ((aOther).type()) {
    case TOpAddPipelineIdForCompositable:
        {
            new (mozilla::KnownNotNull, ptr_OpAddPipelineIdForCompositable()) OpAddPipelineIdForCompositable((aOther).get_OpAddPipelineIdForCompositable());
            break;
        }
    case TOpRemovePipelineIdForCompositable:
        {
            new (mozilla::KnownNotNull, ptr_OpRemovePipelineIdForCompositable()) OpRemovePipelineIdForCompositable((aOther).get_OpRemovePipelineIdForCompositable());
            break;
        }
    case TOpReleaseTextureOfImage:
        {
            new (mozilla::KnownNotNull, ptr_OpReleaseTextureOfImage()) OpReleaseTextureOfImage((aOther).get_OpReleaseTextureOfImage());
            break;
        }
    case TOpUpdateAsyncImagePipeline:
        {
            new (mozilla::KnownNotNull, ptr_OpUpdateAsyncImagePipeline()) OpUpdateAsyncImagePipeline((aOther).get_OpUpdateAsyncImagePipeline());
            break;
        }
    case TOpUpdatedAsyncImagePipeline:
        {
            new (mozilla::KnownNotNull, ptr_OpUpdatedAsyncImagePipeline()) OpUpdatedAsyncImagePipeline((aOther).get_OpUpdatedAsyncImagePipeline());
            break;
        }
    case TCompositableOperation:
        {
            new (mozilla::KnownNotNull, ptr_CompositableOperation()) CompositableOperation((aOther).get_CompositableOperation());
            break;
        }
    case TOpAddCompositorAnimations:
        {
            new (mozilla::KnownNotNull, ptr_OpAddCompositorAnimations()) OpAddCompositorAnimations((aOther).get_OpAddCompositorAnimations());
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    mType = (aOther).type();
}

MOZ_IMPLICIT WebRenderParentCommand::WebRenderParentCommand(WebRenderParentCommand&& aOther)
{
    (aOther).AssertSanity();
    Type t = (aOther).type();
    switch (t) {
    case TOpAddPipelineIdForCompositable:
        {
            new (mozilla::KnownNotNull, ptr_OpAddPipelineIdForCompositable()) OpAddPipelineIdForCompositable(std::move((aOther).get_OpAddPipelineIdForCompositable()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpRemovePipelineIdForCompositable:
        {
            new (mozilla::KnownNotNull, ptr_OpRemovePipelineIdForCompositable()) OpRemovePipelineIdForCompositable(std::move((aOther).get_OpRemovePipelineIdForCompositable()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpReleaseTextureOfImage:
        {
            new (mozilla::KnownNotNull, ptr_OpReleaseTextureOfImage()) OpReleaseTextureOfImage(std::move((aOther).get_OpReleaseTextureOfImage()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpUpdateAsyncImagePipeline:
        {
            new (mozilla::KnownNotNull, ptr_OpUpdateAsyncImagePipeline()) OpUpdateAsyncImagePipeline(std::move((aOther).get_OpUpdateAsyncImagePipeline()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpUpdatedAsyncImagePipeline:
        {
            new (mozilla::KnownNotNull, ptr_OpUpdatedAsyncImagePipeline()) OpUpdatedAsyncImagePipeline(std::move((aOther).get_OpUpdatedAsyncImagePipeline()));
            (aOther).MaybeDestroy();
            break;
        }
    case TCompositableOperation:
        {
            new (mozilla::KnownNotNull, ptr_CompositableOperation()) CompositableOperation(std::move((aOther).get_CompositableOperation()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpAddCompositorAnimations:
        {
            new (mozilla::KnownNotNull, ptr_OpAddCompositorAnimations()) OpAddCompositorAnimations(std::move((aOther).get_OpAddCompositorAnimations()));
            (aOther).MaybeDestroy();
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    (aOther).mType = T__None;
    mType = t;
}

WebRenderParentCommand::~WebRenderParentCommand()
{
    MaybeDestroy();
}

auto WebRenderParentCommand::operator=(const OpAddPipelineIdForCompositable& aRhs) -> WebRenderParentCommand&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddPipelineIdForCompositable()) OpAddPipelineIdForCompositable(aRhs);
    mType = TOpAddPipelineIdForCompositable;
    return (*(this));
}

auto WebRenderParentCommand::operator=(OpAddPipelineIdForCompositable&& aRhs) -> WebRenderParentCommand&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddPipelineIdForCompositable()) OpAddPipelineIdForCompositable(std::move(aRhs));
    mType = TOpAddPipelineIdForCompositable;
    return (*(this));
}

auto WebRenderParentCommand::operator=(const OpRemovePipelineIdForCompositable& aRhs) -> WebRenderParentCommand&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpRemovePipelineIdForCompositable()) OpRemovePipelineIdForCompositable(aRhs);
    mType = TOpRemovePipelineIdForCompositable;
    return (*(this));
}

auto WebRenderParentCommand::operator=(OpRemovePipelineIdForCompositable&& aRhs) -> WebRenderParentCommand&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpRemovePipelineIdForCompositable()) OpRemovePipelineIdForCompositable(std::move(aRhs));
    mType = TOpRemovePipelineIdForCompositable;
    return (*(this));
}

auto WebRenderParentCommand::operator=(const OpReleaseTextureOfImage& aRhs) -> WebRenderParentCommand&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpReleaseTextureOfImage()) OpReleaseTextureOfImage(aRhs);
    mType = TOpReleaseTextureOfImage;
    return (*(this));
}

auto WebRenderParentCommand::operator=(OpReleaseTextureOfImage&& aRhs) -> WebRenderParentCommand&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpReleaseTextureOfImage()) OpReleaseTextureOfImage(std::move(aRhs));
    mType = TOpReleaseTextureOfImage;
    return (*(this));
}

auto WebRenderParentCommand::operator=(const OpUpdateAsyncImagePipeline& aRhs) -> WebRenderParentCommand&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpUpdateAsyncImagePipeline()) OpUpdateAsyncImagePipeline(aRhs);
    mType = TOpUpdateAsyncImagePipeline;
    return (*(this));
}

auto WebRenderParentCommand::operator=(OpUpdateAsyncImagePipeline&& aRhs) -> WebRenderParentCommand&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpUpdateAsyncImagePipeline()) OpUpdateAsyncImagePipeline(std::move(aRhs));
    mType = TOpUpdateAsyncImagePipeline;
    return (*(this));
}

auto WebRenderParentCommand::operator=(const OpUpdatedAsyncImagePipeline& aRhs) -> WebRenderParentCommand&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpUpdatedAsyncImagePipeline()) OpUpdatedAsyncImagePipeline(aRhs);
    mType = TOpUpdatedAsyncImagePipeline;
    return (*(this));
}

auto WebRenderParentCommand::operator=(OpUpdatedAsyncImagePipeline&& aRhs) -> WebRenderParentCommand&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpUpdatedAsyncImagePipeline()) OpUpdatedAsyncImagePipeline(std::move(aRhs));
    mType = TOpUpdatedAsyncImagePipeline;
    return (*(this));
}

auto WebRenderParentCommand::operator=(const CompositableOperation& aRhs) -> WebRenderParentCommand&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_CompositableOperation()) CompositableOperation(aRhs);
    mType = TCompositableOperation;
    return (*(this));
}

auto WebRenderParentCommand::operator=(CompositableOperation&& aRhs) -> WebRenderParentCommand&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_CompositableOperation()) CompositableOperation(std::move(aRhs));
    mType = TCompositableOperation;
    return (*(this));
}

auto WebRenderParentCommand::operator=(const OpAddCompositorAnimations& aRhs) -> WebRenderParentCommand&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddCompositorAnimations()) OpAddCompositorAnimations(aRhs);
    mType = TOpAddCompositorAnimations;
    return (*(this));
}

auto WebRenderParentCommand::operator=(OpAddCompositorAnimations&& aRhs) -> WebRenderParentCommand&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddCompositorAnimations()) OpAddCompositorAnimations(std::move(aRhs));
    mType = TOpAddCompositorAnimations;
    return (*(this));
}

auto WebRenderParentCommand::operator=(const WebRenderParentCommand& aRhs) -> WebRenderParentCommand&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TOpAddPipelineIdForCompositable:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddPipelineIdForCompositable()) OpAddPipelineIdForCompositable((aRhs).get_OpAddPipelineIdForCompositable());
            break;
        }
    case TOpRemovePipelineIdForCompositable:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpRemovePipelineIdForCompositable()) OpRemovePipelineIdForCompositable((aRhs).get_OpRemovePipelineIdForCompositable());
            break;
        }
    case TOpReleaseTextureOfImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpReleaseTextureOfImage()) OpReleaseTextureOfImage((aRhs).get_OpReleaseTextureOfImage());
            break;
        }
    case TOpUpdateAsyncImagePipeline:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpUpdateAsyncImagePipeline()) OpUpdateAsyncImagePipeline((aRhs).get_OpUpdateAsyncImagePipeline());
            break;
        }
    case TOpUpdatedAsyncImagePipeline:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpUpdatedAsyncImagePipeline()) OpUpdatedAsyncImagePipeline((aRhs).get_OpUpdatedAsyncImagePipeline());
            break;
        }
    case TCompositableOperation:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_CompositableOperation()) CompositableOperation((aRhs).get_CompositableOperation());
            break;
        }
    case TOpAddCompositorAnimations:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddCompositorAnimations()) OpAddCompositorAnimations((aRhs).get_OpAddCompositorAnimations());
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    mType = t;
    return (*(this));
}

auto WebRenderParentCommand::operator=(WebRenderParentCommand&& aRhs) -> WebRenderParentCommand&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TOpAddPipelineIdForCompositable:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddPipelineIdForCompositable()) OpAddPipelineIdForCompositable(std::move((aRhs).get_OpAddPipelineIdForCompositable()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpRemovePipelineIdForCompositable:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpRemovePipelineIdForCompositable()) OpRemovePipelineIdForCompositable(std::move((aRhs).get_OpRemovePipelineIdForCompositable()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpReleaseTextureOfImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpReleaseTextureOfImage()) OpReleaseTextureOfImage(std::move((aRhs).get_OpReleaseTextureOfImage()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpUpdateAsyncImagePipeline:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpUpdateAsyncImagePipeline()) OpUpdateAsyncImagePipeline(std::move((aRhs).get_OpUpdateAsyncImagePipeline()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpUpdatedAsyncImagePipeline:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpUpdatedAsyncImagePipeline()) OpUpdatedAsyncImagePipeline(std::move((aRhs).get_OpUpdatedAsyncImagePipeline()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TCompositableOperation:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_CompositableOperation()) CompositableOperation(std::move((aRhs).get_CompositableOperation()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpAddCompositorAnimations:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddCompositorAnimations()) OpAddCompositorAnimations(std::move((aRhs).get_OpAddCompositorAnimations()));
            (aRhs).MaybeDestroy();
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    (aRhs).mType = T__None;
    mType = t;
    return (*(this));
}

} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::WebRenderParentCommand>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    typedef ::mozilla::layers::WebRenderParentCommand union__;
    int type = (aVar).type();
    IPC::WriteParam(aWriter, type);
    // Sentinel = 'WebRenderParentCommand'
    (aWriter)->WriteSentinel(1644103848);

    switch (type) {
    case union__::TOpAddPipelineIdForCompositable:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpAddPipelineIdForCompositable());
            // Sentinel = 'TOpAddPipelineIdForCompositable'
            (aWriter)->WriteSentinel(3140422665);
            return;
        }
    case union__::TOpRemovePipelineIdForCompositable:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpRemovePipelineIdForCompositable());
            // Sentinel = 'TOpRemovePipelineIdForCompositable'
            (aWriter)->WriteSentinel(3884977518);
            return;
        }
    case union__::TOpReleaseTextureOfImage:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpReleaseTextureOfImage());
            // Sentinel = 'TOpReleaseTextureOfImage'
            (aWriter)->WriteSentinel(1947076958);
            return;
        }
    case union__::TOpUpdateAsyncImagePipeline:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpUpdateAsyncImagePipeline());
            // Sentinel = 'TOpUpdateAsyncImagePipeline'
            (aWriter)->WriteSentinel(2439318158);
            return;
        }
    case union__::TOpUpdatedAsyncImagePipeline:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpUpdatedAsyncImagePipeline());
            // Sentinel = 'TOpUpdatedAsyncImagePipeline'
            (aWriter)->WriteSentinel(2621967090);
            return;
        }
    case union__::TCompositableOperation:
        {
            IPC::WriteParam(aWriter, (aVar).get_CompositableOperation());
            // Sentinel = 'TCompositableOperation'
            (aWriter)->WriteSentinel(1686833384);
            return;
        }
    case union__::TOpAddCompositorAnimations:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpAddCompositorAnimations());
            // Sentinel = 'TOpAddCompositorAnimations'
            (aWriter)->WriteSentinel(2263681631);
            return;
        }
    default:
        {
            aWriter->FatalError("unknown variant of union WebRenderParentCommand");
            return;
        }
    }
}

auto ParamTraits<::mozilla::layers::WebRenderParentCommand>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    typedef ::mozilla::layers::WebRenderParentCommand union__;
    auto maybe__type = IPC::ReadParam<int>(aReader);
    if (!maybe__type) {
        aReader->FatalError("Error deserializing type of union WebRenderParentCommand");
        return {};

    }
    auto& type = *maybe__type;
    // Sentinel = 'WebRenderParentCommand'
    if ((!((aReader)->ReadSentinel(1644103848)))) {
        mozilla::ipc::SentinelReadError("Error deserializing type of union WebRenderParentCommand");
        return {};
    }

    switch (type) {
    case union__::TOpAddPipelineIdForCompositable:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpAddPipelineIdForCompositable>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpAddPipelineIdForCompositable of union WebRenderParentCommand");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpAddPipelineIdForCompositable'
            if ((!((aReader)->ReadSentinel(3140422665)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpAddPipelineIdForCompositable of union WebRenderParentCommand");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpRemovePipelineIdForCompositable:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpRemovePipelineIdForCompositable>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpRemovePipelineIdForCompositable of union WebRenderParentCommand");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpRemovePipelineIdForCompositable'
            if ((!((aReader)->ReadSentinel(3884977518)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpRemovePipelineIdForCompositable of union WebRenderParentCommand");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpReleaseTextureOfImage:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpReleaseTextureOfImage>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpReleaseTextureOfImage of union WebRenderParentCommand");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpReleaseTextureOfImage'
            if ((!((aReader)->ReadSentinel(1947076958)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpReleaseTextureOfImage of union WebRenderParentCommand");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpUpdateAsyncImagePipeline:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpUpdateAsyncImagePipeline>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpUpdateAsyncImagePipeline of union WebRenderParentCommand");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpUpdateAsyncImagePipeline'
            if ((!((aReader)->ReadSentinel(2439318158)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpUpdateAsyncImagePipeline of union WebRenderParentCommand");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpUpdatedAsyncImagePipeline:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpUpdatedAsyncImagePipeline>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpUpdatedAsyncImagePipeline of union WebRenderParentCommand");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpUpdatedAsyncImagePipeline'
            if ((!((aReader)->ReadSentinel(2621967090)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpUpdatedAsyncImagePipeline of union WebRenderParentCommand");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TCompositableOperation:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::CompositableOperation>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TCompositableOperation of union WebRenderParentCommand");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TCompositableOperation'
            if ((!((aReader)->ReadSentinel(1686833384)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TCompositableOperation of union WebRenderParentCommand");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpAddCompositorAnimations:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpAddCompositorAnimations>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpAddCompositorAnimations of union WebRenderParentCommand");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpAddCompositorAnimations'
            if ((!((aReader)->ReadSentinel(2263681631)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpAddCompositorAnimations of union WebRenderParentCommand");
                return {};
            }
            return std::move(tmp);
        }
    default:
        {
            aReader->FatalError("unknown variant of union WebRenderParentCommand");
            return {};
        }
    }
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OffsetRange|
//
namespace mozilla {
namespace layers {
auto OffsetRange::StaticAssertions() const -> void
{
    static_assert(
        (offsetof(OffsetRange, length_) - offsetof(OffsetRange, source_)) == 8,
        "Bad assumptions about field layout!");
}

} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OffsetRange>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    (aWriter)->WriteBytes((&((aVar).source())), 12);
    // Sentinel = 'source | start | length'
    (aWriter)->WriteSentinel(1768949946);
}

auto ParamTraits<::mozilla::layers::OffsetRange>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    IPC::ReadResult<paramType> result__{
            std::in_place,
            ::uint32_t{0},
            ::uint32_t{0},
            ::uint32_t{0}};
    if ((!((aReader)->ReadBytesInto((&((result__)->source())), 12)))) {
        aReader->FatalError("Error bulk reading fields from uint32_t");
        return {};
    }
    // Sentinel = 'source | start | length'
    if ((!((aReader)->ReadSentinel(1768949946)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint32_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpAddImage|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpAddImage>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).descriptor());
    // Sentinel = 'descriptor'
    (aWriter)->WriteSentinel(384894016);
    IPC::WriteParam(aWriter, (aVar).bytes());
    // Sentinel = 'bytes'
    (aWriter)->WriteSentinel(107741736);
    IPC::WriteParam(aWriter, (aVar).key());
    // Sentinel = 'key'
    (aWriter)->WriteSentinel(42402122);
    (aWriter)->WriteBytes((&((aVar).tiling())), 2);
    // Sentinel = 'tiling'
    (aWriter)->WriteSentinel(150536840);
}

auto ParamTraits<::mozilla::layers::OpAddImage>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___descriptor = IPC::ReadParam<::mozilla::wr::ImageDescriptor>(aReader);
    if (!maybe___descriptor) {
        aReader->FatalError("Error deserializing 'descriptor' (ImageDescriptor) member of 'OpAddImage'");
        return {};

    }
    auto& _descriptor = *maybe___descriptor;
    // Sentinel = 'descriptor'
    if ((!((aReader)->ReadSentinel(384894016)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'descriptor' (ImageDescriptor) member of 'OpAddImage'");
        return {};
    }
    auto maybe___bytes = IPC::ReadParam<::mozilla::layers::OffsetRange>(aReader);
    if (!maybe___bytes) {
        aReader->FatalError("Error deserializing 'bytes' (OffsetRange) member of 'OpAddImage'");
        return {};

    }
    auto& _bytes = *maybe___bytes;
    // Sentinel = 'bytes'
    if ((!((aReader)->ReadSentinel(107741736)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'bytes' (OffsetRange) member of 'OpAddImage'");
        return {};
    }
    auto maybe___key = IPC::ReadParam<::mozilla::wr::ImageKey>(aReader);
    if (!maybe___key) {
        aReader->FatalError("Error deserializing 'key' (ImageKey) member of 'OpAddImage'");
        return {};

    }
    auto& _key = *maybe___key;
    // Sentinel = 'key'
    if ((!((aReader)->ReadSentinel(42402122)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'key' (ImageKey) member of 'OpAddImage'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_descriptor),
            std::move(_bytes),
            ::uint16_t{0},
            std::move(_key)};
    if ((!((aReader)->ReadBytesInto((&((result__)->tiling())), 2)))) {
        aReader->FatalError("Error bulk reading fields from uint16_t");
        return {};
    }
    // Sentinel = 'tiling'
    if ((!((aReader)->ReadSentinel(150536840)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint16_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpAddBlobImage|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpAddBlobImage>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).descriptor());
    // Sentinel = 'descriptor'
    (aWriter)->WriteSentinel(384894016);
    IPC::WriteParam(aWriter, (aVar).bytes());
    // Sentinel = 'bytes'
    (aWriter)->WriteSentinel(107741736);
    IPC::WriteParam(aWriter, (aVar).visibleRect());
    // Sentinel = 'visibleRect'
    (aWriter)->WriteSentinel(459932797);
    IPC::WriteParam(aWriter, (aVar).key());
    // Sentinel = 'key'
    (aWriter)->WriteSentinel(42402122);
    (aWriter)->WriteBytes((&((aVar).tiling())), 2);
    // Sentinel = 'tiling'
    (aWriter)->WriteSentinel(150536840);
}

auto ParamTraits<::mozilla::layers::OpAddBlobImage>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___descriptor = IPC::ReadParam<::mozilla::wr::ImageDescriptor>(aReader);
    if (!maybe___descriptor) {
        aReader->FatalError("Error deserializing 'descriptor' (ImageDescriptor) member of 'OpAddBlobImage'");
        return {};

    }
    auto& _descriptor = *maybe___descriptor;
    // Sentinel = 'descriptor'
    if ((!((aReader)->ReadSentinel(384894016)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'descriptor' (ImageDescriptor) member of 'OpAddBlobImage'");
        return {};
    }
    auto maybe___bytes = IPC::ReadParam<::mozilla::layers::OffsetRange>(aReader);
    if (!maybe___bytes) {
        aReader->FatalError("Error deserializing 'bytes' (OffsetRange) member of 'OpAddBlobImage'");
        return {};

    }
    auto& _bytes = *maybe___bytes;
    // Sentinel = 'bytes'
    if ((!((aReader)->ReadSentinel(107741736)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'bytes' (OffsetRange) member of 'OpAddBlobImage'");
        return {};
    }
    auto maybe___visibleRect = IPC::ReadParam<::mozilla::ImageIntRect>(aReader);
    if (!maybe___visibleRect) {
        aReader->FatalError("Error deserializing 'visibleRect' (ImageIntRect) member of 'OpAddBlobImage'");
        return {};

    }
    auto& _visibleRect = *maybe___visibleRect;
    // Sentinel = 'visibleRect'
    if ((!((aReader)->ReadSentinel(459932797)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'visibleRect' (ImageIntRect) member of 'OpAddBlobImage'");
        return {};
    }
    auto maybe___key = IPC::ReadParam<::mozilla::wr::BlobImageKey>(aReader);
    if (!maybe___key) {
        aReader->FatalError("Error deserializing 'key' (BlobImageKey) member of 'OpAddBlobImage'");
        return {};

    }
    auto& _key = *maybe___key;
    // Sentinel = 'key'
    if ((!((aReader)->ReadSentinel(42402122)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'key' (BlobImageKey) member of 'OpAddBlobImage'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_descriptor),
            std::move(_bytes),
            std::move(_visibleRect),
            ::uint16_t{0},
            std::move(_key)};
    if ((!((aReader)->ReadBytesInto((&((result__)->tiling())), 2)))) {
        aReader->FatalError("Error bulk reading fields from uint16_t");
        return {};
    }
    // Sentinel = 'tiling'
    if ((!((aReader)->ReadSentinel(150536840)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint16_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpAddSnapshotImage|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpAddSnapshotImage>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).key());
    // Sentinel = 'key'
    (aWriter)->WriteSentinel(42402122);
}

auto ParamTraits<::mozilla::layers::OpAddSnapshotImage>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___key = IPC::ReadParam<::mozilla::wr::SnapshotImageKey>(aReader);
    if (!maybe___key) {
        aReader->FatalError("Error deserializing 'key' (SnapshotImageKey) member of 'OpAddSnapshotImage'");
        return {};

    }
    auto& _key = *maybe___key;
    // Sentinel = 'key'
    if ((!((aReader)->ReadSentinel(42402122)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'key' (SnapshotImageKey) member of 'OpAddSnapshotImage'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_key)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpUpdateImage|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpUpdateImage>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).descriptor());
    // Sentinel = 'descriptor'
    (aWriter)->WriteSentinel(384894016);
    IPC::WriteParam(aWriter, (aVar).bytes());
    // Sentinel = 'bytes'
    (aWriter)->WriteSentinel(107741736);
    IPC::WriteParam(aWriter, (aVar).key());
    // Sentinel = 'key'
    (aWriter)->WriteSentinel(42402122);
}

auto ParamTraits<::mozilla::layers::OpUpdateImage>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___descriptor = IPC::ReadParam<::mozilla::wr::ImageDescriptor>(aReader);
    if (!maybe___descriptor) {
        aReader->FatalError("Error deserializing 'descriptor' (ImageDescriptor) member of 'OpUpdateImage'");
        return {};

    }
    auto& _descriptor = *maybe___descriptor;
    // Sentinel = 'descriptor'
    if ((!((aReader)->ReadSentinel(384894016)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'descriptor' (ImageDescriptor) member of 'OpUpdateImage'");
        return {};
    }
    auto maybe___bytes = IPC::ReadParam<::mozilla::layers::OffsetRange>(aReader);
    if (!maybe___bytes) {
        aReader->FatalError("Error deserializing 'bytes' (OffsetRange) member of 'OpUpdateImage'");
        return {};

    }
    auto& _bytes = *maybe___bytes;
    // Sentinel = 'bytes'
    if ((!((aReader)->ReadSentinel(107741736)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'bytes' (OffsetRange) member of 'OpUpdateImage'");
        return {};
    }
    auto maybe___key = IPC::ReadParam<::mozilla::wr::ImageKey>(aReader);
    if (!maybe___key) {
        aReader->FatalError("Error deserializing 'key' (ImageKey) member of 'OpUpdateImage'");
        return {};

    }
    auto& _key = *maybe___key;
    // Sentinel = 'key'
    if ((!((aReader)->ReadSentinel(42402122)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'key' (ImageKey) member of 'OpUpdateImage'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_descriptor),
            std::move(_bytes),
            std::move(_key)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpUpdateBlobImage|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpUpdateBlobImage>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).descriptor());
    // Sentinel = 'descriptor'
    (aWriter)->WriteSentinel(384894016);
    IPC::WriteParam(aWriter, (aVar).bytes());
    // Sentinel = 'bytes'
    (aWriter)->WriteSentinel(107741736);
    IPC::WriteParam(aWriter, (aVar).key());
    // Sentinel = 'key'
    (aWriter)->WriteSentinel(42402122);
    IPC::WriteParam(aWriter, (aVar).visibleRect());
    // Sentinel = 'visibleRect'
    (aWriter)->WriteSentinel(459932797);
    IPC::WriteParam(aWriter, (aVar).dirtyRect());
    // Sentinel = 'dirtyRect'
    (aWriter)->WriteSentinel(314115003);
}

auto ParamTraits<::mozilla::layers::OpUpdateBlobImage>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___descriptor = IPC::ReadParam<::mozilla::wr::ImageDescriptor>(aReader);
    if (!maybe___descriptor) {
        aReader->FatalError("Error deserializing 'descriptor' (ImageDescriptor) member of 'OpUpdateBlobImage'");
        return {};

    }
    auto& _descriptor = *maybe___descriptor;
    // Sentinel = 'descriptor'
    if ((!((aReader)->ReadSentinel(384894016)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'descriptor' (ImageDescriptor) member of 'OpUpdateBlobImage'");
        return {};
    }
    auto maybe___bytes = IPC::ReadParam<::mozilla::layers::OffsetRange>(aReader);
    if (!maybe___bytes) {
        aReader->FatalError("Error deserializing 'bytes' (OffsetRange) member of 'OpUpdateBlobImage'");
        return {};

    }
    auto& _bytes = *maybe___bytes;
    // Sentinel = 'bytes'
    if ((!((aReader)->ReadSentinel(107741736)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'bytes' (OffsetRange) member of 'OpUpdateBlobImage'");
        return {};
    }
    auto maybe___key = IPC::ReadParam<::mozilla::wr::BlobImageKey>(aReader);
    if (!maybe___key) {
        aReader->FatalError("Error deserializing 'key' (BlobImageKey) member of 'OpUpdateBlobImage'");
        return {};

    }
    auto& _key = *maybe___key;
    // Sentinel = 'key'
    if ((!((aReader)->ReadSentinel(42402122)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'key' (BlobImageKey) member of 'OpUpdateBlobImage'");
        return {};
    }
    auto maybe___visibleRect = IPC::ReadParam<::mozilla::ImageIntRect>(aReader);
    if (!maybe___visibleRect) {
        aReader->FatalError("Error deserializing 'visibleRect' (ImageIntRect) member of 'OpUpdateBlobImage'");
        return {};

    }
    auto& _visibleRect = *maybe___visibleRect;
    // Sentinel = 'visibleRect'
    if ((!((aReader)->ReadSentinel(459932797)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'visibleRect' (ImageIntRect) member of 'OpUpdateBlobImage'");
        return {};
    }
    auto maybe___dirtyRect = IPC::ReadParam<::mozilla::ImageIntRect>(aReader);
    if (!maybe___dirtyRect) {
        aReader->FatalError("Error deserializing 'dirtyRect' (ImageIntRect) member of 'OpUpdateBlobImage'");
        return {};

    }
    auto& _dirtyRect = *maybe___dirtyRect;
    // Sentinel = 'dirtyRect'
    if ((!((aReader)->ReadSentinel(314115003)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'dirtyRect' (ImageIntRect) member of 'OpUpdateBlobImage'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_descriptor),
            std::move(_bytes),
            std::move(_key),
            std::move(_visibleRect),
            std::move(_dirtyRect)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpSetBlobImageVisibleArea|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpSetBlobImageVisibleArea>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).area());
    // Sentinel = 'area'
    (aWriter)->WriteSentinel(67699098);
    IPC::WriteParam(aWriter, (aVar).key());
    // Sentinel = 'key'
    (aWriter)->WriteSentinel(42402122);
}

auto ParamTraits<::mozilla::layers::OpSetBlobImageVisibleArea>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___area = IPC::ReadParam<::mozilla::ImageIntRect>(aReader);
    if (!maybe___area) {
        aReader->FatalError("Error deserializing 'area' (ImageIntRect) member of 'OpSetBlobImageVisibleArea'");
        return {};

    }
    auto& _area = *maybe___area;
    // Sentinel = 'area'
    if ((!((aReader)->ReadSentinel(67699098)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'area' (ImageIntRect) member of 'OpSetBlobImageVisibleArea'");
        return {};
    }
    auto maybe___key = IPC::ReadParam<::mozilla::wr::BlobImageKey>(aReader);
    if (!maybe___key) {
        aReader->FatalError("Error deserializing 'key' (BlobImageKey) member of 'OpSetBlobImageVisibleArea'");
        return {};

    }
    auto& _key = *maybe___key;
    // Sentinel = 'key'
    if ((!((aReader)->ReadSentinel(42402122)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'key' (BlobImageKey) member of 'OpSetBlobImageVisibleArea'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_area),
            std::move(_key)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpUpdateSharedExternalImage|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpUpdateSharedExternalImage>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).externalImageId());
    // Sentinel = 'externalImageId'
    (aWriter)->WriteSentinel(827852276);
    IPC::WriteParam(aWriter, (aVar).key());
    // Sentinel = 'key'
    (aWriter)->WriteSentinel(42402122);
    IPC::WriteParam(aWriter, (aVar).dirtyRect());
    // Sentinel = 'dirtyRect'
    (aWriter)->WriteSentinel(314115003);
}

auto ParamTraits<::mozilla::layers::OpUpdateSharedExternalImage>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___externalImageId = IPC::ReadParam<::mozilla::wr::ExternalImageId>(aReader);
    if (!maybe___externalImageId) {
        aReader->FatalError("Error deserializing 'externalImageId' (ExternalImageId) member of 'OpUpdateSharedExternalImage'");
        return {};

    }
    auto& _externalImageId = *maybe___externalImageId;
    // Sentinel = 'externalImageId'
    if ((!((aReader)->ReadSentinel(827852276)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'externalImageId' (ExternalImageId) member of 'OpUpdateSharedExternalImage'");
        return {};
    }
    auto maybe___key = IPC::ReadParam<::mozilla::wr::ImageKey>(aReader);
    if (!maybe___key) {
        aReader->FatalError("Error deserializing 'key' (ImageKey) member of 'OpUpdateSharedExternalImage'");
        return {};

    }
    auto& _key = *maybe___key;
    // Sentinel = 'key'
    if ((!((aReader)->ReadSentinel(42402122)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'key' (ImageKey) member of 'OpUpdateSharedExternalImage'");
        return {};
    }
    auto maybe___dirtyRect = IPC::ReadParam<::mozilla::ImageIntRect>(aReader);
    if (!maybe___dirtyRect) {
        aReader->FatalError("Error deserializing 'dirtyRect' (ImageIntRect) member of 'OpUpdateSharedExternalImage'");
        return {};

    }
    auto& _dirtyRect = *maybe___dirtyRect;
    // Sentinel = 'dirtyRect'
    if ((!((aReader)->ReadSentinel(314115003)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'dirtyRect' (ImageIntRect) member of 'OpUpdateSharedExternalImage'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_externalImageId),
            std::move(_key),
            std::move(_dirtyRect)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpDeleteImage|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpDeleteImage>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).key());
    // Sentinel = 'key'
    (aWriter)->WriteSentinel(42402122);
}

auto ParamTraits<::mozilla::layers::OpDeleteImage>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___key = IPC::ReadParam<::mozilla::wr::ImageKey>(aReader);
    if (!maybe___key) {
        aReader->FatalError("Error deserializing 'key' (ImageKey) member of 'OpDeleteImage'");
        return {};

    }
    auto& _key = *maybe___key;
    // Sentinel = 'key'
    if ((!((aReader)->ReadSentinel(42402122)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'key' (ImageKey) member of 'OpDeleteImage'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_key)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpDeleteSnapshotImage|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpDeleteSnapshotImage>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).key());
    // Sentinel = 'key'
    (aWriter)->WriteSentinel(42402122);
}

auto ParamTraits<::mozilla::layers::OpDeleteSnapshotImage>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___key = IPC::ReadParam<::mozilla::wr::SnapshotImageKey>(aReader);
    if (!maybe___key) {
        aReader->FatalError("Error deserializing 'key' (SnapshotImageKey) member of 'OpDeleteSnapshotImage'");
        return {};

    }
    auto& _key = *maybe___key;
    // Sentinel = 'key'
    if ((!((aReader)->ReadSentinel(42402122)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'key' (SnapshotImageKey) member of 'OpDeleteSnapshotImage'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_key)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpDeleteBlobImage|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpDeleteBlobImage>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).key());
    // Sentinel = 'key'
    (aWriter)->WriteSentinel(42402122);
}

auto ParamTraits<::mozilla::layers::OpDeleteBlobImage>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___key = IPC::ReadParam<::mozilla::wr::BlobImageKey>(aReader);
    if (!maybe___key) {
        aReader->FatalError("Error deserializing 'key' (BlobImageKey) member of 'OpDeleteBlobImage'");
        return {};

    }
    auto& _key = *maybe___key;
    // Sentinel = 'key'
    if ((!((aReader)->ReadSentinel(42402122)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'key' (BlobImageKey) member of 'OpDeleteBlobImage'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_key)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpAddRawFont|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpAddRawFont>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).bytes());
    // Sentinel = 'bytes'
    (aWriter)->WriteSentinel(107741736);
    IPC::WriteParam(aWriter, (aVar).key());
    // Sentinel = 'key'
    (aWriter)->WriteSentinel(42402122);
    (aWriter)->WriteBytes((&((aVar).fontIndex())), 4);
    // Sentinel = 'fontIndex'
    (aWriter)->WriteSentinel(308544432);
}

auto ParamTraits<::mozilla::layers::OpAddRawFont>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___bytes = IPC::ReadParam<::mozilla::layers::OffsetRange>(aReader);
    if (!maybe___bytes) {
        aReader->FatalError("Error deserializing 'bytes' (OffsetRange) member of 'OpAddRawFont'");
        return {};

    }
    auto& _bytes = *maybe___bytes;
    // Sentinel = 'bytes'
    if ((!((aReader)->ReadSentinel(107741736)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'bytes' (OffsetRange) member of 'OpAddRawFont'");
        return {};
    }
    auto maybe___key = IPC::ReadParam<::mozilla::wr::FontKey>(aReader);
    if (!maybe___key) {
        aReader->FatalError("Error deserializing 'key' (FontKey) member of 'OpAddRawFont'");
        return {};

    }
    auto& _key = *maybe___key;
    // Sentinel = 'key'
    if ((!((aReader)->ReadSentinel(42402122)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'key' (FontKey) member of 'OpAddRawFont'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_bytes),
            ::uint32_t{0},
            std::move(_key)};
    if ((!((aReader)->ReadBytesInto((&((result__)->fontIndex())), 4)))) {
        aReader->FatalError("Error bulk reading fields from uint32_t");
        return {};
    }
    // Sentinel = 'fontIndex'
    if ((!((aReader)->ReadSentinel(308544432)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint32_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpAddFontDescriptor|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpAddFontDescriptor>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).bytes());
    // Sentinel = 'bytes'
    (aWriter)->WriteSentinel(107741736);
    IPC::WriteParam(aWriter, (aVar).key());
    // Sentinel = 'key'
    (aWriter)->WriteSentinel(42402122);
    (aWriter)->WriteBytes((&((aVar).fontIndex())), 4);
    // Sentinel = 'fontIndex'
    (aWriter)->WriteSentinel(308544432);
}

auto ParamTraits<::mozilla::layers::OpAddFontDescriptor>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___bytes = IPC::ReadParam<::mozilla::layers::OffsetRange>(aReader);
    if (!maybe___bytes) {
        aReader->FatalError("Error deserializing 'bytes' (OffsetRange) member of 'OpAddFontDescriptor'");
        return {};

    }
    auto& _bytes = *maybe___bytes;
    // Sentinel = 'bytes'
    if ((!((aReader)->ReadSentinel(107741736)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'bytes' (OffsetRange) member of 'OpAddFontDescriptor'");
        return {};
    }
    auto maybe___key = IPC::ReadParam<::mozilla::wr::FontKey>(aReader);
    if (!maybe___key) {
        aReader->FatalError("Error deserializing 'key' (FontKey) member of 'OpAddFontDescriptor'");
        return {};

    }
    auto& _key = *maybe___key;
    // Sentinel = 'key'
    if ((!((aReader)->ReadSentinel(42402122)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'key' (FontKey) member of 'OpAddFontDescriptor'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_bytes),
            ::uint32_t{0},
            std::move(_key)};
    if ((!((aReader)->ReadBytesInto((&((result__)->fontIndex())), 4)))) {
        aReader->FatalError("Error bulk reading fields from uint32_t");
        return {};
    }
    // Sentinel = 'fontIndex'
    if ((!((aReader)->ReadSentinel(308544432)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint32_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpDeleteFont|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpDeleteFont>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).key());
    // Sentinel = 'key'
    (aWriter)->WriteSentinel(42402122);
}

auto ParamTraits<::mozilla::layers::OpDeleteFont>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___key = IPC::ReadParam<::mozilla::wr::FontKey>(aReader);
    if (!maybe___key) {
        aReader->FatalError("Error deserializing 'key' (FontKey) member of 'OpDeleteFont'");
        return {};

    }
    auto& _key = *maybe___key;
    // Sentinel = 'key'
    if ((!((aReader)->ReadSentinel(42402122)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'key' (FontKey) member of 'OpDeleteFont'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_key)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpAddFontInstance|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpAddFontInstance>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).options());
    // Sentinel = 'options'
    (aWriter)->WriteSentinel(204735245);
    IPC::WriteParam(aWriter, (aVar).platformOptions());
    // Sentinel = 'platformOptions'
    (aWriter)->WriteSentinel(844301906);
    IPC::WriteParam(aWriter, (aVar).variations());
    // Sentinel = 'variations'
    (aWriter)->WriteSentinel(390595649);
    IPC::WriteParam(aWriter, (aVar).instanceKey());
    // Sentinel = 'instanceKey'
    (aWriter)->WriteSentinel(459736191);
    IPC::WriteParam(aWriter, (aVar).fontKey());
    // Sentinel = 'fontKey'
    (aWriter)->WriteSentinel(193266401);
    (aWriter)->WriteBytes((&((aVar).glyphSize())), 4);
    // Sentinel = 'glyphSize'
    (aWriter)->WriteSentinel(316605376);
}

auto ParamTraits<::mozilla::layers::OpAddFontInstance>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___options = IPC::ReadParam<::mozilla::wr::MaybeFontInstanceOptions>(aReader);
    if (!maybe___options) {
        aReader->FatalError("Error deserializing 'options' (MaybeFontInstanceOptions) member of 'OpAddFontInstance'");
        return {};

    }
    auto& _options = *maybe___options;
    // Sentinel = 'options'
    if ((!((aReader)->ReadSentinel(204735245)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'options' (MaybeFontInstanceOptions) member of 'OpAddFontInstance'");
        return {};
    }
    auto maybe___platformOptions = IPC::ReadParam<::mozilla::wr::MaybeFontInstancePlatformOptions>(aReader);
    if (!maybe___platformOptions) {
        aReader->FatalError("Error deserializing 'platformOptions' (MaybeFontInstancePlatformOptions) member of 'OpAddFontInstance'");
        return {};

    }
    auto& _platformOptions = *maybe___platformOptions;
    // Sentinel = 'platformOptions'
    if ((!((aReader)->ReadSentinel(844301906)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'platformOptions' (MaybeFontInstancePlatformOptions) member of 'OpAddFontInstance'");
        return {};
    }
    auto maybe___variations = IPC::ReadParam<::mozilla::layers::OffsetRange>(aReader);
    if (!maybe___variations) {
        aReader->FatalError("Error deserializing 'variations' (OffsetRange) member of 'OpAddFontInstance'");
        return {};

    }
    auto& _variations = *maybe___variations;
    // Sentinel = 'variations'
    if ((!((aReader)->ReadSentinel(390595649)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'variations' (OffsetRange) member of 'OpAddFontInstance'");
        return {};
    }
    auto maybe___instanceKey = IPC::ReadParam<::mozilla::wr::FontInstanceKey>(aReader);
    if (!maybe___instanceKey) {
        aReader->FatalError("Error deserializing 'instanceKey' (FontInstanceKey) member of 'OpAddFontInstance'");
        return {};

    }
    auto& _instanceKey = *maybe___instanceKey;
    // Sentinel = 'instanceKey'
    if ((!((aReader)->ReadSentinel(459736191)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'instanceKey' (FontInstanceKey) member of 'OpAddFontInstance'");
        return {};
    }
    auto maybe___fontKey = IPC::ReadParam<::mozilla::wr::FontKey>(aReader);
    if (!maybe___fontKey) {
        aReader->FatalError("Error deserializing 'fontKey' (FontKey) member of 'OpAddFontInstance'");
        return {};

    }
    auto& _fontKey = *maybe___fontKey;
    // Sentinel = 'fontKey'
    if ((!((aReader)->ReadSentinel(193266401)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'fontKey' (FontKey) member of 'OpAddFontInstance'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_options),
            std::move(_platformOptions),
            std::move(_variations),
            std::move(_instanceKey),
            std::move(_fontKey),
            float{0}};
    if ((!((aReader)->ReadBytesInto((&((result__)->glyphSize())), 4)))) {
        aReader->FatalError("Error bulk reading fields from float");
        return {};
    }
    // Sentinel = 'glyphSize'
    if ((!((aReader)->ReadSentinel(316605376)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from float");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct OpDeleteFontInstance|
//
namespace mozilla {
namespace layers {
} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpDeleteFontInstance>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).key());
    // Sentinel = 'key'
    (aWriter)->WriteSentinel(42402122);
}

auto ParamTraits<::mozilla::layers::OpDeleteFontInstance>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___key = IPC::ReadParam<::mozilla::wr::FontInstanceKey>(aReader);
    if (!maybe___key) {
        aReader->FatalError("Error deserializing 'key' (FontInstanceKey) member of 'OpDeleteFontInstance'");
        return {};

    }
    auto& _key = *maybe___key;
    // Sentinel = 'key'
    if ((!((aReader)->ReadSentinel(42402122)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'key' (FontInstanceKey) member of 'OpDeleteFontInstance'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_key)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union OpUpdateResource|
//
namespace mozilla {
namespace layers {
auto OpUpdateResource::MaybeDestroy() -> void
{
    if ((mType) == (T__None)) {
        return;
    }
    switch (mType) {
    case TOpAddImage:
        {
            (ptr_OpAddImage())->~OpAddImage__tdef();
            break;
        }
    case TOpAddBlobImage:
        {
            (ptr_OpAddBlobImage())->~OpAddBlobImage__tdef();
            break;
        }
    case TOpAddSnapshotImage:
        {
            (ptr_OpAddSnapshotImage())->~OpAddSnapshotImage__tdef();
            break;
        }
    case TOpUpdateImage:
        {
            (ptr_OpUpdateImage())->~OpUpdateImage__tdef();
            break;
        }
    case TOpUpdateBlobImage:
        {
            (ptr_OpUpdateBlobImage())->~OpUpdateBlobImage__tdef();
            break;
        }
    case TOpSetBlobImageVisibleArea:
        {
            (ptr_OpSetBlobImageVisibleArea())->~OpSetBlobImageVisibleArea__tdef();
            break;
        }
    case TOpDeleteImage:
        {
            (ptr_OpDeleteImage())->~OpDeleteImage__tdef();
            break;
        }
    case TOpDeleteBlobImage:
        {
            (ptr_OpDeleteBlobImage())->~OpDeleteBlobImage__tdef();
            break;
        }
    case TOpDeleteSnapshotImage:
        {
            (ptr_OpDeleteSnapshotImage())->~OpDeleteSnapshotImage__tdef();
            break;
        }
    case TOpAddRawFont:
        {
            (ptr_OpAddRawFont())->~OpAddRawFont__tdef();
            break;
        }
    case TOpAddFontDescriptor:
        {
            (ptr_OpAddFontDescriptor())->~OpAddFontDescriptor__tdef();
            break;
        }
    case TOpDeleteFont:
        {
            (ptr_OpDeleteFont())->~OpDeleteFont__tdef();
            break;
        }
    case TOpAddFontInstance:
        {
            (ptr_OpAddFontInstance())->~OpAddFontInstance__tdef();
            break;
        }
    case TOpDeleteFontInstance:
        {
            (ptr_OpDeleteFontInstance())->~OpDeleteFontInstance__tdef();
            break;
        }
    case TOpAddSharedExternalImage:
        {
            (ptr_OpAddSharedExternalImage())->~OpAddSharedExternalImage__tdef();
            break;
        }
    case TOpPushExternalImageForTexture:
        {
            (ptr_OpPushExternalImageForTexture())->~OpPushExternalImageForTexture__tdef();
            break;
        }
    case TOpUpdateSharedExternalImage:
        {
            (ptr_OpUpdateSharedExternalImage())->~OpUpdateSharedExternalImage__tdef();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("not reached");
            break;
        }
    }
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpAddImage& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddImage()) OpAddImage(aOther);
    mType = TOpAddImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpAddImage&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddImage()) OpAddImage(std::move(aOther));
    mType = TOpAddImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpAddBlobImage& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddBlobImage()) OpAddBlobImage(aOther);
    mType = TOpAddBlobImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpAddBlobImage&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddBlobImage()) OpAddBlobImage(std::move(aOther));
    mType = TOpAddBlobImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpAddSnapshotImage& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddSnapshotImage()) OpAddSnapshotImage(aOther);
    mType = TOpAddSnapshotImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpAddSnapshotImage&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddSnapshotImage()) OpAddSnapshotImage(std::move(aOther));
    mType = TOpAddSnapshotImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpUpdateImage& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpUpdateImage()) OpUpdateImage(aOther);
    mType = TOpUpdateImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpUpdateImage&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpUpdateImage()) OpUpdateImage(std::move(aOther));
    mType = TOpUpdateImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpUpdateBlobImage& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpUpdateBlobImage()) OpUpdateBlobImage(aOther);
    mType = TOpUpdateBlobImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpUpdateBlobImage&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpUpdateBlobImage()) OpUpdateBlobImage(std::move(aOther));
    mType = TOpUpdateBlobImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpSetBlobImageVisibleArea& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpSetBlobImageVisibleArea()) OpSetBlobImageVisibleArea(aOther);
    mType = TOpSetBlobImageVisibleArea;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpSetBlobImageVisibleArea&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpSetBlobImageVisibleArea()) OpSetBlobImageVisibleArea(std::move(aOther));
    mType = TOpSetBlobImageVisibleArea;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpDeleteImage& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpDeleteImage()) OpDeleteImage(aOther);
    mType = TOpDeleteImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpDeleteImage&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpDeleteImage()) OpDeleteImage(std::move(aOther));
    mType = TOpDeleteImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpDeleteBlobImage& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpDeleteBlobImage()) OpDeleteBlobImage(aOther);
    mType = TOpDeleteBlobImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpDeleteBlobImage&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpDeleteBlobImage()) OpDeleteBlobImage(std::move(aOther));
    mType = TOpDeleteBlobImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpDeleteSnapshotImage& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpDeleteSnapshotImage()) OpDeleteSnapshotImage(aOther);
    mType = TOpDeleteSnapshotImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpDeleteSnapshotImage&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpDeleteSnapshotImage()) OpDeleteSnapshotImage(std::move(aOther));
    mType = TOpDeleteSnapshotImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpAddRawFont& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddRawFont()) OpAddRawFont(aOther);
    mType = TOpAddRawFont;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpAddRawFont&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddRawFont()) OpAddRawFont(std::move(aOther));
    mType = TOpAddRawFont;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpAddFontDescriptor& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddFontDescriptor()) OpAddFontDescriptor(aOther);
    mType = TOpAddFontDescriptor;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpAddFontDescriptor&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddFontDescriptor()) OpAddFontDescriptor(std::move(aOther));
    mType = TOpAddFontDescriptor;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpDeleteFont& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpDeleteFont()) OpDeleteFont(aOther);
    mType = TOpDeleteFont;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpDeleteFont&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpDeleteFont()) OpDeleteFont(std::move(aOther));
    mType = TOpDeleteFont;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpAddFontInstance& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddFontInstance()) OpAddFontInstance(aOther);
    mType = TOpAddFontInstance;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpAddFontInstance&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddFontInstance()) OpAddFontInstance(std::move(aOther));
    mType = TOpAddFontInstance;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpDeleteFontInstance& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpDeleteFontInstance()) OpDeleteFontInstance(aOther);
    mType = TOpDeleteFontInstance;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpDeleteFontInstance&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpDeleteFontInstance()) OpDeleteFontInstance(std::move(aOther));
    mType = TOpDeleteFontInstance;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpAddSharedExternalImage& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddSharedExternalImage()) OpAddSharedExternalImage(aOther);
    mType = TOpAddSharedExternalImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpAddSharedExternalImage&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpAddSharedExternalImage()) OpAddSharedExternalImage(std::move(aOther));
    mType = TOpAddSharedExternalImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpPushExternalImageForTexture& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpPushExternalImageForTexture()) OpPushExternalImageForTexture(aOther);
    mType = TOpPushExternalImageForTexture;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpPushExternalImageForTexture&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpPushExternalImageForTexture()) OpPushExternalImageForTexture(std::move(aOther));
    mType = TOpPushExternalImageForTexture;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpUpdateSharedExternalImage& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpUpdateSharedExternalImage()) OpUpdateSharedExternalImage(aOther);
    mType = TOpUpdateSharedExternalImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpUpdateSharedExternalImage&& aOther)
{
    new (mozilla::KnownNotNull, ptr_OpUpdateSharedExternalImage()) OpUpdateSharedExternalImage(std::move(aOther));
    mType = TOpUpdateSharedExternalImage;
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(const OpUpdateResource& aOther)
{
    (aOther).AssertSanity();
    switch ((aOther).type()) {
    case TOpAddImage:
        {
            new (mozilla::KnownNotNull, ptr_OpAddImage()) OpAddImage((aOther).get_OpAddImage());
            break;
        }
    case TOpAddBlobImage:
        {
            new (mozilla::KnownNotNull, ptr_OpAddBlobImage()) OpAddBlobImage((aOther).get_OpAddBlobImage());
            break;
        }
    case TOpAddSnapshotImage:
        {
            new (mozilla::KnownNotNull, ptr_OpAddSnapshotImage()) OpAddSnapshotImage((aOther).get_OpAddSnapshotImage());
            break;
        }
    case TOpUpdateImage:
        {
            new (mozilla::KnownNotNull, ptr_OpUpdateImage()) OpUpdateImage((aOther).get_OpUpdateImage());
            break;
        }
    case TOpUpdateBlobImage:
        {
            new (mozilla::KnownNotNull, ptr_OpUpdateBlobImage()) OpUpdateBlobImage((aOther).get_OpUpdateBlobImage());
            break;
        }
    case TOpSetBlobImageVisibleArea:
        {
            new (mozilla::KnownNotNull, ptr_OpSetBlobImageVisibleArea()) OpSetBlobImageVisibleArea((aOther).get_OpSetBlobImageVisibleArea());
            break;
        }
    case TOpDeleteImage:
        {
            new (mozilla::KnownNotNull, ptr_OpDeleteImage()) OpDeleteImage((aOther).get_OpDeleteImage());
            break;
        }
    case TOpDeleteBlobImage:
        {
            new (mozilla::KnownNotNull, ptr_OpDeleteBlobImage()) OpDeleteBlobImage((aOther).get_OpDeleteBlobImage());
            break;
        }
    case TOpDeleteSnapshotImage:
        {
            new (mozilla::KnownNotNull, ptr_OpDeleteSnapshotImage()) OpDeleteSnapshotImage((aOther).get_OpDeleteSnapshotImage());
            break;
        }
    case TOpAddRawFont:
        {
            new (mozilla::KnownNotNull, ptr_OpAddRawFont()) OpAddRawFont((aOther).get_OpAddRawFont());
            break;
        }
    case TOpAddFontDescriptor:
        {
            new (mozilla::KnownNotNull, ptr_OpAddFontDescriptor()) OpAddFontDescriptor((aOther).get_OpAddFontDescriptor());
            break;
        }
    case TOpDeleteFont:
        {
            new (mozilla::KnownNotNull, ptr_OpDeleteFont()) OpDeleteFont((aOther).get_OpDeleteFont());
            break;
        }
    case TOpAddFontInstance:
        {
            new (mozilla::KnownNotNull, ptr_OpAddFontInstance()) OpAddFontInstance((aOther).get_OpAddFontInstance());
            break;
        }
    case TOpDeleteFontInstance:
        {
            new (mozilla::KnownNotNull, ptr_OpDeleteFontInstance()) OpDeleteFontInstance((aOther).get_OpDeleteFontInstance());
            break;
        }
    case TOpAddSharedExternalImage:
        {
            new (mozilla::KnownNotNull, ptr_OpAddSharedExternalImage()) OpAddSharedExternalImage((aOther).get_OpAddSharedExternalImage());
            break;
        }
    case TOpPushExternalImageForTexture:
        {
            new (mozilla::KnownNotNull, ptr_OpPushExternalImageForTexture()) OpPushExternalImageForTexture((aOther).get_OpPushExternalImageForTexture());
            break;
        }
    case TOpUpdateSharedExternalImage:
        {
            new (mozilla::KnownNotNull, ptr_OpUpdateSharedExternalImage()) OpUpdateSharedExternalImage((aOther).get_OpUpdateSharedExternalImage());
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    mType = (aOther).type();
}

MOZ_IMPLICIT OpUpdateResource::OpUpdateResource(OpUpdateResource&& aOther)
{
    (aOther).AssertSanity();
    Type t = (aOther).type();
    switch (t) {
    case TOpAddImage:
        {
            new (mozilla::KnownNotNull, ptr_OpAddImage()) OpAddImage(std::move((aOther).get_OpAddImage()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpAddBlobImage:
        {
            new (mozilla::KnownNotNull, ptr_OpAddBlobImage()) OpAddBlobImage(std::move((aOther).get_OpAddBlobImage()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpAddSnapshotImage:
        {
            new (mozilla::KnownNotNull, ptr_OpAddSnapshotImage()) OpAddSnapshotImage(std::move((aOther).get_OpAddSnapshotImage()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpUpdateImage:
        {
            new (mozilla::KnownNotNull, ptr_OpUpdateImage()) OpUpdateImage(std::move((aOther).get_OpUpdateImage()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpUpdateBlobImage:
        {
            new (mozilla::KnownNotNull, ptr_OpUpdateBlobImage()) OpUpdateBlobImage(std::move((aOther).get_OpUpdateBlobImage()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpSetBlobImageVisibleArea:
        {
            new (mozilla::KnownNotNull, ptr_OpSetBlobImageVisibleArea()) OpSetBlobImageVisibleArea(std::move((aOther).get_OpSetBlobImageVisibleArea()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpDeleteImage:
        {
            new (mozilla::KnownNotNull, ptr_OpDeleteImage()) OpDeleteImage(std::move((aOther).get_OpDeleteImage()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpDeleteBlobImage:
        {
            new (mozilla::KnownNotNull, ptr_OpDeleteBlobImage()) OpDeleteBlobImage(std::move((aOther).get_OpDeleteBlobImage()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpDeleteSnapshotImage:
        {
            new (mozilla::KnownNotNull, ptr_OpDeleteSnapshotImage()) OpDeleteSnapshotImage(std::move((aOther).get_OpDeleteSnapshotImage()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpAddRawFont:
        {
            new (mozilla::KnownNotNull, ptr_OpAddRawFont()) OpAddRawFont(std::move((aOther).get_OpAddRawFont()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpAddFontDescriptor:
        {
            new (mozilla::KnownNotNull, ptr_OpAddFontDescriptor()) OpAddFontDescriptor(std::move((aOther).get_OpAddFontDescriptor()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpDeleteFont:
        {
            new (mozilla::KnownNotNull, ptr_OpDeleteFont()) OpDeleteFont(std::move((aOther).get_OpDeleteFont()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpAddFontInstance:
        {
            new (mozilla::KnownNotNull, ptr_OpAddFontInstance()) OpAddFontInstance(std::move((aOther).get_OpAddFontInstance()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpDeleteFontInstance:
        {
            new (mozilla::KnownNotNull, ptr_OpDeleteFontInstance()) OpDeleteFontInstance(std::move((aOther).get_OpDeleteFontInstance()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpAddSharedExternalImage:
        {
            new (mozilla::KnownNotNull, ptr_OpAddSharedExternalImage()) OpAddSharedExternalImage(std::move((aOther).get_OpAddSharedExternalImage()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpPushExternalImageForTexture:
        {
            new (mozilla::KnownNotNull, ptr_OpPushExternalImageForTexture()) OpPushExternalImageForTexture(std::move((aOther).get_OpPushExternalImageForTexture()));
            (aOther).MaybeDestroy();
            break;
        }
    case TOpUpdateSharedExternalImage:
        {
            new (mozilla::KnownNotNull, ptr_OpUpdateSharedExternalImage()) OpUpdateSharedExternalImage(std::move((aOther).get_OpUpdateSharedExternalImage()));
            (aOther).MaybeDestroy();
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    (aOther).mType = T__None;
    mType = t;
}

OpUpdateResource::~OpUpdateResource()
{
    MaybeDestroy();
}

auto OpUpdateResource::operator=(const OpAddImage& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddImage()) OpAddImage(aRhs);
    mType = TOpAddImage;
    return (*(this));
}

auto OpUpdateResource::operator=(OpAddImage&& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddImage()) OpAddImage(std::move(aRhs));
    mType = TOpAddImage;
    return (*(this));
}

auto OpUpdateResource::operator=(const OpAddBlobImage& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddBlobImage()) OpAddBlobImage(aRhs);
    mType = TOpAddBlobImage;
    return (*(this));
}

auto OpUpdateResource::operator=(OpAddBlobImage&& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddBlobImage()) OpAddBlobImage(std::move(aRhs));
    mType = TOpAddBlobImage;
    return (*(this));
}

auto OpUpdateResource::operator=(const OpAddSnapshotImage& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddSnapshotImage()) OpAddSnapshotImage(aRhs);
    mType = TOpAddSnapshotImage;
    return (*(this));
}

auto OpUpdateResource::operator=(OpAddSnapshotImage&& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddSnapshotImage()) OpAddSnapshotImage(std::move(aRhs));
    mType = TOpAddSnapshotImage;
    return (*(this));
}

auto OpUpdateResource::operator=(const OpUpdateImage& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpUpdateImage()) OpUpdateImage(aRhs);
    mType = TOpUpdateImage;
    return (*(this));
}

auto OpUpdateResource::operator=(OpUpdateImage&& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpUpdateImage()) OpUpdateImage(std::move(aRhs));
    mType = TOpUpdateImage;
    return (*(this));
}

auto OpUpdateResource::operator=(const OpUpdateBlobImage& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpUpdateBlobImage()) OpUpdateBlobImage(aRhs);
    mType = TOpUpdateBlobImage;
    return (*(this));
}

auto OpUpdateResource::operator=(OpUpdateBlobImage&& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpUpdateBlobImage()) OpUpdateBlobImage(std::move(aRhs));
    mType = TOpUpdateBlobImage;
    return (*(this));
}

auto OpUpdateResource::operator=(const OpSetBlobImageVisibleArea& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpSetBlobImageVisibleArea()) OpSetBlobImageVisibleArea(aRhs);
    mType = TOpSetBlobImageVisibleArea;
    return (*(this));
}

auto OpUpdateResource::operator=(OpSetBlobImageVisibleArea&& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpSetBlobImageVisibleArea()) OpSetBlobImageVisibleArea(std::move(aRhs));
    mType = TOpSetBlobImageVisibleArea;
    return (*(this));
}

auto OpUpdateResource::operator=(const OpDeleteImage& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpDeleteImage()) OpDeleteImage(aRhs);
    mType = TOpDeleteImage;
    return (*(this));
}

auto OpUpdateResource::operator=(OpDeleteImage&& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpDeleteImage()) OpDeleteImage(std::move(aRhs));
    mType = TOpDeleteImage;
    return (*(this));
}

auto OpUpdateResource::operator=(const OpDeleteBlobImage& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpDeleteBlobImage()) OpDeleteBlobImage(aRhs);
    mType = TOpDeleteBlobImage;
    return (*(this));
}

auto OpUpdateResource::operator=(OpDeleteBlobImage&& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpDeleteBlobImage()) OpDeleteBlobImage(std::move(aRhs));
    mType = TOpDeleteBlobImage;
    return (*(this));
}

auto OpUpdateResource::operator=(const OpDeleteSnapshotImage& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpDeleteSnapshotImage()) OpDeleteSnapshotImage(aRhs);
    mType = TOpDeleteSnapshotImage;
    return (*(this));
}

auto OpUpdateResource::operator=(OpDeleteSnapshotImage&& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpDeleteSnapshotImage()) OpDeleteSnapshotImage(std::move(aRhs));
    mType = TOpDeleteSnapshotImage;
    return (*(this));
}

auto OpUpdateResource::operator=(const OpAddRawFont& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddRawFont()) OpAddRawFont(aRhs);
    mType = TOpAddRawFont;
    return (*(this));
}

auto OpUpdateResource::operator=(OpAddRawFont&& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddRawFont()) OpAddRawFont(std::move(aRhs));
    mType = TOpAddRawFont;
    return (*(this));
}

auto OpUpdateResource::operator=(const OpAddFontDescriptor& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddFontDescriptor()) OpAddFontDescriptor(aRhs);
    mType = TOpAddFontDescriptor;
    return (*(this));
}

auto OpUpdateResource::operator=(OpAddFontDescriptor&& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddFontDescriptor()) OpAddFontDescriptor(std::move(aRhs));
    mType = TOpAddFontDescriptor;
    return (*(this));
}

auto OpUpdateResource::operator=(const OpDeleteFont& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpDeleteFont()) OpDeleteFont(aRhs);
    mType = TOpDeleteFont;
    return (*(this));
}

auto OpUpdateResource::operator=(OpDeleteFont&& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpDeleteFont()) OpDeleteFont(std::move(aRhs));
    mType = TOpDeleteFont;
    return (*(this));
}

auto OpUpdateResource::operator=(const OpAddFontInstance& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddFontInstance()) OpAddFontInstance(aRhs);
    mType = TOpAddFontInstance;
    return (*(this));
}

auto OpUpdateResource::operator=(OpAddFontInstance&& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddFontInstance()) OpAddFontInstance(std::move(aRhs));
    mType = TOpAddFontInstance;
    return (*(this));
}

auto OpUpdateResource::operator=(const OpDeleteFontInstance& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpDeleteFontInstance()) OpDeleteFontInstance(aRhs);
    mType = TOpDeleteFontInstance;
    return (*(this));
}

auto OpUpdateResource::operator=(OpDeleteFontInstance&& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpDeleteFontInstance()) OpDeleteFontInstance(std::move(aRhs));
    mType = TOpDeleteFontInstance;
    return (*(this));
}

auto OpUpdateResource::operator=(const OpAddSharedExternalImage& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddSharedExternalImage()) OpAddSharedExternalImage(aRhs);
    mType = TOpAddSharedExternalImage;
    return (*(this));
}

auto OpUpdateResource::operator=(OpAddSharedExternalImage&& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpAddSharedExternalImage()) OpAddSharedExternalImage(std::move(aRhs));
    mType = TOpAddSharedExternalImage;
    return (*(this));
}

auto OpUpdateResource::operator=(const OpPushExternalImageForTexture& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpPushExternalImageForTexture()) OpPushExternalImageForTexture(aRhs);
    mType = TOpPushExternalImageForTexture;
    return (*(this));
}

auto OpUpdateResource::operator=(OpPushExternalImageForTexture&& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpPushExternalImageForTexture()) OpPushExternalImageForTexture(std::move(aRhs));
    mType = TOpPushExternalImageForTexture;
    return (*(this));
}

auto OpUpdateResource::operator=(const OpUpdateSharedExternalImage& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpUpdateSharedExternalImage()) OpUpdateSharedExternalImage(aRhs);
    mType = TOpUpdateSharedExternalImage;
    return (*(this));
}

auto OpUpdateResource::operator=(OpUpdateSharedExternalImage&& aRhs) -> OpUpdateResource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_OpUpdateSharedExternalImage()) OpUpdateSharedExternalImage(std::move(aRhs));
    mType = TOpUpdateSharedExternalImage;
    return (*(this));
}

auto OpUpdateResource::operator=(const OpUpdateResource& aRhs) -> OpUpdateResource&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TOpAddImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddImage()) OpAddImage((aRhs).get_OpAddImage());
            break;
        }
    case TOpAddBlobImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddBlobImage()) OpAddBlobImage((aRhs).get_OpAddBlobImage());
            break;
        }
    case TOpAddSnapshotImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddSnapshotImage()) OpAddSnapshotImage((aRhs).get_OpAddSnapshotImage());
            break;
        }
    case TOpUpdateImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpUpdateImage()) OpUpdateImage((aRhs).get_OpUpdateImage());
            break;
        }
    case TOpUpdateBlobImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpUpdateBlobImage()) OpUpdateBlobImage((aRhs).get_OpUpdateBlobImage());
            break;
        }
    case TOpSetBlobImageVisibleArea:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpSetBlobImageVisibleArea()) OpSetBlobImageVisibleArea((aRhs).get_OpSetBlobImageVisibleArea());
            break;
        }
    case TOpDeleteImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpDeleteImage()) OpDeleteImage((aRhs).get_OpDeleteImage());
            break;
        }
    case TOpDeleteBlobImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpDeleteBlobImage()) OpDeleteBlobImage((aRhs).get_OpDeleteBlobImage());
            break;
        }
    case TOpDeleteSnapshotImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpDeleteSnapshotImage()) OpDeleteSnapshotImage((aRhs).get_OpDeleteSnapshotImage());
            break;
        }
    case TOpAddRawFont:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddRawFont()) OpAddRawFont((aRhs).get_OpAddRawFont());
            break;
        }
    case TOpAddFontDescriptor:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddFontDescriptor()) OpAddFontDescriptor((aRhs).get_OpAddFontDescriptor());
            break;
        }
    case TOpDeleteFont:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpDeleteFont()) OpDeleteFont((aRhs).get_OpDeleteFont());
            break;
        }
    case TOpAddFontInstance:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddFontInstance()) OpAddFontInstance((aRhs).get_OpAddFontInstance());
            break;
        }
    case TOpDeleteFontInstance:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpDeleteFontInstance()) OpDeleteFontInstance((aRhs).get_OpDeleteFontInstance());
            break;
        }
    case TOpAddSharedExternalImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddSharedExternalImage()) OpAddSharedExternalImage((aRhs).get_OpAddSharedExternalImage());
            break;
        }
    case TOpPushExternalImageForTexture:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpPushExternalImageForTexture()) OpPushExternalImageForTexture((aRhs).get_OpPushExternalImageForTexture());
            break;
        }
    case TOpUpdateSharedExternalImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpUpdateSharedExternalImage()) OpUpdateSharedExternalImage((aRhs).get_OpUpdateSharedExternalImage());
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    mType = t;
    return (*(this));
}

auto OpUpdateResource::operator=(OpUpdateResource&& aRhs) -> OpUpdateResource&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TOpAddImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddImage()) OpAddImage(std::move((aRhs).get_OpAddImage()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpAddBlobImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddBlobImage()) OpAddBlobImage(std::move((aRhs).get_OpAddBlobImage()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpAddSnapshotImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddSnapshotImage()) OpAddSnapshotImage(std::move((aRhs).get_OpAddSnapshotImage()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpUpdateImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpUpdateImage()) OpUpdateImage(std::move((aRhs).get_OpUpdateImage()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpUpdateBlobImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpUpdateBlobImage()) OpUpdateBlobImage(std::move((aRhs).get_OpUpdateBlobImage()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpSetBlobImageVisibleArea:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpSetBlobImageVisibleArea()) OpSetBlobImageVisibleArea(std::move((aRhs).get_OpSetBlobImageVisibleArea()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpDeleteImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpDeleteImage()) OpDeleteImage(std::move((aRhs).get_OpDeleteImage()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpDeleteBlobImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpDeleteBlobImage()) OpDeleteBlobImage(std::move((aRhs).get_OpDeleteBlobImage()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpDeleteSnapshotImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpDeleteSnapshotImage()) OpDeleteSnapshotImage(std::move((aRhs).get_OpDeleteSnapshotImage()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpAddRawFont:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddRawFont()) OpAddRawFont(std::move((aRhs).get_OpAddRawFont()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpAddFontDescriptor:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddFontDescriptor()) OpAddFontDescriptor(std::move((aRhs).get_OpAddFontDescriptor()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpDeleteFont:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpDeleteFont()) OpDeleteFont(std::move((aRhs).get_OpDeleteFont()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpAddFontInstance:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddFontInstance()) OpAddFontInstance(std::move((aRhs).get_OpAddFontInstance()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpDeleteFontInstance:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpDeleteFontInstance()) OpDeleteFontInstance(std::move((aRhs).get_OpDeleteFontInstance()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpAddSharedExternalImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpAddSharedExternalImage()) OpAddSharedExternalImage(std::move((aRhs).get_OpAddSharedExternalImage()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpPushExternalImageForTexture:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpPushExternalImageForTexture()) OpPushExternalImageForTexture(std::move((aRhs).get_OpPushExternalImageForTexture()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TOpUpdateSharedExternalImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_OpUpdateSharedExternalImage()) OpUpdateSharedExternalImage(std::move((aRhs).get_OpUpdateSharedExternalImage()));
            (aRhs).MaybeDestroy();
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    (aRhs).mType = T__None;
    mType = t;
    return (*(this));
}

} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::OpUpdateResource>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    typedef ::mozilla::layers::OpUpdateResource union__;
    int type = (aVar).type();
    IPC::WriteParam(aWriter, type);
    // Sentinel = 'OpUpdateResource'
    (aWriter)->WriteSentinel(895157867);

    switch (type) {
    case union__::TOpAddImage:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpAddImage());
            // Sentinel = 'TOpAddImage'
            (aWriter)->WriteSentinel(390071296);
            return;
        }
    case union__::TOpAddBlobImage:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpAddBlobImage());
            // Sentinel = 'TOpAddBlobImage'
            (aWriter)->WriteSentinel(716899711);
            return;
        }
    case union__::TOpAddSnapshotImage:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpAddSnapshotImage());
            // Sentinel = 'TOpAddSnapshotImage'
            (aWriter)->WriteSentinel(1193150288);
            return;
        }
    case union__::TOpUpdateImage:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpUpdateImage());
            // Sentinel = 'TOpUpdateImage'
            (aWriter)->WriteSentinel(662504794);
            return;
        }
    case union__::TOpUpdateBlobImage:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpUpdateBlobImage());
            // Sentinel = 'TOpUpdateBlobImage'
            (aWriter)->WriteSentinel(1080035033);
            return;
        }
    case union__::TOpSetBlobImageVisibleArea:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpSetBlobImageVisibleArea());
            // Sentinel = 'TOpSetBlobImageVisibleArea'
            (aWriter)->WriteSentinel(2215053801);
            return;
        }
    case union__::TOpDeleteImage:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpDeleteImage());
            // Sentinel = 'TOpDeleteImage'
            (aWriter)->WriteSentinel(649856330);
            return;
        }
    case union__::TOpDeleteBlobImage:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpDeleteBlobImage());
            // Sentinel = 'TOpDeleteBlobImage'
            (aWriter)->WriteSentinel(1063192265);
            return;
        }
    case union__::TOpDeleteSnapshotImage:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpDeleteSnapshotImage());
            // Sentinel = 'TOpDeleteSnapshotImage'
            (aWriter)->WriteSentinel(1625950362);
            return;
        }
    case union__::TOpAddRawFont:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpAddRawFont());
            // Sentinel = 'TOpAddRawFont'
            (aWriter)->WriteSentinel(546243806);
            return;
        }
    case union__::TOpAddFontDescriptor:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpAddFontDescriptor());
            // Sentinel = 'TOpAddFontDescriptor'
            (aWriter)->WriteSentinel(1309673427);
            return;
        }
    case union__::TOpDeleteFont:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpDeleteFont());
            // Sentinel = 'TOpDeleteFont'
            (aWriter)->WriteSentinel(563283198);
            return;
        }
    case union__::TOpAddFontInstance:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpAddFontInstance());
            // Sentinel = 'TOpAddFontInstance'
            (aWriter)->WriteSentinel(1060767465);
            return;
        }
    case union__::TOpDeleteFontInstance:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpDeleteFontInstance());
            // Sentinel = 'TOpDeleteFontInstance'
            (aWriter)->WriteSentinel(1471940659);
            return;
        }
    case union__::TOpAddSharedExternalImage:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpAddSharedExternalImage());
            // Sentinel = 'TOpAddSharedExternalImage'
            (aWriter)->WriteSentinel(2045970842);
            return;
        }
    case union__::TOpPushExternalImageForTexture:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpPushExternalImageForTexture());
            // Sentinel = 'TOpPushExternalImageForTexture'
            (aWriter)->WriteSentinel(3049655282);
            return;
        }
    case union__::TOpUpdateSharedExternalImage:
        {
            IPC::WriteParam(aWriter, (aVar).get_OpUpdateSharedExternalImage());
            // Sentinel = 'TOpUpdateSharedExternalImage'
            (aWriter)->WriteSentinel(2635860724);
            return;
        }
    default:
        {
            aWriter->FatalError("unknown variant of union OpUpdateResource");
            return;
        }
    }
}

auto ParamTraits<::mozilla::layers::OpUpdateResource>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    typedef ::mozilla::layers::OpUpdateResource union__;
    auto maybe__type = IPC::ReadParam<int>(aReader);
    if (!maybe__type) {
        aReader->FatalError("Error deserializing type of union OpUpdateResource");
        return {};

    }
    auto& type = *maybe__type;
    // Sentinel = 'OpUpdateResource'
    if ((!((aReader)->ReadSentinel(895157867)))) {
        mozilla::ipc::SentinelReadError("Error deserializing type of union OpUpdateResource");
        return {};
    }

    switch (type) {
    case union__::TOpAddImage:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpAddImage>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpAddImage of union OpUpdateResource");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpAddImage'
            if ((!((aReader)->ReadSentinel(390071296)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpAddImage of union OpUpdateResource");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpAddBlobImage:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpAddBlobImage>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpAddBlobImage of union OpUpdateResource");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpAddBlobImage'
            if ((!((aReader)->ReadSentinel(716899711)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpAddBlobImage of union OpUpdateResource");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpAddSnapshotImage:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpAddSnapshotImage>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpAddSnapshotImage of union OpUpdateResource");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpAddSnapshotImage'
            if ((!((aReader)->ReadSentinel(1193150288)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpAddSnapshotImage of union OpUpdateResource");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpUpdateImage:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpUpdateImage>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpUpdateImage of union OpUpdateResource");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpUpdateImage'
            if ((!((aReader)->ReadSentinel(662504794)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpUpdateImage of union OpUpdateResource");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpUpdateBlobImage:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpUpdateBlobImage>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpUpdateBlobImage of union OpUpdateResource");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpUpdateBlobImage'
            if ((!((aReader)->ReadSentinel(1080035033)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpUpdateBlobImage of union OpUpdateResource");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpSetBlobImageVisibleArea:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpSetBlobImageVisibleArea>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpSetBlobImageVisibleArea of union OpUpdateResource");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpSetBlobImageVisibleArea'
            if ((!((aReader)->ReadSentinel(2215053801)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpSetBlobImageVisibleArea of union OpUpdateResource");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpDeleteImage:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpDeleteImage>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpDeleteImage of union OpUpdateResource");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpDeleteImage'
            if ((!((aReader)->ReadSentinel(649856330)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpDeleteImage of union OpUpdateResource");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpDeleteBlobImage:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpDeleteBlobImage>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpDeleteBlobImage of union OpUpdateResource");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpDeleteBlobImage'
            if ((!((aReader)->ReadSentinel(1063192265)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpDeleteBlobImage of union OpUpdateResource");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpDeleteSnapshotImage:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpDeleteSnapshotImage>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpDeleteSnapshotImage of union OpUpdateResource");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpDeleteSnapshotImage'
            if ((!((aReader)->ReadSentinel(1625950362)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpDeleteSnapshotImage of union OpUpdateResource");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpAddRawFont:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpAddRawFont>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpAddRawFont of union OpUpdateResource");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpAddRawFont'
            if ((!((aReader)->ReadSentinel(546243806)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpAddRawFont of union OpUpdateResource");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpAddFontDescriptor:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpAddFontDescriptor>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpAddFontDescriptor of union OpUpdateResource");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpAddFontDescriptor'
            if ((!((aReader)->ReadSentinel(1309673427)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpAddFontDescriptor of union OpUpdateResource");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpDeleteFont:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpDeleteFont>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpDeleteFont of union OpUpdateResource");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpDeleteFont'
            if ((!((aReader)->ReadSentinel(563283198)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpDeleteFont of union OpUpdateResource");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpAddFontInstance:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpAddFontInstance>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpAddFontInstance of union OpUpdateResource");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpAddFontInstance'
            if ((!((aReader)->ReadSentinel(1060767465)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpAddFontInstance of union OpUpdateResource");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpDeleteFontInstance:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpDeleteFontInstance>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpDeleteFontInstance of union OpUpdateResource");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpDeleteFontInstance'
            if ((!((aReader)->ReadSentinel(1471940659)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpDeleteFontInstance of union OpUpdateResource");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpAddSharedExternalImage:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpAddSharedExternalImage>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpAddSharedExternalImage of union OpUpdateResource");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpAddSharedExternalImage'
            if ((!((aReader)->ReadSentinel(2045970842)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpAddSharedExternalImage of union OpUpdateResource");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpPushExternalImageForTexture:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpPushExternalImageForTexture>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpPushExternalImageForTexture of union OpUpdateResource");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpPushExternalImageForTexture'
            if ((!((aReader)->ReadSentinel(3049655282)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpPushExternalImageForTexture of union OpUpdateResource");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TOpUpdateSharedExternalImage:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::layers::OpUpdateSharedExternalImage>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TOpUpdateSharedExternalImage of union OpUpdateResource");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TOpUpdateSharedExternalImage'
            if ((!((aReader)->ReadSentinel(2635860724)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TOpUpdateSharedExternalImage of union OpUpdateResource");
                return {};
            }
            return std::move(tmp);
        }
    default:
        {
            aReader->FatalError("unknown variant of union OpUpdateResource");
            return {};
        }
    }
}

} // namespace IPC
