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


#include "gfxipc/ShadowLayerUtils.h"
#include "mozilla/GfxMessageUtils.h"
#include "mozilla/layers/LayersMessageUtils.h"
#include "mozilla/layers/WebRenderMessageUtils.h"
#include "mozilla/layers/LayersSurfaces.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 SurfaceDescriptorD3D10|
//
namespace mozilla {
namespace layers {
auto SurfaceDescriptorD3D10::operator==(const SurfaceDescriptorD3D10& _o) const -> bool
{
    if ((!((handle()) == ((_o).handle())))) {
        return false;
    }
    if ((!((gpuProcessTextureId()) == ((_o).gpuProcessTextureId())))) {
        return false;
    }
    if ((!((arrayIndex()) == ((_o).arrayIndex())))) {
        return false;
    }
    if ((!((format()) == ((_o).format())))) {
        return false;
    }
    if ((!((size()) == ((_o).size())))) {
        return false;
    }
    if ((!((colorSpace()) == ((_o).colorSpace())))) {
        return false;
    }
    if ((!((colorRange()) == ((_o).colorRange())))) {
        return false;
    }
    if ((!((transferFunction()) == ((_o).transferFunction())))) {
        return false;
    }
    if ((!((hdrMetadata()) == ((_o).hdrMetadata())))) {
        return false;
    }
    if ((!((hasKeyedMutex()) == ((_o).hasKeyedMutex())))) {
        return false;
    }
    if ((!((fencesHolderId()) == ((_o).fencesHolderId())))) {
        return false;
    }
    return true;
}

auto SurfaceDescriptorD3D10::operator!=(const SurfaceDescriptorD3D10& _o) const -> bool
{
    return (!(operator==(_o)));
}

} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::SurfaceDescriptorD3D10>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).handle());
    // Sentinel = 'handle'
    (aWriter)->WriteSentinel(142344813);
    IPC::WriteParam(aWriter, (aVar).gpuProcessTextureId());
    // Sentinel = 'gpuProcessTextureId'
    (aWriter)->WriteSentinel(1319176138);
    IPC::WriteParam(aWriter, (aVar).format());
    // Sentinel = 'format'
    (aWriter)->WriteSentinel(148505226);
    IPC::WriteParam(aWriter, (aVar).size());
    // Sentinel = 'size'
    (aWriter)->WriteSentinel(73662908);
    IPC::WriteParam(aWriter, (aVar).colorSpace());
    // Sentinel = 'colorSpace'
    (aWriter)->WriteSentinel(378602508);
    IPC::WriteParam(aWriter, (aVar).colorRange());
    // Sentinel = 'colorRange'
    (aWriter)->WriteSentinel(377422861);
    IPC::WriteParam(aWriter, (aVar).transferFunction());
    // Sentinel = 'transferFunction'
    (aWriter)->WriteSentinel(953747116);
    IPC::WriteParam(aWriter, (aVar).hdrMetadata());
    // Sentinel = 'hdrMetadata'
    (aWriter)->WriteSentinel(439420000);
    IPC::WriteParam(aWriter, (aVar).hasKeyedMutex());
    // Sentinel = 'hasKeyedMutex'
    (aWriter)->WriteSentinel(606274882);
    IPC::WriteParam(aWriter, (aVar).fencesHolderId());
    // Sentinel = 'fencesHolderId'
    (aWriter)->WriteSentinel(701367680);
    (aWriter)->WriteBytes((&((aVar).arrayIndex())), 4);
    // Sentinel = 'arrayIndex'
    (aWriter)->WriteSentinel(376833048);
}

auto ParamTraits<::mozilla::layers::SurfaceDescriptorD3D10>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___handle = IPC::ReadParam<RefPtr<::mozilla::gfx::FileHandleWrapper>>(aReader);
    if (!maybe___handle) {
        aReader->FatalError("Error deserializing 'handle' (FileHandleWrapper) member of 'SurfaceDescriptorD3D10'");
        return {};

    }
    auto& _handle = *maybe___handle;
    // Sentinel = 'handle'
    if ((!((aReader)->ReadSentinel(142344813)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'handle' (FileHandleWrapper) member of 'SurfaceDescriptorD3D10'");
        return {};
    }
    auto maybe___gpuProcessTextureId = IPC::ReadParam<mozilla::Maybe<::mozilla::layers::GpuProcessTextureId>>(aReader);
    if (!maybe___gpuProcessTextureId) {
        aReader->FatalError("Error deserializing 'gpuProcessTextureId' (GpuProcessTextureId?) member of 'SurfaceDescriptorD3D10'");
        return {};

    }
    auto& _gpuProcessTextureId = *maybe___gpuProcessTextureId;
    // Sentinel = 'gpuProcessTextureId'
    if ((!((aReader)->ReadSentinel(1319176138)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'gpuProcessTextureId' (GpuProcessTextureId?) member of 'SurfaceDescriptorD3D10'");
        return {};
    }
    auto maybe___format = IPC::ReadParam<::mozilla::gfx::SurfaceFormat>(aReader);
    if (!maybe___format) {
        aReader->FatalError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorD3D10'");
        return {};

    }
    auto& _format = *maybe___format;
    // Sentinel = 'format'
    if ((!((aReader)->ReadSentinel(148505226)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorD3D10'");
        return {};
    }
    auto maybe___size = IPC::ReadParam<::mozilla::gfx::IntSize>(aReader);
    if (!maybe___size) {
        aReader->FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorD3D10'");
        return {};

    }
    auto& _size = *maybe___size;
    // Sentinel = 'size'
    if ((!((aReader)->ReadSentinel(73662908)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorD3D10'");
        return {};
    }
    auto maybe___colorSpace = IPC::ReadParam<::mozilla::gfx::ColorSpace2>(aReader);
    if (!maybe___colorSpace) {
        aReader->FatalError("Error deserializing 'colorSpace' (ColorSpace2) member of 'SurfaceDescriptorD3D10'");
        return {};

    }
    auto& _colorSpace = *maybe___colorSpace;
    // Sentinel = 'colorSpace'
    if ((!((aReader)->ReadSentinel(378602508)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'colorSpace' (ColorSpace2) member of 'SurfaceDescriptorD3D10'");
        return {};
    }
    auto maybe___colorRange = IPC::ReadParam<::mozilla::gfx::ColorRange>(aReader);
    if (!maybe___colorRange) {
        aReader->FatalError("Error deserializing 'colorRange' (ColorRange) member of 'SurfaceDescriptorD3D10'");
        return {};

    }
    auto& _colorRange = *maybe___colorRange;
    // Sentinel = 'colorRange'
    if ((!((aReader)->ReadSentinel(377422861)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'colorRange' (ColorRange) member of 'SurfaceDescriptorD3D10'");
        return {};
    }
    auto maybe___transferFunction = IPC::ReadParam<::mozilla::gfx::TransferFunction>(aReader);
    if (!maybe___transferFunction) {
        aReader->FatalError("Error deserializing 'transferFunction' (TransferFunction) member of 'SurfaceDescriptorD3D10'");
        return {};

    }
    auto& _transferFunction = *maybe___transferFunction;
    // Sentinel = 'transferFunction'
    if ((!((aReader)->ReadSentinel(953747116)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'transferFunction' (TransferFunction) member of 'SurfaceDescriptorD3D10'");
        return {};
    }
    auto maybe___hdrMetadata = IPC::ReadParam<mozilla::Maybe<::mozilla::gfx::HDRMetadata>>(aReader);
    if (!maybe___hdrMetadata) {
        aReader->FatalError("Error deserializing 'hdrMetadata' (HDRMetadata?) member of 'SurfaceDescriptorD3D10'");
        return {};

    }
    auto& _hdrMetadata = *maybe___hdrMetadata;
    // Sentinel = 'hdrMetadata'
    if ((!((aReader)->ReadSentinel(439420000)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'hdrMetadata' (HDRMetadata?) member of 'SurfaceDescriptorD3D10'");
        return {};
    }
    auto maybe___hasKeyedMutex = IPC::ReadParam<bool>(aReader);
    if (!maybe___hasKeyedMutex) {
        aReader->FatalError("Error deserializing 'hasKeyedMutex' (bool) member of 'SurfaceDescriptorD3D10'");
        return {};

    }
    auto& _hasKeyedMutex = *maybe___hasKeyedMutex;
    // Sentinel = 'hasKeyedMutex'
    if ((!((aReader)->ReadSentinel(606274882)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'hasKeyedMutex' (bool) member of 'SurfaceDescriptorD3D10'");
        return {};
    }
    auto maybe___fencesHolderId = IPC::ReadParam<mozilla::Maybe<::mozilla::layers::CompositeProcessFencesHolderId>>(aReader);
    if (!maybe___fencesHolderId) {
        aReader->FatalError("Error deserializing 'fencesHolderId' (CompositeProcessFencesHolderId?) member of 'SurfaceDescriptorD3D10'");
        return {};

    }
    auto& _fencesHolderId = *maybe___fencesHolderId;
    // Sentinel = 'fencesHolderId'
    if ((!((aReader)->ReadSentinel(701367680)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'fencesHolderId' (CompositeProcessFencesHolderId?) member of 'SurfaceDescriptorD3D10'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_handle),
            std::move(_gpuProcessTextureId),
            ::uint32_t{0},
            std::move(_format),
            std::move(_size),
            std::move(_colorSpace),
            std::move(_colorRange),
            std::move(_transferFunction),
            std::move(_hdrMetadata),
            std::move(_hasKeyedMutex),
            std::move(_fencesHolderId)};
    if ((!((aReader)->ReadBytesInto((&((result__)->arrayIndex())), 4)))) {
        aReader->FatalError("Error bulk reading fields from uint32_t");
        return {};
    }
    // Sentinel = 'arrayIndex'
    if ((!((aReader)->ReadSentinel(376833048)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint32_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct SurfaceDescriptorDXGIYCbCr|
//
namespace mozilla {
namespace layers {
auto SurfaceDescriptorDXGIYCbCr::operator==(const SurfaceDescriptorDXGIYCbCr& _o) const -> bool
{
    if ((!((handleY()) == ((_o).handleY())))) {
        return false;
    }
    if ((!((handleCb()) == ((_o).handleCb())))) {
        return false;
    }
    if ((!((handleCr()) == ((_o).handleCr())))) {
        return false;
    }
    if ((!((size()) == ((_o).size())))) {
        return false;
    }
    if ((!((sizeY()) == ((_o).sizeY())))) {
        return false;
    }
    if ((!((sizeCbCr()) == ((_o).sizeCbCr())))) {
        return false;
    }
    if ((!((colorDepth()) == ((_o).colorDepth())))) {
        return false;
    }
    if ((!((yUVColorSpace()) == ((_o).yUVColorSpace())))) {
        return false;
    }
    if ((!((colorRange()) == ((_o).colorRange())))) {
        return false;
    }
    if ((!((transferFunction()) == ((_o).transferFunction())))) {
        return false;
    }
    if ((!((fencesHolderId()) == ((_o).fencesHolderId())))) {
        return false;
    }
    return true;
}

auto SurfaceDescriptorDXGIYCbCr::operator!=(const SurfaceDescriptorDXGIYCbCr& _o) const -> bool
{
    return (!(operator==(_o)));
}

} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::SurfaceDescriptorDXGIYCbCr>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).handleY());
    // Sentinel = 'handleY'
    (aWriter)->WriteSentinel(188875462);
    IPC::WriteParam(aWriter, (aVar).handleCb());
    // Sentinel = 'handleCb'
    (aWriter)->WriteSentinel(238945042);
    IPC::WriteParam(aWriter, (aVar).handleCr());
    // Sentinel = 'handleCr'
    (aWriter)->WriteSentinel(239993634);
    IPC::WriteParam(aWriter, (aVar).size());
    // Sentinel = 'size'
    (aWriter)->WriteSentinel(73662908);
    IPC::WriteParam(aWriter, (aVar).sizeY());
    // Sentinel = 'sizeY'
    (aWriter)->WriteSentinel(108593685);
    IPC::WriteParam(aWriter, (aVar).sizeCbCr());
    // Sentinel = 'sizeCbCr'
    (aWriter)->WriteSentinel(243139350);
    IPC::WriteParam(aWriter, (aVar).colorDepth());
    // Sentinel = 'colorDepth'
    (aWriter)->WriteSentinel(376177685);
    IPC::WriteParam(aWriter, (aVar).yUVColorSpace());
    // Sentinel = 'yUVColorSpace'
    (aWriter)->WriteSentinel(589759760);
    IPC::WriteParam(aWriter, (aVar).colorRange());
    // Sentinel = 'colorRange'
    (aWriter)->WriteSentinel(377422861);
    IPC::WriteParam(aWriter, (aVar).transferFunction());
    // Sentinel = 'transferFunction'
    (aWriter)->WriteSentinel(953747116);
    IPC::WriteParam(aWriter, (aVar).fencesHolderId());
    // Sentinel = 'fencesHolderId'
    (aWriter)->WriteSentinel(701367680);
}

auto ParamTraits<::mozilla::layers::SurfaceDescriptorDXGIYCbCr>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___handleY = IPC::ReadParam<RefPtr<::mozilla::gfx::FileHandleWrapper>>(aReader);
    if (!maybe___handleY) {
        aReader->FatalError("Error deserializing 'handleY' (FileHandleWrapper) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};

    }
    auto& _handleY = *maybe___handleY;
    // Sentinel = 'handleY'
    if ((!((aReader)->ReadSentinel(188875462)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'handleY' (FileHandleWrapper) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};
    }
    auto maybe___handleCb = IPC::ReadParam<RefPtr<::mozilla::gfx::FileHandleWrapper>>(aReader);
    if (!maybe___handleCb) {
        aReader->FatalError("Error deserializing 'handleCb' (FileHandleWrapper) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};

    }
    auto& _handleCb = *maybe___handleCb;
    // Sentinel = 'handleCb'
    if ((!((aReader)->ReadSentinel(238945042)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'handleCb' (FileHandleWrapper) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};
    }
    auto maybe___handleCr = IPC::ReadParam<RefPtr<::mozilla::gfx::FileHandleWrapper>>(aReader);
    if (!maybe___handleCr) {
        aReader->FatalError("Error deserializing 'handleCr' (FileHandleWrapper) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};

    }
    auto& _handleCr = *maybe___handleCr;
    // Sentinel = 'handleCr'
    if ((!((aReader)->ReadSentinel(239993634)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'handleCr' (FileHandleWrapper) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};
    }
    auto maybe___size = IPC::ReadParam<::mozilla::gfx::IntSize>(aReader);
    if (!maybe___size) {
        aReader->FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};

    }
    auto& _size = *maybe___size;
    // Sentinel = 'size'
    if ((!((aReader)->ReadSentinel(73662908)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};
    }
    auto maybe___sizeY = IPC::ReadParam<::mozilla::gfx::IntSize>(aReader);
    if (!maybe___sizeY) {
        aReader->FatalError("Error deserializing 'sizeY' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};

    }
    auto& _sizeY = *maybe___sizeY;
    // Sentinel = 'sizeY'
    if ((!((aReader)->ReadSentinel(108593685)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'sizeY' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};
    }
    auto maybe___sizeCbCr = IPC::ReadParam<::mozilla::gfx::IntSize>(aReader);
    if (!maybe___sizeCbCr) {
        aReader->FatalError("Error deserializing 'sizeCbCr' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};

    }
    auto& _sizeCbCr = *maybe___sizeCbCr;
    // Sentinel = 'sizeCbCr'
    if ((!((aReader)->ReadSentinel(243139350)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'sizeCbCr' (IntSize) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};
    }
    auto maybe___colorDepth = IPC::ReadParam<::mozilla::gfx::ColorDepth>(aReader);
    if (!maybe___colorDepth) {
        aReader->FatalError("Error deserializing 'colorDepth' (ColorDepth) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};

    }
    auto& _colorDepth = *maybe___colorDepth;
    // Sentinel = 'colorDepth'
    if ((!((aReader)->ReadSentinel(376177685)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'colorDepth' (ColorDepth) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};
    }
    auto maybe___yUVColorSpace = IPC::ReadParam<::mozilla::gfx::YUVColorSpace>(aReader);
    if (!maybe___yUVColorSpace) {
        aReader->FatalError("Error deserializing 'yUVColorSpace' (YUVColorSpace) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};

    }
    auto& _yUVColorSpace = *maybe___yUVColorSpace;
    // Sentinel = 'yUVColorSpace'
    if ((!((aReader)->ReadSentinel(589759760)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'yUVColorSpace' (YUVColorSpace) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};
    }
    auto maybe___colorRange = IPC::ReadParam<::mozilla::gfx::ColorRange>(aReader);
    if (!maybe___colorRange) {
        aReader->FatalError("Error deserializing 'colorRange' (ColorRange) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};

    }
    auto& _colorRange = *maybe___colorRange;
    // Sentinel = 'colorRange'
    if ((!((aReader)->ReadSentinel(377422861)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'colorRange' (ColorRange) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};
    }
    auto maybe___transferFunction = IPC::ReadParam<::mozilla::gfx::TransferFunction>(aReader);
    if (!maybe___transferFunction) {
        aReader->FatalError("Error deserializing 'transferFunction' (TransferFunction) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};

    }
    auto& _transferFunction = *maybe___transferFunction;
    // Sentinel = 'transferFunction'
    if ((!((aReader)->ReadSentinel(953747116)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'transferFunction' (TransferFunction) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};
    }
    auto maybe___fencesHolderId = IPC::ReadParam<::mozilla::layers::CompositeProcessFencesHolderId>(aReader);
    if (!maybe___fencesHolderId) {
        aReader->FatalError("Error deserializing 'fencesHolderId' (CompositeProcessFencesHolderId) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};

    }
    auto& _fencesHolderId = *maybe___fencesHolderId;
    // Sentinel = 'fencesHolderId'
    if ((!((aReader)->ReadSentinel(701367680)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'fencesHolderId' (CompositeProcessFencesHolderId) member of 'SurfaceDescriptorDXGIYCbCr'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_handleY),
            std::move(_handleCb),
            std::move(_handleCr),
            std::move(_size),
            std::move(_sizeY),
            std::move(_sizeCbCr),
            std::move(_colorDepth),
            std::move(_yUVColorSpace),
            std::move(_colorRange),
            std::move(_transferFunction),
            std::move(_fencesHolderId)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct SurfaceDescriptorMacIOSurface|
//
namespace mozilla {
namespace layers {
auto SurfaceDescriptorMacIOSurface::operator==(const SurfaceDescriptorMacIOSurface& _o) const -> bool
{
    if ((!((surfaceId()) == ((_o).surfaceId())))) {
        return false;
    }
    if ((!((isOpaque()) == ((_o).isOpaque())))) {
        return false;
    }
    if ((!((yUVColorSpace()) == ((_o).yUVColorSpace())))) {
        return false;
    }
    if ((!((transferFunction()) == ((_o).transferFunction())))) {
        return false;
    }
    if ((!((fencesHolderId()) == ((_o).fencesHolderId())))) {
        return false;
    }
    return true;
}

auto SurfaceDescriptorMacIOSurface::operator!=(const SurfaceDescriptorMacIOSurface& _o) const -> bool
{
    return (!(operator==(_o)));
}

} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::SurfaceDescriptorMacIOSurface>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).isOpaque());
    // Sentinel = 'isOpaque'
    (aWriter)->WriteSentinel(245695304);
    IPC::WriteParam(aWriter, (aVar).yUVColorSpace());
    // Sentinel = 'yUVColorSpace'
    (aWriter)->WriteSentinel(589759760);
    IPC::WriteParam(aWriter, (aVar).transferFunction());
    // Sentinel = 'transferFunction'
    (aWriter)->WriteSentinel(953747116);
    IPC::WriteParam(aWriter, (aVar).fencesHolderId());
    // Sentinel = 'fencesHolderId'
    (aWriter)->WriteSentinel(701367680);
    (aWriter)->WriteBytes((&((aVar).surfaceId())), 4);
    // Sentinel = 'surfaceId'
    (aWriter)->WriteSentinel(315884439);
}

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

    }
    auto& _isOpaque = *maybe___isOpaque;
    // Sentinel = 'isOpaque'
    if ((!((aReader)->ReadSentinel(245695304)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'isOpaque' (bool) member of 'SurfaceDescriptorMacIOSurface'");
        return {};
    }
    auto maybe___yUVColorSpace = IPC::ReadParam<::mozilla::gfx::YUVColorSpace>(aReader);
    if (!maybe___yUVColorSpace) {
        aReader->FatalError("Error deserializing 'yUVColorSpace' (YUVColorSpace) member of 'SurfaceDescriptorMacIOSurface'");
        return {};

    }
    auto& _yUVColorSpace = *maybe___yUVColorSpace;
    // Sentinel = 'yUVColorSpace'
    if ((!((aReader)->ReadSentinel(589759760)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'yUVColorSpace' (YUVColorSpace) member of 'SurfaceDescriptorMacIOSurface'");
        return {};
    }
    auto maybe___transferFunction = IPC::ReadParam<::mozilla::gfx::TransferFunction>(aReader);
    if (!maybe___transferFunction) {
        aReader->FatalError("Error deserializing 'transferFunction' (TransferFunction) member of 'SurfaceDescriptorMacIOSurface'");
        return {};

    }
    auto& _transferFunction = *maybe___transferFunction;
    // Sentinel = 'transferFunction'
    if ((!((aReader)->ReadSentinel(953747116)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'transferFunction' (TransferFunction) member of 'SurfaceDescriptorMacIOSurface'");
        return {};
    }
    auto maybe___fencesHolderId = IPC::ReadParam<mozilla::Maybe<::mozilla::layers::CompositeProcessFencesHolderId>>(aReader);
    if (!maybe___fencesHolderId) {
        aReader->FatalError("Error deserializing 'fencesHolderId' (CompositeProcessFencesHolderId?) member of 'SurfaceDescriptorMacIOSurface'");
        return {};

    }
    auto& _fencesHolderId = *maybe___fencesHolderId;
    // Sentinel = 'fencesHolderId'
    if ((!((aReader)->ReadSentinel(701367680)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'fencesHolderId' (CompositeProcessFencesHolderId?) member of 'SurfaceDescriptorMacIOSurface'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            ::uint32_t{0},
            std::move(_isOpaque),
            std::move(_yUVColorSpace),
            std::move(_transferFunction),
            std::move(_fencesHolderId)};
    if ((!((aReader)->ReadBytesInto((&((result__)->surfaceId())), 4)))) {
        aReader->FatalError("Error bulk reading fields from uint32_t");
        return {};
    }
    // Sentinel = 'surfaceId'
    if ((!((aReader)->ReadSentinel(315884439)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint32_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct SurfaceDescriptorDMABuf|
//
namespace mozilla {
namespace layers {
auto SurfaceDescriptorDMABuf::operator==(const SurfaceDescriptorDMABuf& _o) const -> bool
{
    if ((!((bufferType()) == ((_o).bufferType())))) {
        return false;
    }
    if ((!((fourccFormat()) == ((_o).fourccFormat())))) {
        return false;
    }
    if ((!((modifier()) == ((_o).modifier())))) {
        return false;
    }
    if ((!((flags()) == ((_o).flags())))) {
        return false;
    }
    if ((!((fds()) == ((_o).fds())))) {
        return false;
    }
    if ((!((width()) == ((_o).width())))) {
        return false;
    }
    if ((!((height()) == ((_o).height())))) {
        return false;
    }
    if ((!((widthAligned()) == ((_o).widthAligned())))) {
        return false;
    }
    if ((!((heightAligned()) == ((_o).heightAligned())))) {
        return false;
    }
    if ((!((format()) == ((_o).format())))) {
        return false;
    }
    if ((!((strides()) == ((_o).strides())))) {
        return false;
    }
    if ((!((offsets()) == ((_o).offsets())))) {
        return false;
    }
    if ((!((yUVColorSpace()) == ((_o).yUVColorSpace())))) {
        return false;
    }
    if ((!((colorRange()) == ((_o).colorRange())))) {
        return false;
    }
    if ((!((colorPrimaries()) == ((_o).colorPrimaries())))) {
        return false;
    }
    if ((!((transferFunction()) == ((_o).transferFunction())))) {
        return false;
    }
    if ((!((chromaLocation()) == ((_o).chromaLocation())))) {
        return false;
    }
    if ((!((fence()) == ((_o).fence())))) {
        return false;
    }
    if ((!((uid()) == ((_o).uid())))) {
        return false;
    }
    if ((!((pid()) == ((_o).pid())))) {
        return false;
    }
    if ((!((refCount()) == ((_o).refCount())))) {
        return false;
    }
    if ((!((semaphoreFd()) == ((_o).semaphoreFd())))) {
        return false;
    }
    if ((!((semaphoreFdIsSyncFd()) == ((_o).semaphoreFdIsSyncFd())))) {
        return false;
    }
    if ((!((hdrMetadata()) == ((_o).hdrMetadata())))) {
        return false;
    }
    return true;
}

auto SurfaceDescriptorDMABuf::operator!=(const SurfaceDescriptorDMABuf& _o) const -> bool
{
    return (!(operator==(_o)));
}

auto SurfaceDescriptorDMABuf::StaticAssertions() const -> void
{
    static_assert(
        (offsetof(SurfaceDescriptorDMABuf, pid_) - offsetof(SurfaceDescriptorDMABuf, bufferType_)) == 20,
        "Bad assumptions about field layout!");
}

} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::SurfaceDescriptorDMABuf>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).modifier());
    // Sentinel = 'modifier'
    (aWriter)->WriteSentinel(250413904);
    IPC::WriteParam(aWriter, (aVar).fds());
    // Sentinel = 'fds'
    (aWriter)->WriteSentinel(40894782);
    IPC::WriteParam(aWriter, (aVar).width());
    // Sentinel = 'width'
    (aWriter)->WriteSentinel(108528161);
    IPC::WriteParam(aWriter, (aVar).height());
    // Sentinel = 'height'
    (aWriter)->WriteSentinel(143393402);
    IPC::WriteParam(aWriter, (aVar).widthAligned());
    // Sentinel = 'widthAligned'
    (aWriter)->WriteSentinel(533660885);
    IPC::WriteParam(aWriter, (aVar).heightAligned());
    // Sentinel = 'heightAligned'
    (aWriter)->WriteSentinel(609355054);
    IPC::WriteParam(aWriter, (aVar).format());
    // Sentinel = 'format'
    (aWriter)->WriteSentinel(148505226);
    IPC::WriteParam(aWriter, (aVar).strides());
    // Sentinel = 'strides'
    (aWriter)->WriteSentinel(204145407);
    IPC::WriteParam(aWriter, (aVar).offsets());
    // Sentinel = 'offsets'
    (aWriter)->WriteSentinel(197657339);
    IPC::WriteParam(aWriter, (aVar).yUVColorSpace());
    // Sentinel = 'yUVColorSpace'
    (aWriter)->WriteSentinel(589759760);
    IPC::WriteParam(aWriter, (aVar).colorRange());
    // Sentinel = 'colorRange'
    (aWriter)->WriteSentinel(377422861);
    IPC::WriteParam(aWriter, (aVar).colorPrimaries());
    // Sentinel = 'colorPrimaries'
    (aWriter)->WriteSentinel(727057868);
    IPC::WriteParam(aWriter, (aVar).transferFunction());
    // Sentinel = 'transferFunction'
    (aWriter)->WriteSentinel(953747116);
    IPC::WriteParam(aWriter, (aVar).fence());
    // Sentinel = 'fence'
    (aWriter)->WriteSentinel(101450242);
    IPC::WriteParam(aWriter, (aVar).refCount());
    // Sentinel = 'refCount'
    (aWriter)->WriteSentinel(242811719);
    IPC::WriteParam(aWriter, (aVar).semaphoreFd());
    // Sentinel = 'semaphoreFd'
    (aWriter)->WriteSentinel(459080815);
    IPC::WriteParam(aWriter, (aVar).semaphoreFdIsSyncFd());
    // Sentinel = 'semaphoreFdIsSyncFd'
    (aWriter)->WriteSentinel(1281492850);
    IPC::WriteParam(aWriter, (aVar).hdrMetadata());
    // Sentinel = 'hdrMetadata'
    (aWriter)->WriteSentinel(439420000);
    (aWriter)->WriteBytes((&((aVar).bufferType())), 24);
    // Sentinel = 'bufferType | fourccFormat | flags | chromaLocation | uid | pid'
    (aWriter)->WriteSentinel(3754104563);
}

auto ParamTraits<::mozilla::layers::SurfaceDescriptorDMABuf>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___modifier = IPC::ReadParam<nsTArray<::uint64_t>>(aReader);
    if (!maybe___modifier) {
        aReader->FatalError("Error deserializing 'modifier' (uint64_t[]) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _modifier = *maybe___modifier;
    // Sentinel = 'modifier'
    if ((!((aReader)->ReadSentinel(250413904)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'modifier' (uint64_t[]) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    auto maybe___fds = IPC::ReadParam<nsTArray<mozilla::NotNull<RefPtr<::mozilla::gfx::FileHandleWrapper>>>>(aReader);
    if (!maybe___fds) {
        aReader->FatalError("Error deserializing 'fds' (NotNull<FileHandleWrapper>[]) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _fds = *maybe___fds;
    // Sentinel = 'fds'
    if ((!((aReader)->ReadSentinel(40894782)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'fds' (NotNull<FileHandleWrapper>[]) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    auto maybe___width = IPC::ReadParam<nsTArray<::uint32_t>>(aReader);
    if (!maybe___width) {
        aReader->FatalError("Error deserializing 'width' (uint32_t[]) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _width = *maybe___width;
    // Sentinel = 'width'
    if ((!((aReader)->ReadSentinel(108528161)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'width' (uint32_t[]) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    auto maybe___height = IPC::ReadParam<nsTArray<::uint32_t>>(aReader);
    if (!maybe___height) {
        aReader->FatalError("Error deserializing 'height' (uint32_t[]) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _height = *maybe___height;
    // Sentinel = 'height'
    if ((!((aReader)->ReadSentinel(143393402)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'height' (uint32_t[]) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    auto maybe___widthAligned = IPC::ReadParam<nsTArray<::uint32_t>>(aReader);
    if (!maybe___widthAligned) {
        aReader->FatalError("Error deserializing 'widthAligned' (uint32_t[]) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _widthAligned = *maybe___widthAligned;
    // Sentinel = 'widthAligned'
    if ((!((aReader)->ReadSentinel(533660885)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'widthAligned' (uint32_t[]) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    auto maybe___heightAligned = IPC::ReadParam<nsTArray<::uint32_t>>(aReader);
    if (!maybe___heightAligned) {
        aReader->FatalError("Error deserializing 'heightAligned' (uint32_t[]) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _heightAligned = *maybe___heightAligned;
    // Sentinel = 'heightAligned'
    if ((!((aReader)->ReadSentinel(609355054)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'heightAligned' (uint32_t[]) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    auto maybe___format = IPC::ReadParam<nsTArray<::uint32_t>>(aReader);
    if (!maybe___format) {
        aReader->FatalError("Error deserializing 'format' (uint32_t[]) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _format = *maybe___format;
    // Sentinel = 'format'
    if ((!((aReader)->ReadSentinel(148505226)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'format' (uint32_t[]) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    auto maybe___strides = IPC::ReadParam<nsTArray<::uint32_t>>(aReader);
    if (!maybe___strides) {
        aReader->FatalError("Error deserializing 'strides' (uint32_t[]) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _strides = *maybe___strides;
    // Sentinel = 'strides'
    if ((!((aReader)->ReadSentinel(204145407)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'strides' (uint32_t[]) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    auto maybe___offsets = IPC::ReadParam<nsTArray<::uint32_t>>(aReader);
    if (!maybe___offsets) {
        aReader->FatalError("Error deserializing 'offsets' (uint32_t[]) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _offsets = *maybe___offsets;
    // Sentinel = 'offsets'
    if ((!((aReader)->ReadSentinel(197657339)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'offsets' (uint32_t[]) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    auto maybe___yUVColorSpace = IPC::ReadParam<::mozilla::gfx::YUVColorSpace>(aReader);
    if (!maybe___yUVColorSpace) {
        aReader->FatalError("Error deserializing 'yUVColorSpace' (YUVColorSpace) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _yUVColorSpace = *maybe___yUVColorSpace;
    // Sentinel = 'yUVColorSpace'
    if ((!((aReader)->ReadSentinel(589759760)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'yUVColorSpace' (YUVColorSpace) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    auto maybe___colorRange = IPC::ReadParam<::mozilla::gfx::ColorRange>(aReader);
    if (!maybe___colorRange) {
        aReader->FatalError("Error deserializing 'colorRange' (ColorRange) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _colorRange = *maybe___colorRange;
    // Sentinel = 'colorRange'
    if ((!((aReader)->ReadSentinel(377422861)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'colorRange' (ColorRange) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    auto maybe___colorPrimaries = IPC::ReadParam<::mozilla::gfx::ColorSpace2>(aReader);
    if (!maybe___colorPrimaries) {
        aReader->FatalError("Error deserializing 'colorPrimaries' (ColorSpace2) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _colorPrimaries = *maybe___colorPrimaries;
    // Sentinel = 'colorPrimaries'
    if ((!((aReader)->ReadSentinel(727057868)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'colorPrimaries' (ColorSpace2) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    auto maybe___transferFunction = IPC::ReadParam<::mozilla::gfx::TransferFunction>(aReader);
    if (!maybe___transferFunction) {
        aReader->FatalError("Error deserializing 'transferFunction' (TransferFunction) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _transferFunction = *maybe___transferFunction;
    // Sentinel = 'transferFunction'
    if ((!((aReader)->ReadSentinel(953747116)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'transferFunction' (TransferFunction) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    auto maybe___fence = IPC::ReadParam<nsTArray<mozilla::NotNull<RefPtr<::mozilla::gfx::FileHandleWrapper>>>>(aReader);
    if (!maybe___fence) {
        aReader->FatalError("Error deserializing 'fence' (NotNull<FileHandleWrapper>[]) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _fence = *maybe___fence;
    // Sentinel = 'fence'
    if ((!((aReader)->ReadSentinel(101450242)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'fence' (NotNull<FileHandleWrapper>[]) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    auto maybe___refCount = IPC::ReadParam<nsTArray<::mozilla::ipc::FileDescriptor>>(aReader);
    if (!maybe___refCount) {
        aReader->FatalError("Error deserializing 'refCount' (FileDescriptor[]) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _refCount = *maybe___refCount;
    // Sentinel = 'refCount'
    if ((!((aReader)->ReadSentinel(242811719)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'refCount' (FileDescriptor[]) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    auto maybe___semaphoreFd = IPC::ReadParam<RefPtr<::mozilla::gfx::FileHandleWrapper>>(aReader);
    if (!maybe___semaphoreFd) {
        aReader->FatalError("Error deserializing 'semaphoreFd' (FileHandleWrapper) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _semaphoreFd = *maybe___semaphoreFd;
    // Sentinel = 'semaphoreFd'
    if ((!((aReader)->ReadSentinel(459080815)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'semaphoreFd' (FileHandleWrapper) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    auto maybe___semaphoreFdIsSyncFd = IPC::ReadParam<bool>(aReader);
    if (!maybe___semaphoreFdIsSyncFd) {
        aReader->FatalError("Error deserializing 'semaphoreFdIsSyncFd' (bool) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _semaphoreFdIsSyncFd = *maybe___semaphoreFdIsSyncFd;
    // Sentinel = 'semaphoreFdIsSyncFd'
    if ((!((aReader)->ReadSentinel(1281492850)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'semaphoreFdIsSyncFd' (bool) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    auto maybe___hdrMetadata = IPC::ReadParam<::mozilla::gfx::HDRMetadata>(aReader);
    if (!maybe___hdrMetadata) {
        aReader->FatalError("Error deserializing 'hdrMetadata' (HDRMetadata) member of 'SurfaceDescriptorDMABuf'");
        return {};

    }
    auto& _hdrMetadata = *maybe___hdrMetadata;
    // Sentinel = 'hdrMetadata'
    if ((!((aReader)->ReadSentinel(439420000)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'hdrMetadata' (HDRMetadata) member of 'SurfaceDescriptorDMABuf'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            ::uint32_t{0},
            ::uint32_t{0},
            std::move(_modifier),
            ::uint32_t{0},
            std::move(_fds),
            std::move(_width),
            std::move(_height),
            std::move(_widthAligned),
            std::move(_heightAligned),
            std::move(_format),
            std::move(_strides),
            std::move(_offsets),
            std::move(_yUVColorSpace),
            std::move(_colorRange),
            std::move(_colorPrimaries),
            std::move(_transferFunction),
            ::uint32_t{0},
            std::move(_fence),
            ::uint32_t{0},
            ::uint32_t{0},
            std::move(_refCount),
            std::move(_semaphoreFd),
            std::move(_semaphoreFdIsSyncFd),
            std::move(_hdrMetadata)};
    if ((!((aReader)->ReadBytesInto((&((result__)->bufferType())), 24)))) {
        aReader->FatalError("Error bulk reading fields from uint32_t");
        return {};
    }
    // Sentinel = 'bufferType | fourccFormat | flags | chromaLocation | uid | pid'
    if ((!((aReader)->ReadSentinel(3754104563)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint32_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct SurfaceTextureDescriptor|
//
namespace mozilla {
namespace layers {
auto SurfaceTextureDescriptor::operator==(const SurfaceTextureDescriptor& _o) const -> bool
{
    if ((!((handle()) == ((_o).handle())))) {
        return false;
    }
    if ((!((size()) == ((_o).size())))) {
        return false;
    }
    if ((!((format()) == ((_o).format())))) {
        return false;
    }
    if ((!((continuous()) == ((_o).continuous())))) {
        return false;
    }
    if ((!((forceBT709ColorSpace()) == ((_o).forceBT709ColorSpace())))) {
        return false;
    }
    if ((!((transformOverride()) == ((_o).transformOverride())))) {
        return false;
    }
    return true;
}

auto SurfaceTextureDescriptor::operator!=(const SurfaceTextureDescriptor& _o) const -> bool
{
    return (!(operator==(_o)));
}

} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::SurfaceTextureDescriptor>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).size());
    // Sentinel = 'size'
    (aWriter)->WriteSentinel(73662908);
    IPC::WriteParam(aWriter, (aVar).format());
    // Sentinel = 'format'
    (aWriter)->WriteSentinel(148505226);
    IPC::WriteParam(aWriter, (aVar).continuous());
    // Sentinel = 'continuous'
    (aWriter)->WriteSentinel(394593368);
    IPC::WriteParam(aWriter, (aVar).forceBT709ColorSpace());
    // Sentinel = 'forceBT709ColorSpace'
    (aWriter)->WriteSentinel(1248528177);
    IPC::WriteParam(aWriter, (aVar).transformOverride());
    // Sentinel = 'transformOverride'
    (aWriter)->WriteSentinel(1086261021);
    (aWriter)->WriteBytes((&((aVar).handle())), 8);
    // Sentinel = 'handle'
    (aWriter)->WriteSentinel(142344813);
}

auto ParamTraits<::mozilla::layers::SurfaceTextureDescriptor>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___size = IPC::ReadParam<::mozilla::gfx::IntSize>(aReader);
    if (!maybe___size) {
        aReader->FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceTextureDescriptor'");
        return {};

    }
    auto& _size = *maybe___size;
    // Sentinel = 'size'
    if ((!((aReader)->ReadSentinel(73662908)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceTextureDescriptor'");
        return {};
    }
    auto maybe___format = IPC::ReadParam<::mozilla::gfx::SurfaceFormat>(aReader);
    if (!maybe___format) {
        aReader->FatalError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceTextureDescriptor'");
        return {};

    }
    auto& _format = *maybe___format;
    // Sentinel = 'format'
    if ((!((aReader)->ReadSentinel(148505226)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceTextureDescriptor'");
        return {};
    }
    auto maybe___continuous = IPC::ReadParam<bool>(aReader);
    if (!maybe___continuous) {
        aReader->FatalError("Error deserializing 'continuous' (bool) member of 'SurfaceTextureDescriptor'");
        return {};

    }
    auto& _continuous = *maybe___continuous;
    // Sentinel = 'continuous'
    if ((!((aReader)->ReadSentinel(394593368)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'continuous' (bool) member of 'SurfaceTextureDescriptor'");
        return {};
    }
    auto maybe___forceBT709ColorSpace = IPC::ReadParam<bool>(aReader);
    if (!maybe___forceBT709ColorSpace) {
        aReader->FatalError("Error deserializing 'forceBT709ColorSpace' (bool) member of 'SurfaceTextureDescriptor'");
        return {};

    }
    auto& _forceBT709ColorSpace = *maybe___forceBT709ColorSpace;
    // Sentinel = 'forceBT709ColorSpace'
    if ((!((aReader)->ReadSentinel(1248528177)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'forceBT709ColorSpace' (bool) member of 'SurfaceTextureDescriptor'");
        return {};
    }
    auto maybe___transformOverride = IPC::ReadParam<mozilla::Maybe<::mozilla::gfx::Matrix4x4>>(aReader);
    if (!maybe___transformOverride) {
        aReader->FatalError("Error deserializing 'transformOverride' (Matrix4x4?) member of 'SurfaceTextureDescriptor'");
        return {};

    }
    auto& _transformOverride = *maybe___transformOverride;
    // Sentinel = 'transformOverride'
    if ((!((aReader)->ReadSentinel(1086261021)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'transformOverride' (Matrix4x4?) member of 'SurfaceTextureDescriptor'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            ::uint64_t{0},
            std::move(_size),
            std::move(_format),
            std::move(_continuous),
            std::move(_forceBT709ColorSpace),
            std::move(_transformOverride)};
    if ((!((aReader)->ReadBytesInto((&((result__)->handle())), 8)))) {
        aReader->FatalError("Error bulk reading fields from uint64_t");
        return {};
    }
    // Sentinel = 'handle'
    if ((!((aReader)->ReadSentinel(142344813)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint64_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct SurfaceDescriptorAndroidHardwareBuffer|
//
namespace mozilla {
namespace layers {
auto SurfaceDescriptorAndroidHardwareBuffer::operator==(const SurfaceDescriptorAndroidHardwareBuffer& _o) const -> bool
{
    if ((!((bufferId()) == ((_o).bufferId())))) {
        return false;
    }
    if ((!((size()) == ((_o).size())))) {
        return false;
    }
    if ((!((format()) == ((_o).format())))) {
        return false;
    }
    return true;
}

auto SurfaceDescriptorAndroidHardwareBuffer::operator!=(const SurfaceDescriptorAndroidHardwareBuffer& _o) const -> bool
{
    return (!(operator==(_o)));
}

} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::SurfaceDescriptorAndroidHardwareBuffer>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).size());
    // Sentinel = 'size'
    (aWriter)->WriteSentinel(73662908);
    IPC::WriteParam(aWriter, (aVar).format());
    // Sentinel = 'format'
    (aWriter)->WriteSentinel(148505226);
    (aWriter)->WriteBytes((&((aVar).bufferId())), 8);
    // Sentinel = 'bufferId'
    (aWriter)->WriteSentinel(244122408);
}

auto ParamTraits<::mozilla::layers::SurfaceDescriptorAndroidHardwareBuffer>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___size = IPC::ReadParam<::mozilla::gfx::IntSize>(aReader);
    if (!maybe___size) {
        aReader->FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorAndroidHardwareBuffer'");
        return {};

    }
    auto& _size = *maybe___size;
    // Sentinel = 'size'
    if ((!((aReader)->ReadSentinel(73662908)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorAndroidHardwareBuffer'");
        return {};
    }
    auto maybe___format = IPC::ReadParam<::mozilla::gfx::SurfaceFormat>(aReader);
    if (!maybe___format) {
        aReader->FatalError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorAndroidHardwareBuffer'");
        return {};

    }
    auto& _format = *maybe___format;
    // Sentinel = 'format'
    if ((!((aReader)->ReadSentinel(148505226)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorAndroidHardwareBuffer'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            ::uint64_t{0},
            std::move(_size),
            std::move(_format)};
    if ((!((aReader)->ReadBytesInto((&((result__)->bufferId())), 8)))) {
        aReader->FatalError("Error bulk reading fields from uint64_t");
        return {};
    }
    // Sentinel = 'bufferId'
    if ((!((aReader)->ReadSentinel(244122408)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint64_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct AndroidImageReaderImageDescriptor|
//
namespace mozilla {
namespace layers {
auto AndroidImageReaderImageDescriptor::operator==(const AndroidImageReaderImageDescriptor& _o) const -> bool
{
    if ((!((imageReaderId()) == ((_o).imageReaderId())))) {
        return false;
    }
    if ((!((frameId()) == ((_o).frameId())))) {
        return false;
    }
    if ((!((size()) == ((_o).size())))) {
        return false;
    }
    if ((!((format()) == ((_o).format())))) {
        return false;
    }
    return true;
}

auto AndroidImageReaderImageDescriptor::operator!=(const AndroidImageReaderImageDescriptor& _o) const -> bool
{
    return (!(operator==(_o)));
}

} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::AndroidImageReaderImageDescriptor>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).imageReaderId());
    // Sentinel = 'imageReaderId'
    (aWriter)->WriteSentinel(598279428);
    IPC::WriteParam(aWriter, (aVar).frameId());
    // Sentinel = 'frameId'
    (aWriter)->WriteSentinel(188416697);
    IPC::WriteParam(aWriter, (aVar).size());
    // Sentinel = 'size'
    (aWriter)->WriteSentinel(73662908);
    IPC::WriteParam(aWriter, (aVar).format());
    // Sentinel = 'format'
    (aWriter)->WriteSentinel(148505226);
}

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

    }
    auto& _imageReaderId = *maybe___imageReaderId;
    // Sentinel = 'imageReaderId'
    if ((!((aReader)->ReadSentinel(598279428)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'imageReaderId' (GpuProcessAndroidImageReaderId) member of 'AndroidImageReaderImageDescriptor'");
        return {};
    }
    auto maybe___frameId = IPC::ReadParam<::mozilla::layers::AndroidMediaCodecFrameId>(aReader);
    if (!maybe___frameId) {
        aReader->FatalError("Error deserializing 'frameId' (AndroidMediaCodecFrameId) member of 'AndroidImageReaderImageDescriptor'");
        return {};

    }
    auto& _frameId = *maybe___frameId;
    // Sentinel = 'frameId'
    if ((!((aReader)->ReadSentinel(188416697)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'frameId' (AndroidMediaCodecFrameId) member of 'AndroidImageReaderImageDescriptor'");
        return {};
    }
    auto maybe___size = IPC::ReadParam<::mozilla::gfx::IntSize>(aReader);
    if (!maybe___size) {
        aReader->FatalError("Error deserializing 'size' (IntSize) member of 'AndroidImageReaderImageDescriptor'");
        return {};

    }
    auto& _size = *maybe___size;
    // Sentinel = 'size'
    if ((!((aReader)->ReadSentinel(73662908)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'AndroidImageReaderImageDescriptor'");
        return {};
    }
    auto maybe___format = IPC::ReadParam<::mozilla::gfx::SurfaceFormat>(aReader);
    if (!maybe___format) {
        aReader->FatalError("Error deserializing 'format' (SurfaceFormat) member of 'AndroidImageReaderImageDescriptor'");
        return {};

    }
    auto& _format = *maybe___format;
    // Sentinel = 'format'
    if ((!((aReader)->ReadSentinel(148505226)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'format' (SurfaceFormat) member of 'AndroidImageReaderImageDescriptor'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_imageReaderId),
            std::move(_frameId),
            std::move(_size),
            std::move(_format)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct EGLImageDescriptor|
//
namespace mozilla {
namespace layers {
auto EGLImageDescriptor::operator==(const EGLImageDescriptor& _o) const -> bool
{
    if ((!((image()) == ((_o).image())))) {
        return false;
    }
    if ((!((fence()) == ((_o).fence())))) {
        return false;
    }
    if ((!((size()) == ((_o).size())))) {
        return false;
    }
    if ((!((hasAlpha()) == ((_o).hasAlpha())))) {
        return false;
    }
    return true;
}

auto EGLImageDescriptor::operator!=(const EGLImageDescriptor& _o) const -> bool
{
    return (!(operator==(_o)));
}

} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::EGLImageDescriptor>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).image());
    // Sentinel = 'image'
    (aWriter)->WriteSentinel(102498820);
    IPC::WriteParam(aWriter, (aVar).fence());
    // Sentinel = 'fence'
    (aWriter)->WriteSentinel(101450242);
    IPC::WriteParam(aWriter, (aVar).size());
    // Sentinel = 'size'
    (aWriter)->WriteSentinel(73662908);
    IPC::WriteParam(aWriter, (aVar).hasAlpha());
    // Sentinel = 'hasAlpha'
    (aWriter)->WriteSentinel(236389155);
}

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

    }
    auto& _image = *maybe___image;
    // Sentinel = 'image'
    if ((!((aReader)->ReadSentinel(102498820)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'image' (uintptr_t) member of 'EGLImageDescriptor'");
        return {};
    }
    auto maybe___fence = IPC::ReadParam<::uintptr_t>(aReader);
    if (!maybe___fence) {
        aReader->FatalError("Error deserializing 'fence' (uintptr_t) member of 'EGLImageDescriptor'");
        return {};

    }
    auto& _fence = *maybe___fence;
    // Sentinel = 'fence'
    if ((!((aReader)->ReadSentinel(101450242)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'fence' (uintptr_t) member of 'EGLImageDescriptor'");
        return {};
    }
    auto maybe___size = IPC::ReadParam<::mozilla::gfx::IntSize>(aReader);
    if (!maybe___size) {
        aReader->FatalError("Error deserializing 'size' (IntSize) member of 'EGLImageDescriptor'");
        return {};

    }
    auto& _size = *maybe___size;
    // Sentinel = 'size'
    if ((!((aReader)->ReadSentinel(73662908)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'EGLImageDescriptor'");
        return {};
    }
    auto maybe___hasAlpha = IPC::ReadParam<bool>(aReader);
    if (!maybe___hasAlpha) {
        aReader->FatalError("Error deserializing 'hasAlpha' (bool) member of 'EGLImageDescriptor'");
        return {};

    }
    auto& _hasAlpha = *maybe___hasAlpha;
    // Sentinel = 'hasAlpha'
    if ((!((aReader)->ReadSentinel(236389155)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'hasAlpha' (bool) member of 'EGLImageDescriptor'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_image),
            std::move(_fence),
            std::move(_size),
            std::move(_hasAlpha)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct SurfaceDescriptorSharedGLTexture|
//
namespace mozilla {
namespace layers {
auto SurfaceDescriptorSharedGLTexture::operator==(const SurfaceDescriptorSharedGLTexture& _o) const -> bool
{
    if ((!((texture()) == ((_o).texture())))) {
        return false;
    }
    if ((!((target()) == ((_o).target())))) {
        return false;
    }
    if ((!((fence()) == ((_o).fence())))) {
        return false;
    }
    if ((!((size()) == ((_o).size())))) {
        return false;
    }
    if ((!((hasAlpha()) == ((_o).hasAlpha())))) {
        return false;
    }
    return true;
}

auto SurfaceDescriptorSharedGLTexture::operator!=(const SurfaceDescriptorSharedGLTexture& _o) const -> bool
{
    return (!(operator==(_o)));
}

auto SurfaceDescriptorSharedGLTexture::StaticAssertions() const -> void
{
    static_assert(
        (offsetof(SurfaceDescriptorSharedGLTexture, target_) - offsetof(SurfaceDescriptorSharedGLTexture, texture_)) == 4,
        "Bad assumptions about field layout!");
}

} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::SurfaceDescriptorSharedGLTexture>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).fence());
    // Sentinel = 'fence'
    (aWriter)->WriteSentinel(101450242);
    IPC::WriteParam(aWriter, (aVar).size());
    // Sentinel = 'size'
    (aWriter)->WriteSentinel(73662908);
    IPC::WriteParam(aWriter, (aVar).hasAlpha());
    // Sentinel = 'hasAlpha'
    (aWriter)->WriteSentinel(236389155);
    (aWriter)->WriteBytes((&((aVar).texture())), 8);
    // Sentinel = 'texture | target'
    (aWriter)->WriteSentinel(918226517);
}

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

    }
    auto& _fence = *maybe___fence;
    // Sentinel = 'fence'
    if ((!((aReader)->ReadSentinel(101450242)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'fence' (uintptr_t) member of 'SurfaceDescriptorSharedGLTexture'");
        return {};
    }
    auto maybe___size = IPC::ReadParam<::mozilla::gfx::IntSize>(aReader);
    if (!maybe___size) {
        aReader->FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorSharedGLTexture'");
        return {};

    }
    auto& _size = *maybe___size;
    // Sentinel = 'size'
    if ((!((aReader)->ReadSentinel(73662908)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorSharedGLTexture'");
        return {};
    }
    auto maybe___hasAlpha = IPC::ReadParam<bool>(aReader);
    if (!maybe___hasAlpha) {
        aReader->FatalError("Error deserializing 'hasAlpha' (bool) member of 'SurfaceDescriptorSharedGLTexture'");
        return {};

    }
    auto& _hasAlpha = *maybe___hasAlpha;
    // Sentinel = 'hasAlpha'
    if ((!((aReader)->ReadSentinel(236389155)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'hasAlpha' (bool) member of 'SurfaceDescriptorSharedGLTexture'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            ::uint32_t{0},
            ::uint32_t{0},
            std::move(_fence),
            std::move(_size),
            std::move(_hasAlpha)};
    if ((!((aReader)->ReadBytesInto((&((result__)->texture())), 8)))) {
        aReader->FatalError("Error bulk reading fields from uint32_t");
        return {};
    }
    // Sentinel = 'texture | target'
    if ((!((aReader)->ReadSentinel(918226517)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint32_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct SurfaceDescriptorDcompSurface|
//
namespace mozilla {
namespace layers {
auto SurfaceDescriptorDcompSurface::operator==(const SurfaceDescriptorDcompSurface& _o) const -> bool
{
    if ((!((handle()) == ((_o).handle())))) {
        return false;
    }
    if ((!((size()) == ((_o).size())))) {
        return false;
    }
    if ((!((format()) == ((_o).format())))) {
        return false;
    }
    return true;
}

auto SurfaceDescriptorDcompSurface::operator!=(const SurfaceDescriptorDcompSurface& _o) const -> bool
{
    return (!(operator==(_o)));
}

} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::SurfaceDescriptorDcompSurface>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).handle());
    // Sentinel = 'handle'
    (aWriter)->WriteSentinel(142344813);
    IPC::WriteParam(aWriter, (aVar).size());
    // Sentinel = 'size'
    (aWriter)->WriteSentinel(73662908);
    IPC::WriteParam(aWriter, (aVar).format());
    // Sentinel = 'format'
    (aWriter)->WriteSentinel(148505226);
}

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

    }
    auto& _handle = *maybe___handle;
    // Sentinel = 'handle'
    if ((!((aReader)->ReadSentinel(142344813)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'handle' (FileDescriptor) member of 'SurfaceDescriptorDcompSurface'");
        return {};
    }
    auto maybe___size = IPC::ReadParam<::mozilla::gfx::IntSize>(aReader);
    if (!maybe___size) {
        aReader->FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorDcompSurface'");
        return {};

    }
    auto& _size = *maybe___size;
    // Sentinel = 'size'
    if ((!((aReader)->ReadSentinel(73662908)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorDcompSurface'");
        return {};
    }
    auto maybe___format = IPC::ReadParam<::mozilla::gfx::SurfaceFormat>(aReader);
    if (!maybe___format) {
        aReader->FatalError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorDcompSurface'");
        return {};

    }
    auto& _format = *maybe___format;
    // Sentinel = 'format'
    if ((!((aReader)->ReadSentinel(148505226)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorDcompSurface'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_handle),
            std::move(_size),
            std::move(_format)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct SurfaceDescriptorRemoteDecoder|
//
namespace mozilla {
namespace layers {
auto SurfaceDescriptorRemoteDecoder::operator==(const SurfaceDescriptorRemoteDecoder& _o) const -> bool
{
    if ((!((handle()) == ((_o).handle())))) {
        return false;
    }
    if ((!((videoType()) == ((_o).videoType())))) {
        return false;
    }
    if ((!((source()) == ((_o).source())))) {
        return false;
    }
    if ((!((id()) == ((_o).id())))) {
        return false;
    }
    return true;
}

auto SurfaceDescriptorRemoteDecoder::operator!=(const SurfaceDescriptorRemoteDecoder& _o) const -> bool
{
    return (!(operator==(_o)));
}

} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::SurfaceDescriptorRemoteDecoder>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).videoType());
    // Sentinel = 'videoType'
    (aWriter)->WriteSentinel(314311610);
    IPC::WriteParam(aWriter, (aVar).source());
    // Sentinel = 'source'
    (aWriter)->WriteSentinel(154665618);
    IPC::WriteParam(aWriter, (aVar).id());
    // Sentinel = 'id'
    (aWriter)->WriteSentinel(20447438);
    (aWriter)->WriteBytes((&((aVar).handle())), 8);
    // Sentinel = 'handle'
    (aWriter)->WriteSentinel(142344813);
}

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

    }
    auto& _videoType = *maybe___videoType;
    // Sentinel = 'videoType'
    if ((!((aReader)->ReadSentinel(314311610)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'videoType' (RemoteDecoderVideoType) member of 'SurfaceDescriptorRemoteDecoder'");
        return {};
    }
    auto maybe___source = IPC::ReadParam<::mozilla::layers::MaybeVideoBridgeSource>(aReader);
    if (!maybe___source) {
        aReader->FatalError("Error deserializing 'source' (MaybeVideoBridgeSource) member of 'SurfaceDescriptorRemoteDecoder'");
        return {};

    }
    auto& _source = *maybe___source;
    // Sentinel = 'source'
    if ((!((aReader)->ReadSentinel(154665618)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'source' (MaybeVideoBridgeSource) member of 'SurfaceDescriptorRemoteDecoder'");
        return {};
    }
    auto maybe___id = IPC::ReadParam<::mozilla::layers::SurfaceDescriptorRemoteDecoderId>(aReader);
    if (!maybe___id) {
        aReader->FatalError("Error deserializing 'id' (SurfaceDescriptorRemoteDecoderId) member of 'SurfaceDescriptorRemoteDecoder'");
        return {};

    }
    auto& _id = *maybe___id;
    // Sentinel = 'id'
    if ((!((aReader)->ReadSentinel(20447438)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'id' (SurfaceDescriptorRemoteDecoderId) member of 'SurfaceDescriptorRemoteDecoder'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            ::uint64_t{0},
            std::move(_videoType),
            std::move(_source),
            std::move(_id)};
    if ((!((aReader)->ReadBytesInto((&((result__)->handle())), 8)))) {
        aReader->FatalError("Error bulk reading fields from uint64_t");
        return {};
    }
    // Sentinel = 'handle'
    if ((!((aReader)->ReadSentinel(142344813)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint64_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union SurfaceDescriptorGPUVideo|
//
namespace mozilla {
namespace layers {
auto SurfaceDescriptorGPUVideo::MaybeDestroy() -> void
{
    if ((mType) == (T__None)) {
        return;
    }
    switch (mType) {
    case TSurfaceDescriptorRemoteDecoder:
        {
            (ptr_SurfaceDescriptorRemoteDecoder())->~SurfaceDescriptorRemoteDecoder__tdef();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("not reached");
            break;
        }
    }
}

MOZ_IMPLICIT SurfaceDescriptorGPUVideo::SurfaceDescriptorGPUVideo(const SurfaceDescriptorRemoteDecoder& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorRemoteDecoder()) SurfaceDescriptorRemoteDecoder(aOther);
    mType = TSurfaceDescriptorRemoteDecoder;
}

MOZ_IMPLICIT SurfaceDescriptorGPUVideo::SurfaceDescriptorGPUVideo(SurfaceDescriptorRemoteDecoder&& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorRemoteDecoder()) SurfaceDescriptorRemoteDecoder(std::move(aOther));
    mType = TSurfaceDescriptorRemoteDecoder;
}

MOZ_IMPLICIT SurfaceDescriptorGPUVideo::SurfaceDescriptorGPUVideo(const SurfaceDescriptorGPUVideo& aOther)
{
    (aOther).AssertSanity();
    switch ((aOther).type()) {
    case TSurfaceDescriptorRemoteDecoder:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorRemoteDecoder()) SurfaceDescriptorRemoteDecoder((aOther).get_SurfaceDescriptorRemoteDecoder());
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    mType = (aOther).type();
}

MOZ_IMPLICIT SurfaceDescriptorGPUVideo::SurfaceDescriptorGPUVideo(SurfaceDescriptorGPUVideo&& aOther)
{
    (aOther).AssertSanity();
    Type t = (aOther).type();
    switch (t) {
    case TSurfaceDescriptorRemoteDecoder:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorRemoteDecoder()) SurfaceDescriptorRemoteDecoder(std::move((aOther).get_SurfaceDescriptorRemoteDecoder()));
            (aOther).MaybeDestroy();
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    (aOther).mType = T__None;
    mType = t;
}

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

auto SurfaceDescriptorGPUVideo::operator=(const SurfaceDescriptorRemoteDecoder& aRhs) -> SurfaceDescriptorGPUVideo&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorRemoteDecoder()) SurfaceDescriptorRemoteDecoder(aRhs);
    mType = TSurfaceDescriptorRemoteDecoder;
    return (*(this));
}

auto SurfaceDescriptorGPUVideo::operator=(SurfaceDescriptorRemoteDecoder&& aRhs) -> SurfaceDescriptorGPUVideo&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorRemoteDecoder()) SurfaceDescriptorRemoteDecoder(std::move(aRhs));
    mType = TSurfaceDescriptorRemoteDecoder;
    return (*(this));
}

auto SurfaceDescriptorGPUVideo::operator=(const SurfaceDescriptorGPUVideo& aRhs) -> SurfaceDescriptorGPUVideo&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TSurfaceDescriptorRemoteDecoder:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorRemoteDecoder()) SurfaceDescriptorRemoteDecoder((aRhs).get_SurfaceDescriptorRemoteDecoder());
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    mType = t;
    return (*(this));
}

auto SurfaceDescriptorGPUVideo::operator=(SurfaceDescriptorGPUVideo&& aRhs) -> SurfaceDescriptorGPUVideo&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TSurfaceDescriptorRemoteDecoder:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorRemoteDecoder()) SurfaceDescriptorRemoteDecoder(std::move((aRhs).get_SurfaceDescriptorRemoteDecoder()));
            (aRhs).MaybeDestroy();
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    (aRhs).mType = T__None;
    mType = t;
    return (*(this));
}

auto SurfaceDescriptorGPUVideo::operator==(const SurfaceDescriptorRemoteDecoder& aRhs) const -> bool
{
    return (get_SurfaceDescriptorRemoteDecoder()) == (aRhs);
}

auto SurfaceDescriptorGPUVideo::operator==(const SurfaceDescriptorGPUVideo& aRhs) const -> bool
{
    if ((type()) != ((aRhs).type())) {
        return false;
    }

    switch (type()) {
    case TSurfaceDescriptorRemoteDecoder:
        {
            return (get_SurfaceDescriptorRemoteDecoder()) == ((aRhs).get_SurfaceDescriptorRemoteDecoder());
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return false;
        }
    }
}

} // namespace layers
} // namespace mozilla

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

    switch (type) {
    case union__::TSurfaceDescriptorRemoteDecoder:
        {
            IPC::WriteParam(aWriter, (aVar).get_SurfaceDescriptorRemoteDecoder());
            // Sentinel = 'TSurfaceDescriptorRemoteDecoder'
            (aWriter)->WriteSentinel(3291155551);
            return;
        }
    default:
        {
            aWriter->FatalError("unknown variant of union SurfaceDescriptorGPUVideo");
            return;
        }
    }
}

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

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

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

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

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct RGBDescriptor|
//
namespace mozilla {
namespace layers {
auto RGBDescriptor::operator==(const RGBDescriptor& _o) const -> bool
{
    if ((!((size()) == ((_o).size())))) {
        return false;
    }
    if ((!((format()) == ((_o).format())))) {
        return false;
    }
    if ((!((colorSpace()) == ((_o).colorSpace())))) {
        return false;
    }
    if ((!((transferFunction()) == ((_o).transferFunction())))) {
        return false;
    }
    return true;
}

auto RGBDescriptor::operator!=(const RGBDescriptor& _o) const -> bool
{
    return (!(operator==(_o)));
}

} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::RGBDescriptor>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).size());
    // Sentinel = 'size'
    (aWriter)->WriteSentinel(73662908);
    IPC::WriteParam(aWriter, (aVar).format());
    // Sentinel = 'format'
    (aWriter)->WriteSentinel(148505226);
    IPC::WriteParam(aWriter, (aVar).colorSpace());
    // Sentinel = 'colorSpace'
    (aWriter)->WriteSentinel(378602508);
    IPC::WriteParam(aWriter, (aVar).transferFunction());
    // Sentinel = 'transferFunction'
    (aWriter)->WriteSentinel(953747116);
}

auto ParamTraits<::mozilla::layers::RGBDescriptor>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___size = IPC::ReadParam<::mozilla::gfx::IntSize>(aReader);
    if (!maybe___size) {
        aReader->FatalError("Error deserializing 'size' (IntSize) member of 'RGBDescriptor'");
        return {};

    }
    auto& _size = *maybe___size;
    // Sentinel = 'size'
    if ((!((aReader)->ReadSentinel(73662908)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'RGBDescriptor'");
        return {};
    }
    auto maybe___format = IPC::ReadParam<::mozilla::gfx::SurfaceFormat>(aReader);
    if (!maybe___format) {
        aReader->FatalError("Error deserializing 'format' (SurfaceFormat) member of 'RGBDescriptor'");
        return {};

    }
    auto& _format = *maybe___format;
    // Sentinel = 'format'
    if ((!((aReader)->ReadSentinel(148505226)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'format' (SurfaceFormat) member of 'RGBDescriptor'");
        return {};
    }
    auto maybe___colorSpace = IPC::ReadParam<::mozilla::gfx::ColorSpace2>(aReader);
    if (!maybe___colorSpace) {
        aReader->FatalError("Error deserializing 'colorSpace' (ColorSpace2) member of 'RGBDescriptor'");
        return {};

    }
    auto& _colorSpace = *maybe___colorSpace;
    // Sentinel = 'colorSpace'
    if ((!((aReader)->ReadSentinel(378602508)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'colorSpace' (ColorSpace2) member of 'RGBDescriptor'");
        return {};
    }
    auto maybe___transferFunction = IPC::ReadParam<::mozilla::gfx::TransferFunction>(aReader);
    if (!maybe___transferFunction) {
        aReader->FatalError("Error deserializing 'transferFunction' (TransferFunction) member of 'RGBDescriptor'");
        return {};

    }
    auto& _transferFunction = *maybe___transferFunction;
    // Sentinel = 'transferFunction'
    if ((!((aReader)->ReadSentinel(953747116)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'transferFunction' (TransferFunction) member of 'RGBDescriptor'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_size),
            std::move(_format),
            std::move(_colorSpace),
            std::move(_transferFunction)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct YCbCrDescriptor|
//
namespace mozilla {
namespace layers {
auto YCbCrDescriptor::operator==(const YCbCrDescriptor& _o) const -> bool
{
    if ((!((display()) == ((_o).display())))) {
        return false;
    }
    if ((!((ySize()) == ((_o).ySize())))) {
        return false;
    }
    if ((!((yStride()) == ((_o).yStride())))) {
        return false;
    }
    if ((!((cbCrSize()) == ((_o).cbCrSize())))) {
        return false;
    }
    if ((!((cbCrStride()) == ((_o).cbCrStride())))) {
        return false;
    }
    if ((!((yOffset()) == ((_o).yOffset())))) {
        return false;
    }
    if ((!((cbOffset()) == ((_o).cbOffset())))) {
        return false;
    }
    if ((!((crOffset()) == ((_o).crOffset())))) {
        return false;
    }
    if ((!((stereoMode()) == ((_o).stereoMode())))) {
        return false;
    }
    if ((!((colorDepth()) == ((_o).colorDepth())))) {
        return false;
    }
    if ((!((yUVColorSpace()) == ((_o).yUVColorSpace())))) {
        return false;
    }
    if ((!((colorRange()) == ((_o).colorRange())))) {
        return false;
    }
    if ((!((transferFunction()) == ((_o).transferFunction())))) {
        return false;
    }
    if ((!((chromaSubsampling()) == ((_o).chromaSubsampling())))) {
        return false;
    }
    if ((!((hdrMetadata()) == ((_o).hdrMetadata())))) {
        return false;
    }
    return true;
}

auto YCbCrDescriptor::operator!=(const YCbCrDescriptor& _o) const -> bool
{
    return (!(operator==(_o)));
}

auto YCbCrDescriptor::StaticAssertions() const -> void
{
    static_assert(
        (offsetof(YCbCrDescriptor, crOffset_) - offsetof(YCbCrDescriptor, yStride_)) == 16,
        "Bad assumptions about field layout!");
}

} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::YCbCrDescriptor>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).display());
    // Sentinel = 'display'
    (aWriter)->WriteSentinel(196543223);
    IPC::WriteParam(aWriter, (aVar).ySize());
    // Sentinel = 'ySize'
    (aWriter)->WriteSentinel(104989205);
    IPC::WriteParam(aWriter, (aVar).cbCrSize());
    // Sentinel = 'cbCrSize'
    (aWriter)->WriteSentinel(226099990);
    IPC::WriteParam(aWriter, (aVar).stereoMode());
    // Sentinel = 'stereoMode'
    (aWriter)->WriteSentinel(387515416);
    IPC::WriteParam(aWriter, (aVar).colorDepth());
    // Sentinel = 'colorDepth'
    (aWriter)->WriteSentinel(376177685);
    IPC::WriteParam(aWriter, (aVar).yUVColorSpace());
    // Sentinel = 'yUVColorSpace'
    (aWriter)->WriteSentinel(589759760);
    IPC::WriteParam(aWriter, (aVar).colorRange());
    // Sentinel = 'colorRange'
    (aWriter)->WriteSentinel(377422861);
    IPC::WriteParam(aWriter, (aVar).transferFunction());
    // Sentinel = 'transferFunction'
    (aWriter)->WriteSentinel(953747116);
    IPC::WriteParam(aWriter, (aVar).chromaSubsampling());
    // Sentinel = 'chromaSubsampling'
    (aWriter)->WriteSentinel(1052313344);
    IPC::WriteParam(aWriter, (aVar).hdrMetadata());
    // Sentinel = 'hdrMetadata'
    (aWriter)->WriteSentinel(439420000);
    (aWriter)->WriteBytes((&((aVar).yStride())), 20);
    // Sentinel = 'yStride | cbCrStride | yOffset | cbOffset | crOffset'
    (aWriter)->WriteSentinel(4143190786);
}

auto ParamTraits<::mozilla::layers::YCbCrDescriptor>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___display = IPC::ReadParam<::mozilla::gfx::IntRect>(aReader);
    if (!maybe___display) {
        aReader->FatalError("Error deserializing 'display' (IntRect) member of 'YCbCrDescriptor'");
        return {};

    }
    auto& _display = *maybe___display;
    // Sentinel = 'display'
    if ((!((aReader)->ReadSentinel(196543223)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'display' (IntRect) member of 'YCbCrDescriptor'");
        return {};
    }
    auto maybe___ySize = IPC::ReadParam<::mozilla::gfx::IntSize>(aReader);
    if (!maybe___ySize) {
        aReader->FatalError("Error deserializing 'ySize' (IntSize) member of 'YCbCrDescriptor'");
        return {};

    }
    auto& _ySize = *maybe___ySize;
    // Sentinel = 'ySize'
    if ((!((aReader)->ReadSentinel(104989205)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'ySize' (IntSize) member of 'YCbCrDescriptor'");
        return {};
    }
    auto maybe___cbCrSize = IPC::ReadParam<::mozilla::gfx::IntSize>(aReader);
    if (!maybe___cbCrSize) {
        aReader->FatalError("Error deserializing 'cbCrSize' (IntSize) member of 'YCbCrDescriptor'");
        return {};

    }
    auto& _cbCrSize = *maybe___cbCrSize;
    // Sentinel = 'cbCrSize'
    if ((!((aReader)->ReadSentinel(226099990)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'cbCrSize' (IntSize) member of 'YCbCrDescriptor'");
        return {};
    }
    auto maybe___stereoMode = IPC::ReadParam<::mozilla::StereoMode>(aReader);
    if (!maybe___stereoMode) {
        aReader->FatalError("Error deserializing 'stereoMode' (StereoMode) member of 'YCbCrDescriptor'");
        return {};

    }
    auto& _stereoMode = *maybe___stereoMode;
    // Sentinel = 'stereoMode'
    if ((!((aReader)->ReadSentinel(387515416)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'stereoMode' (StereoMode) member of 'YCbCrDescriptor'");
        return {};
    }
    auto maybe___colorDepth = IPC::ReadParam<::mozilla::gfx::ColorDepth>(aReader);
    if (!maybe___colorDepth) {
        aReader->FatalError("Error deserializing 'colorDepth' (ColorDepth) member of 'YCbCrDescriptor'");
        return {};

    }
    auto& _colorDepth = *maybe___colorDepth;
    // Sentinel = 'colorDepth'
    if ((!((aReader)->ReadSentinel(376177685)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'colorDepth' (ColorDepth) member of 'YCbCrDescriptor'");
        return {};
    }
    auto maybe___yUVColorSpace = IPC::ReadParam<::mozilla::gfx::YUVColorSpace>(aReader);
    if (!maybe___yUVColorSpace) {
        aReader->FatalError("Error deserializing 'yUVColorSpace' (YUVColorSpace) member of 'YCbCrDescriptor'");
        return {};

    }
    auto& _yUVColorSpace = *maybe___yUVColorSpace;
    // Sentinel = 'yUVColorSpace'
    if ((!((aReader)->ReadSentinel(589759760)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'yUVColorSpace' (YUVColorSpace) member of 'YCbCrDescriptor'");
        return {};
    }
    auto maybe___colorRange = IPC::ReadParam<::mozilla::gfx::ColorRange>(aReader);
    if (!maybe___colorRange) {
        aReader->FatalError("Error deserializing 'colorRange' (ColorRange) member of 'YCbCrDescriptor'");
        return {};

    }
    auto& _colorRange = *maybe___colorRange;
    // Sentinel = 'colorRange'
    if ((!((aReader)->ReadSentinel(377422861)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'colorRange' (ColorRange) member of 'YCbCrDescriptor'");
        return {};
    }
    auto maybe___transferFunction = IPC::ReadParam<::mozilla::gfx::TransferFunction>(aReader);
    if (!maybe___transferFunction) {
        aReader->FatalError("Error deserializing 'transferFunction' (TransferFunction) member of 'YCbCrDescriptor'");
        return {};

    }
    auto& _transferFunction = *maybe___transferFunction;
    // Sentinel = 'transferFunction'
    if ((!((aReader)->ReadSentinel(953747116)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'transferFunction' (TransferFunction) member of 'YCbCrDescriptor'");
        return {};
    }
    auto maybe___chromaSubsampling = IPC::ReadParam<::mozilla::gfx::ChromaSubsampling>(aReader);
    if (!maybe___chromaSubsampling) {
        aReader->FatalError("Error deserializing 'chromaSubsampling' (ChromaSubsampling) member of 'YCbCrDescriptor'");
        return {};

    }
    auto& _chromaSubsampling = *maybe___chromaSubsampling;
    // Sentinel = 'chromaSubsampling'
    if ((!((aReader)->ReadSentinel(1052313344)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'chromaSubsampling' (ChromaSubsampling) member of 'YCbCrDescriptor'");
        return {};
    }
    auto maybe___hdrMetadata = IPC::ReadParam<mozilla::Maybe<::mozilla::gfx::HDRMetadata>>(aReader);
    if (!maybe___hdrMetadata) {
        aReader->FatalError("Error deserializing 'hdrMetadata' (HDRMetadata?) member of 'YCbCrDescriptor'");
        return {};

    }
    auto& _hdrMetadata = *maybe___hdrMetadata;
    // Sentinel = 'hdrMetadata'
    if ((!((aReader)->ReadSentinel(439420000)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'hdrMetadata' (HDRMetadata?) member of 'YCbCrDescriptor'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_display),
            std::move(_ySize),
            ::uint32_t{0},
            std::move(_cbCrSize),
            ::uint32_t{0},
            ::uint32_t{0},
            ::uint32_t{0},
            ::uint32_t{0},
            std::move(_stereoMode),
            std::move(_colorDepth),
            std::move(_yUVColorSpace),
            std::move(_colorRange),
            std::move(_transferFunction),
            std::move(_chromaSubsampling),
            std::move(_hdrMetadata)};
    if ((!((aReader)->ReadBytesInto((&((result__)->yStride())), 20)))) {
        aReader->FatalError("Error bulk reading fields from uint32_t");
        return {};
    }
    // Sentinel = 'yStride | cbCrStride | yOffset | cbOffset | crOffset'
    if ((!((aReader)->ReadSentinel(4143190786)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint32_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union BufferDescriptor|
//
namespace mozilla {
namespace layers {
auto BufferDescriptor::MaybeDestroy() -> void
{
    if ((mType) == (T__None)) {
        return;
    }
    switch (mType) {
    case TRGBDescriptor:
        {
            (ptr_RGBDescriptor())->~RGBDescriptor__tdef();
            break;
        }
    case TYCbCrDescriptor:
        {
            (ptr_YCbCrDescriptor())->~YCbCrDescriptor__tdef();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("not reached");
            break;
        }
    }
}

MOZ_IMPLICIT BufferDescriptor::BufferDescriptor(const RGBDescriptor& aOther)
{
    new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor(aOther);
    mType = TRGBDescriptor;
}

MOZ_IMPLICIT BufferDescriptor::BufferDescriptor(RGBDescriptor&& aOther)
{
    new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor(std::move(aOther));
    mType = TRGBDescriptor;
}

MOZ_IMPLICIT BufferDescriptor::BufferDescriptor(const YCbCrDescriptor& aOther)
{
    new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor(aOther);
    mType = TYCbCrDescriptor;
}

MOZ_IMPLICIT BufferDescriptor::BufferDescriptor(YCbCrDescriptor&& aOther)
{
    new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor(std::move(aOther));
    mType = TYCbCrDescriptor;
}

MOZ_IMPLICIT BufferDescriptor::BufferDescriptor(const BufferDescriptor& aOther)
{
    (aOther).AssertSanity();
    switch ((aOther).type()) {
    case TRGBDescriptor:
        {
            new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor((aOther).get_RGBDescriptor());
            break;
        }
    case TYCbCrDescriptor:
        {
            new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor((aOther).get_YCbCrDescriptor());
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    mType = (aOther).type();
}

MOZ_IMPLICIT BufferDescriptor::BufferDescriptor(BufferDescriptor&& aOther)
{
    (aOther).AssertSanity();
    Type t = (aOther).type();
    switch (t) {
    case TRGBDescriptor:
        {
            new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor(std::move((aOther).get_RGBDescriptor()));
            (aOther).MaybeDestroy();
            break;
        }
    case TYCbCrDescriptor:
        {
            new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor(std::move((aOther).get_YCbCrDescriptor()));
            (aOther).MaybeDestroy();
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    (aOther).mType = T__None;
    mType = t;
}

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

auto BufferDescriptor::operator=(const RGBDescriptor& aRhs) -> BufferDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor(aRhs);
    mType = TRGBDescriptor;
    return (*(this));
}

auto BufferDescriptor::operator=(RGBDescriptor&& aRhs) -> BufferDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor(std::move(aRhs));
    mType = TRGBDescriptor;
    return (*(this));
}

auto BufferDescriptor::operator=(const YCbCrDescriptor& aRhs) -> BufferDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor(aRhs);
    mType = TYCbCrDescriptor;
    return (*(this));
}

auto BufferDescriptor::operator=(YCbCrDescriptor&& aRhs) -> BufferDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor(std::move(aRhs));
    mType = TYCbCrDescriptor;
    return (*(this));
}

auto BufferDescriptor::operator=(const BufferDescriptor& aRhs) -> BufferDescriptor&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TRGBDescriptor:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor((aRhs).get_RGBDescriptor());
            break;
        }
    case TYCbCrDescriptor:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor((aRhs).get_YCbCrDescriptor());
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    mType = t;
    return (*(this));
}

auto BufferDescriptor::operator=(BufferDescriptor&& aRhs) -> BufferDescriptor&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TRGBDescriptor:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor(std::move((aRhs).get_RGBDescriptor()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TYCbCrDescriptor:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor(std::move((aRhs).get_YCbCrDescriptor()));
            (aRhs).MaybeDestroy();
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    (aRhs).mType = T__None;
    mType = t;
    return (*(this));
}

auto BufferDescriptor::operator==(const RGBDescriptor& aRhs) const -> bool
{
    return (get_RGBDescriptor()) == (aRhs);
}

auto BufferDescriptor::operator==(const YCbCrDescriptor& aRhs) const -> bool
{
    return (get_YCbCrDescriptor()) == (aRhs);
}

auto BufferDescriptor::operator==(const BufferDescriptor& aRhs) const -> bool
{
    if ((type()) != ((aRhs).type())) {
        return false;
    }

    switch (type()) {
    case TRGBDescriptor:
        {
            return (get_RGBDescriptor()) == ((aRhs).get_RGBDescriptor());
        }
    case TYCbCrDescriptor:
        {
            return (get_YCbCrDescriptor()) == ((aRhs).get_YCbCrDescriptor());
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return false;
        }
    }
}

} // namespace layers
} // namespace mozilla

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

    switch (type) {
    case union__::TRGBDescriptor:
        {
            IPC::WriteParam(aWriter, (aVar).get_RGBDescriptor());
            // Sentinel = 'TRGBDescriptor'
            (aWriter)->WriteSentinel(614532431);
            return;
        }
    case union__::TYCbCrDescriptor:
        {
            IPC::WriteParam(aWriter, (aVar).get_YCbCrDescriptor());
            // Sentinel = 'TYCbCrDescriptor'
            (aWriter)->WriteSentinel(819725863);
            return;
        }
    default:
        {
            aWriter->FatalError("unknown variant of union BufferDescriptor");
            return;
        }
    }
}

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

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

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

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

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

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union MemoryOrShmem|
//
namespace mozilla {
namespace layers {
auto MemoryOrShmem::MaybeDestroy() -> void
{
    if ((mType) == (T__None)) {
        return;
    }
    switch (mType) {
    case Tuintptr_t:
        {
            (ptr_uintptr_t())->~uintptr_t__tdef();
            break;
        }
    case TShmem:
        {
            (ptr_Shmem())->~Shmem__tdef();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("not reached");
            break;
        }
    }
}

MOZ_IMPLICIT MemoryOrShmem::MemoryOrShmem(const uintptr_t& aOther)
{
    new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t(aOther);
    mType = Tuintptr_t;
}

MOZ_IMPLICIT MemoryOrShmem::MemoryOrShmem(uintptr_t&& aOther)
{
    new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t(std::move(aOther));
    mType = Tuintptr_t;
}

MOZ_IMPLICIT MemoryOrShmem::MemoryOrShmem(Shmem& aOther)
{
    new (mozilla::KnownNotNull, ptr_Shmem()) Shmem(aOther);
    mType = TShmem;
}

MOZ_IMPLICIT MemoryOrShmem::MemoryOrShmem(Shmem&& aOther)
{
    new (mozilla::KnownNotNull, ptr_Shmem()) Shmem(std::move(aOther));
    mType = TShmem;
}

MOZ_IMPLICIT MemoryOrShmem::MemoryOrShmem(const MemoryOrShmem& aOther)
{
    (aOther).AssertSanity();
    switch ((aOther).type()) {
    case Tuintptr_t:
        {
            new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t((aOther).get_uintptr_t());
            break;
        }
    case TShmem:
        {
            new (mozilla::KnownNotNull, ptr_Shmem()) Shmem((aOther).get_Shmem());
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    mType = (aOther).type();
}

MOZ_IMPLICIT MemoryOrShmem::MemoryOrShmem(MemoryOrShmem&& aOther)
{
    (aOther).AssertSanity();
    Type t = (aOther).type();
    switch (t) {
    case Tuintptr_t:
        {
            new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t(std::move((aOther).get_uintptr_t()));
            (aOther).MaybeDestroy();
            break;
        }
    case TShmem:
        {
            new (mozilla::KnownNotNull, ptr_Shmem()) Shmem(std::move((aOther).get_Shmem()));
            (aOther).MaybeDestroy();
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    (aOther).mType = T__None;
    mType = t;
}

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

auto MemoryOrShmem::operator=(const uintptr_t& aRhs) -> MemoryOrShmem&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t(aRhs);
    mType = Tuintptr_t;
    return (*(this));
}

auto MemoryOrShmem::operator=(uintptr_t&& aRhs) -> MemoryOrShmem&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t(std::move(aRhs));
    mType = Tuintptr_t;
    return (*(this));
}

auto MemoryOrShmem::operator=(Shmem& aRhs) -> MemoryOrShmem&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_Shmem()) Shmem(aRhs);
    mType = TShmem;
    return (*(this));
}

auto MemoryOrShmem::operator=(Shmem&& aRhs) -> MemoryOrShmem&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_Shmem()) Shmem(std::move(aRhs));
    mType = TShmem;
    return (*(this));
}

auto MemoryOrShmem::operator=(const MemoryOrShmem& aRhs) -> MemoryOrShmem&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case Tuintptr_t:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t((aRhs).get_uintptr_t());
            break;
        }
    case TShmem:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_Shmem()) Shmem((aRhs).get_Shmem());
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    mType = t;
    return (*(this));
}

auto MemoryOrShmem::operator=(MemoryOrShmem&& aRhs) -> MemoryOrShmem&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case Tuintptr_t:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t(std::move((aRhs).get_uintptr_t()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TShmem:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_Shmem()) Shmem(std::move((aRhs).get_Shmem()));
            (aRhs).MaybeDestroy();
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    (aRhs).mType = T__None;
    mType = t;
    return (*(this));
}

auto MemoryOrShmem::operator==(const uintptr_t& aRhs) const -> bool
{
    return (get_uintptr_t()) == (aRhs);
}

auto MemoryOrShmem::operator==(Shmem& aRhs) const -> bool
{
    return (get_Shmem()) == (aRhs);
}

auto MemoryOrShmem::operator==(const MemoryOrShmem& aRhs) const -> bool
{
    if ((type()) != ((aRhs).type())) {
        return false;
    }

    switch (type()) {
    case Tuintptr_t:
        {
            return (get_uintptr_t()) == ((aRhs).get_uintptr_t());
        }
    case TShmem:
        {
            return (get_Shmem()) == ((aRhs).get_Shmem());
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return false;
        }
    }
}

} // namespace layers
} // namespace mozilla

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

    switch (type) {
    case union__::Tuintptr_t:
        {
            IPC::WriteParam(aWriter, (aVar).get_uintptr_t());
            // Sentinel = 'Tuintptr_t'
            (aWriter)->WriteSentinel(385418302);
            return;
        }
    case union__::TShmem:
        {
            IPC::WriteParam(aWriter, std::move((aVar).get_Shmem()));
            // Sentinel = 'TShmem'
            (aWriter)->WriteSentinel(129696335);
            return;
        }
    default:
        {
            aWriter->FatalError("unknown variant of union MemoryOrShmem");
            return;
        }
    }
}

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

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

    switch (type) {
    case union__::Tuintptr_t:
        {
            auto maybe__tmp = IPC::ReadParam<::uintptr_t>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant Tuintptr_t of union MemoryOrShmem");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'Tuintptr_t'
            if ((!((aReader)->ReadSentinel(385418302)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant Tuintptr_t of union MemoryOrShmem");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TShmem:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::ipc::Shmem>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TShmem of union MemoryOrShmem");
                return {};

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

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct SurfaceDescriptorBuffer|
//
namespace mozilla {
namespace layers {
auto SurfaceDescriptorBuffer::operator==(const SurfaceDescriptorBuffer& _o) const -> bool
{
    if ((!((desc()) == ((_o).desc())))) {
        return false;
    }
    if ((!((data()) == ((_o).data())))) {
        return false;
    }
    return true;
}

auto SurfaceDescriptorBuffer::operator!=(const SurfaceDescriptorBuffer& _o) const -> bool
{
    return (!(operator==(_o)));
}

} // namespace layers
} // namespace mozilla

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

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

    }
    auto& _desc = *maybe___desc;
    // Sentinel = 'desc'
    if ((!((aReader)->ReadSentinel(67895712)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'desc' (BufferDescriptor) member of 'SurfaceDescriptorBuffer'");
        return {};
    }
    auto maybe___data = IPC::ReadParam<::mozilla::layers::MemoryOrShmem>(aReader);
    if (!maybe___data) {
        aReader->FatalError("Error deserializing 'data' (MemoryOrShmem) member of 'SurfaceDescriptorBuffer'");
        return {};

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

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::layers::SurfaceDescriptorShared>::Write(
        IPC::MessageWriter* aWriter,
        paramType&& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).size());
    // Sentinel = 'size'
    (aWriter)->WriteSentinel(73662908);
    IPC::WriteParam(aWriter, (aVar).format());
    // Sentinel = 'format'
    (aWriter)->WriteSentinel(148505226);
    IPC::WriteParam(aWriter, std::move((aVar).handle()));
    // Sentinel = 'handle'
    (aWriter)->WriteSentinel(142344813);
    (aWriter)->WriteBytes((&((aVar).stride())), 4);
    // Sentinel = 'stride'
    (aWriter)->WriteSentinel(153879180);
}

auto ParamTraits<::mozilla::layers::SurfaceDescriptorShared>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___size = IPC::ReadParam<::mozilla::gfx::IntSize>(aReader);
    if (!maybe___size) {
        aReader->FatalError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorShared'");
        return {};

    }
    auto& _size = *maybe___size;
    // Sentinel = 'size'
    if ((!((aReader)->ReadSentinel(73662908)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'size' (IntSize) member of 'SurfaceDescriptorShared'");
        return {};
    }
    auto maybe___format = IPC::ReadParam<::mozilla::gfx::SurfaceFormat>(aReader);
    if (!maybe___format) {
        aReader->FatalError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorShared'");
        return {};

    }
    auto& _format = *maybe___format;
    // Sentinel = 'format'
    if ((!((aReader)->ReadSentinel(148505226)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'format' (SurfaceFormat) member of 'SurfaceDescriptorShared'");
        return {};
    }
    auto maybe___handle = IPC::ReadParam<::mozilla::ipc::ReadOnlySharedMemoryHandle>(aReader);
    if (!maybe___handle) {
        aReader->FatalError("Error deserializing 'handle' (ReadOnlySharedMemoryHandle) member of 'SurfaceDescriptorShared'");
        return {};

    }
    auto& _handle = *maybe___handle;
    // Sentinel = 'handle'
    if ((!((aReader)->ReadSentinel(142344813)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'handle' (ReadOnlySharedMemoryHandle) member of 'SurfaceDescriptorShared'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_size),
            ::int32_t{0},
            std::move(_format),
            std::move(_handle)};
    if ((!((aReader)->ReadBytesInto((&((result__)->stride())), 4)))) {
        aReader->FatalError("Error bulk reading fields from int32_t");
        return {};
    }
    // Sentinel = 'stride'
    if ((!((aReader)->ReadSentinel(153879180)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from int32_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct SurfaceDescriptorExternalImage|
//
namespace mozilla {
namespace layers {
auto SurfaceDescriptorExternalImage::operator==(const SurfaceDescriptorExternalImage& _o) const -> bool
{
    if ((!((source()) == ((_o).source())))) {
        return false;
    }
    if ((!((id()) == ((_o).id())))) {
        return false;
    }
    return true;
}

auto SurfaceDescriptorExternalImage::operator!=(const SurfaceDescriptorExternalImage& _o) const -> bool
{
    return (!(operator==(_o)));
}

} // namespace layers
} // namespace mozilla

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

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

    }
    auto& _source = *maybe___source;
    // Sentinel = 'source'
    if ((!((aReader)->ReadSentinel(154665618)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'source' (ExternalImageSource) member of 'SurfaceDescriptorExternalImage'");
        return {};
    }
    auto maybe___id = IPC::ReadParam<::mozilla::wr::ExternalImageId>(aReader);
    if (!maybe___id) {
        aReader->FatalError("Error deserializing 'id' (ExternalImageId) member of 'SurfaceDescriptorExternalImage'");
        return {};

    }
    auto& _id = *maybe___id;
    // Sentinel = 'id'
    if ((!((aReader)->ReadSentinel(20447438)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'id' (ExternalImageId) member of 'SurfaceDescriptorExternalImage'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_source),
            std::move(_id)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct SurfaceDescriptorRemoteTexture|
//
namespace mozilla {
namespace layers {
auto SurfaceDescriptorRemoteTexture::operator==(const SurfaceDescriptorRemoteTexture& _o) const -> bool
{
    if ((!((textureId()) == ((_o).textureId())))) {
        return false;
    }
    if ((!((ownerId()) == ((_o).ownerId())))) {
        return false;
    }
    return true;
}

auto SurfaceDescriptorRemoteTexture::operator!=(const SurfaceDescriptorRemoteTexture& _o) const -> bool
{
    return (!(operator==(_o)));
}

} // namespace layers
} // namespace mozilla

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

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

    }
    auto& _textureId = *maybe___textureId;
    // Sentinel = 'textureId'
    if ((!((aReader)->ReadSentinel(326828991)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'textureId' (RemoteTextureId) member of 'SurfaceDescriptorRemoteTexture'");
        return {};
    }
    auto maybe___ownerId = IPC::ReadParam<::mozilla::layers::RemoteTextureOwnerId>(aReader);
    if (!maybe___ownerId) {
        aReader->FatalError("Error deserializing 'ownerId' (RemoteTextureOwnerId) member of 'SurfaceDescriptorRemoteTexture'");
        return {};

    }
    auto& _ownerId = *maybe___ownerId;
    // Sentinel = 'ownerId'
    if ((!((aReader)->ReadSentinel(199230169)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'ownerId' (RemoteTextureOwnerId) member of 'SurfaceDescriptorRemoteTexture'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_textureId),
            std::move(_ownerId)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct SurfaceDescriptorCanvasSurface|
//
namespace mozilla {
namespace layers {
auto SurfaceDescriptorCanvasSurface::operator==(const SurfaceDescriptorCanvasSurface& _o) const -> bool
{
    if ((!((managerId()) == ((_o).managerId())))) {
        return false;
    }
    if ((!((canvasId()) == ((_o).canvasId())))) {
        return false;
    }
    if ((!((surfaceId()) == ((_o).surfaceId())))) {
        return false;
    }
    return true;
}

auto SurfaceDescriptorCanvasSurface::operator!=(const SurfaceDescriptorCanvasSurface& _o) const -> bool
{
    return (!(operator==(_o)));
}

} // namespace layers
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::layers::SurfaceDescriptorCanvasSurface>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).canvasId());
    // Sentinel = 'canvasId'
    (aWriter)->WriteSentinel(243008298);
    IPC::WriteParam(aWriter, (aVar).surfaceId());
    // Sentinel = 'surfaceId'
    (aWriter)->WriteSentinel(315884439);
    (aWriter)->WriteBytes((&((aVar).managerId())), 4);
    // Sentinel = 'managerId'
    (aWriter)->WriteSentinel(303104905);
}

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

    }
    auto& _canvasId = *maybe___canvasId;
    // Sentinel = 'canvasId'
    if ((!((aReader)->ReadSentinel(243008298)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'canvasId' (ActorId) member of 'SurfaceDescriptorCanvasSurface'");
        return {};
    }
    auto maybe___surfaceId = IPC::ReadParam<::uintptr_t>(aReader);
    if (!maybe___surfaceId) {
        aReader->FatalError("Error deserializing 'surfaceId' (uintptr_t) member of 'SurfaceDescriptorCanvasSurface'");
        return {};

    }
    auto& _surfaceId = *maybe___surfaceId;
    // Sentinel = 'surfaceId'
    if ((!((aReader)->ReadSentinel(315884439)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'surfaceId' (uintptr_t) member of 'SurfaceDescriptorCanvasSurface'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            ::uint32_t{0},
            std::move(_canvasId),
            std::move(_surfaceId)};
    if ((!((aReader)->ReadBytesInto((&((result__)->managerId())), 4)))) {
        aReader->FatalError("Error bulk reading fields from uint32_t");
        return {};
    }
    // Sentinel = 'managerId'
    if ((!((aReader)->ReadSentinel(303104905)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint32_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union SurfaceDescriptor|
//
namespace mozilla {
namespace layers {
auto SurfaceDescriptor::MaybeDestroy() -> void
{
    if ((mType) == (T__None)) {
        return;
    }
    switch (mType) {
    case TSurfaceDescriptorBuffer:
        {
            (ptr_SurfaceDescriptorBuffer())->~SurfaceDescriptorBuffer__tdef();
            break;
        }
    case TSurfaceDescriptorD3D10:
        {
            (ptr_SurfaceDescriptorD3D10())->~SurfaceDescriptorD3D10__tdef();
            break;
        }
    case TSurfaceDescriptorDXGIYCbCr:
        {
            (ptr_SurfaceDescriptorDXGIYCbCr())->~SurfaceDescriptorDXGIYCbCr__tdef();
            break;
        }
    case TSurfaceDescriptorDMABuf:
        {
            (ptr_SurfaceDescriptorDMABuf())->~SurfaceDescriptorDMABuf__tdef();
            break;
        }
    case TSurfaceTextureDescriptor:
        {
            (ptr_SurfaceTextureDescriptor())->~SurfaceTextureDescriptor__tdef();
            break;
        }
    case TSurfaceDescriptorAndroidHardwareBuffer:
        {
            (ptr_SurfaceDescriptorAndroidHardwareBuffer())->~SurfaceDescriptorAndroidHardwareBuffer__tdef();
            break;
        }
    case TAndroidImageReaderImageDescriptor:
        {
            (ptr_AndroidImageReaderImageDescriptor())->~AndroidImageReaderImageDescriptor__tdef();
            break;
        }
    case TEGLImageDescriptor:
        {
            (ptr_EGLImageDescriptor())->~EGLImageDescriptor__tdef();
            break;
        }
    case TSurfaceDescriptorMacIOSurface:
        {
            (ptr_SurfaceDescriptorMacIOSurface())->~SurfaceDescriptorMacIOSurface__tdef();
            break;
        }
    case TSurfaceDescriptorSharedGLTexture:
        {
            (ptr_SurfaceDescriptorSharedGLTexture())->~SurfaceDescriptorSharedGLTexture__tdef();
            break;
        }
    case TSurfaceDescriptorGPUVideo:
        {
            (ptr_SurfaceDescriptorGPUVideo())->~SurfaceDescriptorGPUVideo__tdef();
            break;
        }
    case TSurfaceDescriptorRemoteTexture:
        {
            (ptr_SurfaceDescriptorRemoteTexture())->~SurfaceDescriptorRemoteTexture__tdef();
            break;
        }
    case TSurfaceDescriptorDcompSurface:
        {
            (ptr_SurfaceDescriptorDcompSurface())->~SurfaceDescriptorDcompSurface__tdef();
            break;
        }
    case TSurfaceDescriptorExternalImage:
        {
            (ptr_SurfaceDescriptorExternalImage())->~SurfaceDescriptorExternalImage__tdef();
            break;
        }
    case TSurfaceDescriptorCanvasSurface:
        {
            (ptr_SurfaceDescriptorCanvasSurface())->~SurfaceDescriptorCanvasSurface__tdef();
            break;
        }
    case Tnull_t:
        {
            (ptr_null_t())->~null_t__tdef();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("not reached");
            break;
        }
    }
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorBuffer& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer(aOther);
    mType = TSurfaceDescriptorBuffer;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorBuffer&& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer(std::move(aOther));
    mType = TSurfaceDescriptorBuffer;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorD3D10& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10(aOther);
    mType = TSurfaceDescriptorD3D10;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorD3D10&& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10(std::move(aOther));
    mType = TSurfaceDescriptorD3D10;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorDXGIYCbCr& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr(aOther);
    mType = TSurfaceDescriptorDXGIYCbCr;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorDXGIYCbCr&& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr(std::move(aOther));
    mType = TSurfaceDescriptorDXGIYCbCr;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorDMABuf& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDMABuf()) SurfaceDescriptorDMABuf(aOther);
    mType = TSurfaceDescriptorDMABuf;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorDMABuf&& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDMABuf()) SurfaceDescriptorDMABuf(std::move(aOther));
    mType = TSurfaceDescriptorDMABuf;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceTextureDescriptor& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor(aOther);
    mType = TSurfaceTextureDescriptor;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceTextureDescriptor&& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor(std::move(aOther));
    mType = TSurfaceTextureDescriptor;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorAndroidHardwareBuffer& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorAndroidHardwareBuffer()) SurfaceDescriptorAndroidHardwareBuffer(aOther);
    mType = TSurfaceDescriptorAndroidHardwareBuffer;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorAndroidHardwareBuffer&& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorAndroidHardwareBuffer()) SurfaceDescriptorAndroidHardwareBuffer(std::move(aOther));
    mType = TSurfaceDescriptorAndroidHardwareBuffer;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const AndroidImageReaderImageDescriptor& aOther)
{
    new (mozilla::KnownNotNull, ptr_AndroidImageReaderImageDescriptor()) AndroidImageReaderImageDescriptor(aOther);
    mType = TAndroidImageReaderImageDescriptor;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(AndroidImageReaderImageDescriptor&& aOther)
{
    new (mozilla::KnownNotNull, ptr_AndroidImageReaderImageDescriptor()) AndroidImageReaderImageDescriptor(std::move(aOther));
    mType = TAndroidImageReaderImageDescriptor;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const EGLImageDescriptor& aOther)
{
    new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor(aOther);
    mType = TEGLImageDescriptor;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(EGLImageDescriptor&& aOther)
{
    new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor(std::move(aOther));
    mType = TEGLImageDescriptor;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorMacIOSurface& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface(aOther);
    mType = TSurfaceDescriptorMacIOSurface;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorMacIOSurface&& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface(std::move(aOther));
    mType = TSurfaceDescriptorMacIOSurface;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorSharedGLTexture& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture(aOther);
    mType = TSurfaceDescriptorSharedGLTexture;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorSharedGLTexture&& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture(std::move(aOther));
    mType = TSurfaceDescriptorSharedGLTexture;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorGPUVideo& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo(aOther);
    mType = TSurfaceDescriptorGPUVideo;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorGPUVideo&& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo(std::move(aOther));
    mType = TSurfaceDescriptorGPUVideo;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorRemoteTexture& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorRemoteTexture()) SurfaceDescriptorRemoteTexture(aOther);
    mType = TSurfaceDescriptorRemoteTexture;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorRemoteTexture&& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorRemoteTexture()) SurfaceDescriptorRemoteTexture(std::move(aOther));
    mType = TSurfaceDescriptorRemoteTexture;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorDcompSurface& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDcompSurface()) SurfaceDescriptorDcompSurface(aOther);
    mType = TSurfaceDescriptorDcompSurface;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorDcompSurface&& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDcompSurface()) SurfaceDescriptorDcompSurface(std::move(aOther));
    mType = TSurfaceDescriptorDcompSurface;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorExternalImage& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorExternalImage()) SurfaceDescriptorExternalImage(aOther);
    mType = TSurfaceDescriptorExternalImage;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorExternalImage&& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorExternalImage()) SurfaceDescriptorExternalImage(std::move(aOther));
    mType = TSurfaceDescriptorExternalImage;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorCanvasSurface& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorCanvasSurface()) SurfaceDescriptorCanvasSurface(aOther);
    mType = TSurfaceDescriptorCanvasSurface;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptorCanvasSurface&& aOther)
{
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorCanvasSurface()) SurfaceDescriptorCanvasSurface(std::move(aOther));
    mType = TSurfaceDescriptorCanvasSurface;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const null_t& aOther)
{
    new (mozilla::KnownNotNull, ptr_null_t()) null_t(aOther);
    mType = Tnull_t;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(null_t&& aOther)
{
    new (mozilla::KnownNotNull, ptr_null_t()) null_t(std::move(aOther));
    mType = Tnull_t;
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptor& aOther)
{
    (aOther).AssertSanity();
    switch ((aOther).type()) {
    case TSurfaceDescriptorBuffer:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer((aOther).get_SurfaceDescriptorBuffer());
            break;
        }
    case TSurfaceDescriptorD3D10:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10((aOther).get_SurfaceDescriptorD3D10());
            break;
        }
    case TSurfaceDescriptorDXGIYCbCr:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr((aOther).get_SurfaceDescriptorDXGIYCbCr());
            break;
        }
    case TSurfaceDescriptorDMABuf:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDMABuf()) SurfaceDescriptorDMABuf((aOther).get_SurfaceDescriptorDMABuf());
            break;
        }
    case TSurfaceTextureDescriptor:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor((aOther).get_SurfaceTextureDescriptor());
            break;
        }
    case TSurfaceDescriptorAndroidHardwareBuffer:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorAndroidHardwareBuffer()) SurfaceDescriptorAndroidHardwareBuffer((aOther).get_SurfaceDescriptorAndroidHardwareBuffer());
            break;
        }
    case TAndroidImageReaderImageDescriptor:
        {
            new (mozilla::KnownNotNull, ptr_AndroidImageReaderImageDescriptor()) AndroidImageReaderImageDescriptor((aOther).get_AndroidImageReaderImageDescriptor());
            break;
        }
    case TEGLImageDescriptor:
        {
            new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor((aOther).get_EGLImageDescriptor());
            break;
        }
    case TSurfaceDescriptorMacIOSurface:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface((aOther).get_SurfaceDescriptorMacIOSurface());
            break;
        }
    case TSurfaceDescriptorSharedGLTexture:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture((aOther).get_SurfaceDescriptorSharedGLTexture());
            break;
        }
    case TSurfaceDescriptorGPUVideo:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo((aOther).get_SurfaceDescriptorGPUVideo());
            break;
        }
    case TSurfaceDescriptorRemoteTexture:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorRemoteTexture()) SurfaceDescriptorRemoteTexture((aOther).get_SurfaceDescriptorRemoteTexture());
            break;
        }
    case TSurfaceDescriptorDcompSurface:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDcompSurface()) SurfaceDescriptorDcompSurface((aOther).get_SurfaceDescriptorDcompSurface());
            break;
        }
    case TSurfaceDescriptorExternalImage:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorExternalImage()) SurfaceDescriptorExternalImage((aOther).get_SurfaceDescriptorExternalImage());
            break;
        }
    case TSurfaceDescriptorCanvasSurface:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorCanvasSurface()) SurfaceDescriptorCanvasSurface((aOther).get_SurfaceDescriptorCanvasSurface());
            break;
        }
    case Tnull_t:
        {
            new (mozilla::KnownNotNull, ptr_null_t()) null_t((aOther).get_null_t());
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    mType = (aOther).type();
}

MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(SurfaceDescriptor&& aOther)
{
    (aOther).AssertSanity();
    Type t = (aOther).type();
    switch (t) {
    case TSurfaceDescriptorBuffer:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer(std::move((aOther).get_SurfaceDescriptorBuffer()));
            (aOther).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorD3D10:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10(std::move((aOther).get_SurfaceDescriptorD3D10()));
            (aOther).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorDXGIYCbCr:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr(std::move((aOther).get_SurfaceDescriptorDXGIYCbCr()));
            (aOther).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorDMABuf:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDMABuf()) SurfaceDescriptorDMABuf(std::move((aOther).get_SurfaceDescriptorDMABuf()));
            (aOther).MaybeDestroy();
            break;
        }
    case TSurfaceTextureDescriptor:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor(std::move((aOther).get_SurfaceTextureDescriptor()));
            (aOther).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorAndroidHardwareBuffer:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorAndroidHardwareBuffer()) SurfaceDescriptorAndroidHardwareBuffer(std::move((aOther).get_SurfaceDescriptorAndroidHardwareBuffer()));
            (aOther).MaybeDestroy();
            break;
        }
    case TAndroidImageReaderImageDescriptor:
        {
            new (mozilla::KnownNotNull, ptr_AndroidImageReaderImageDescriptor()) AndroidImageReaderImageDescriptor(std::move((aOther).get_AndroidImageReaderImageDescriptor()));
            (aOther).MaybeDestroy();
            break;
        }
    case TEGLImageDescriptor:
        {
            new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor(std::move((aOther).get_EGLImageDescriptor()));
            (aOther).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorMacIOSurface:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface(std::move((aOther).get_SurfaceDescriptorMacIOSurface()));
            (aOther).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorSharedGLTexture:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture(std::move((aOther).get_SurfaceDescriptorSharedGLTexture()));
            (aOther).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorGPUVideo:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo(std::move((aOther).get_SurfaceDescriptorGPUVideo()));
            (aOther).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorRemoteTexture:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorRemoteTexture()) SurfaceDescriptorRemoteTexture(std::move((aOther).get_SurfaceDescriptorRemoteTexture()));
            (aOther).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorDcompSurface:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDcompSurface()) SurfaceDescriptorDcompSurface(std::move((aOther).get_SurfaceDescriptorDcompSurface()));
            (aOther).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorExternalImage:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorExternalImage()) SurfaceDescriptorExternalImage(std::move((aOther).get_SurfaceDescriptorExternalImage()));
            (aOther).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorCanvasSurface:
        {
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorCanvasSurface()) SurfaceDescriptorCanvasSurface(std::move((aOther).get_SurfaceDescriptorCanvasSurface()));
            (aOther).MaybeDestroy();
            break;
        }
    case Tnull_t:
        {
            new (mozilla::KnownNotNull, ptr_null_t()) null_t(std::move((aOther).get_null_t()));
            (aOther).MaybeDestroy();
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    (aOther).mType = T__None;
    mType = t;
}

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

auto SurfaceDescriptor::operator=(const SurfaceDescriptorBuffer& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer(aRhs);
    mType = TSurfaceDescriptorBuffer;
    return (*(this));
}

auto SurfaceDescriptor::operator=(SurfaceDescriptorBuffer&& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer(std::move(aRhs));
    mType = TSurfaceDescriptorBuffer;
    return (*(this));
}

auto SurfaceDescriptor::operator=(const SurfaceDescriptorD3D10& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10(aRhs);
    mType = TSurfaceDescriptorD3D10;
    return (*(this));
}

auto SurfaceDescriptor::operator=(SurfaceDescriptorD3D10&& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10(std::move(aRhs));
    mType = TSurfaceDescriptorD3D10;
    return (*(this));
}

auto SurfaceDescriptor::operator=(const SurfaceDescriptorDXGIYCbCr& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr(aRhs);
    mType = TSurfaceDescriptorDXGIYCbCr;
    return (*(this));
}

auto SurfaceDescriptor::operator=(SurfaceDescriptorDXGIYCbCr&& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr(std::move(aRhs));
    mType = TSurfaceDescriptorDXGIYCbCr;
    return (*(this));
}

auto SurfaceDescriptor::operator=(const SurfaceDescriptorDMABuf& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDMABuf()) SurfaceDescriptorDMABuf(aRhs);
    mType = TSurfaceDescriptorDMABuf;
    return (*(this));
}

auto SurfaceDescriptor::operator=(SurfaceDescriptorDMABuf&& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDMABuf()) SurfaceDescriptorDMABuf(std::move(aRhs));
    mType = TSurfaceDescriptorDMABuf;
    return (*(this));
}

auto SurfaceDescriptor::operator=(const SurfaceTextureDescriptor& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor(aRhs);
    mType = TSurfaceTextureDescriptor;
    return (*(this));
}

auto SurfaceDescriptor::operator=(SurfaceTextureDescriptor&& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor(std::move(aRhs));
    mType = TSurfaceTextureDescriptor;
    return (*(this));
}

auto SurfaceDescriptor::operator=(const SurfaceDescriptorAndroidHardwareBuffer& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorAndroidHardwareBuffer()) SurfaceDescriptorAndroidHardwareBuffer(aRhs);
    mType = TSurfaceDescriptorAndroidHardwareBuffer;
    return (*(this));
}

auto SurfaceDescriptor::operator=(SurfaceDescriptorAndroidHardwareBuffer&& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorAndroidHardwareBuffer()) SurfaceDescriptorAndroidHardwareBuffer(std::move(aRhs));
    mType = TSurfaceDescriptorAndroidHardwareBuffer;
    return (*(this));
}

auto SurfaceDescriptor::operator=(const AndroidImageReaderImageDescriptor& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_AndroidImageReaderImageDescriptor()) AndroidImageReaderImageDescriptor(aRhs);
    mType = TAndroidImageReaderImageDescriptor;
    return (*(this));
}

auto SurfaceDescriptor::operator=(AndroidImageReaderImageDescriptor&& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_AndroidImageReaderImageDescriptor()) AndroidImageReaderImageDescriptor(std::move(aRhs));
    mType = TAndroidImageReaderImageDescriptor;
    return (*(this));
}

auto SurfaceDescriptor::operator=(const EGLImageDescriptor& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor(aRhs);
    mType = TEGLImageDescriptor;
    return (*(this));
}

auto SurfaceDescriptor::operator=(EGLImageDescriptor&& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor(std::move(aRhs));
    mType = TEGLImageDescriptor;
    return (*(this));
}

auto SurfaceDescriptor::operator=(const SurfaceDescriptorMacIOSurface& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface(aRhs);
    mType = TSurfaceDescriptorMacIOSurface;
    return (*(this));
}

auto SurfaceDescriptor::operator=(SurfaceDescriptorMacIOSurface&& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface(std::move(aRhs));
    mType = TSurfaceDescriptorMacIOSurface;
    return (*(this));
}

auto SurfaceDescriptor::operator=(const SurfaceDescriptorSharedGLTexture& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture(aRhs);
    mType = TSurfaceDescriptorSharedGLTexture;
    return (*(this));
}

auto SurfaceDescriptor::operator=(SurfaceDescriptorSharedGLTexture&& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture(std::move(aRhs));
    mType = TSurfaceDescriptorSharedGLTexture;
    return (*(this));
}

auto SurfaceDescriptor::operator=(const SurfaceDescriptorGPUVideo& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo(aRhs);
    mType = TSurfaceDescriptorGPUVideo;
    return (*(this));
}

auto SurfaceDescriptor::operator=(SurfaceDescriptorGPUVideo&& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo(std::move(aRhs));
    mType = TSurfaceDescriptorGPUVideo;
    return (*(this));
}

auto SurfaceDescriptor::operator=(const SurfaceDescriptorRemoteTexture& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorRemoteTexture()) SurfaceDescriptorRemoteTexture(aRhs);
    mType = TSurfaceDescriptorRemoteTexture;
    return (*(this));
}

auto SurfaceDescriptor::operator=(SurfaceDescriptorRemoteTexture&& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorRemoteTexture()) SurfaceDescriptorRemoteTexture(std::move(aRhs));
    mType = TSurfaceDescriptorRemoteTexture;
    return (*(this));
}

auto SurfaceDescriptor::operator=(const SurfaceDescriptorDcompSurface& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDcompSurface()) SurfaceDescriptorDcompSurface(aRhs);
    mType = TSurfaceDescriptorDcompSurface;
    return (*(this));
}

auto SurfaceDescriptor::operator=(SurfaceDescriptorDcompSurface&& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDcompSurface()) SurfaceDescriptorDcompSurface(std::move(aRhs));
    mType = TSurfaceDescriptorDcompSurface;
    return (*(this));
}

auto SurfaceDescriptor::operator=(const SurfaceDescriptorExternalImage& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorExternalImage()) SurfaceDescriptorExternalImage(aRhs);
    mType = TSurfaceDescriptorExternalImage;
    return (*(this));
}

auto SurfaceDescriptor::operator=(SurfaceDescriptorExternalImage&& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorExternalImage()) SurfaceDescriptorExternalImage(std::move(aRhs));
    mType = TSurfaceDescriptorExternalImage;
    return (*(this));
}

auto SurfaceDescriptor::operator=(const SurfaceDescriptorCanvasSurface& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorCanvasSurface()) SurfaceDescriptorCanvasSurface(aRhs);
    mType = TSurfaceDescriptorCanvasSurface;
    return (*(this));
}

auto SurfaceDescriptor::operator=(SurfaceDescriptorCanvasSurface&& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_SurfaceDescriptorCanvasSurface()) SurfaceDescriptorCanvasSurface(std::move(aRhs));
    mType = TSurfaceDescriptorCanvasSurface;
    return (*(this));
}

auto SurfaceDescriptor::operator=(const null_t& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_null_t()) null_t(aRhs);
    mType = Tnull_t;
    return (*(this));
}

auto SurfaceDescriptor::operator=(null_t&& aRhs) -> SurfaceDescriptor&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_null_t()) null_t(std::move(aRhs));
    mType = Tnull_t;
    return (*(this));
}

auto SurfaceDescriptor::operator=(const SurfaceDescriptor& aRhs) -> SurfaceDescriptor&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TSurfaceDescriptorBuffer:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer((aRhs).get_SurfaceDescriptorBuffer());
            break;
        }
    case TSurfaceDescriptorD3D10:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10((aRhs).get_SurfaceDescriptorD3D10());
            break;
        }
    case TSurfaceDescriptorDXGIYCbCr:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr((aRhs).get_SurfaceDescriptorDXGIYCbCr());
            break;
        }
    case TSurfaceDescriptorDMABuf:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDMABuf()) SurfaceDescriptorDMABuf((aRhs).get_SurfaceDescriptorDMABuf());
            break;
        }
    case TSurfaceTextureDescriptor:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor((aRhs).get_SurfaceTextureDescriptor());
            break;
        }
    case TSurfaceDescriptorAndroidHardwareBuffer:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorAndroidHardwareBuffer()) SurfaceDescriptorAndroidHardwareBuffer((aRhs).get_SurfaceDescriptorAndroidHardwareBuffer());
            break;
        }
    case TAndroidImageReaderImageDescriptor:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_AndroidImageReaderImageDescriptor()) AndroidImageReaderImageDescriptor((aRhs).get_AndroidImageReaderImageDescriptor());
            break;
        }
    case TEGLImageDescriptor:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor((aRhs).get_EGLImageDescriptor());
            break;
        }
    case TSurfaceDescriptorMacIOSurface:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface((aRhs).get_SurfaceDescriptorMacIOSurface());
            break;
        }
    case TSurfaceDescriptorSharedGLTexture:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture((aRhs).get_SurfaceDescriptorSharedGLTexture());
            break;
        }
    case TSurfaceDescriptorGPUVideo:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo((aRhs).get_SurfaceDescriptorGPUVideo());
            break;
        }
    case TSurfaceDescriptorRemoteTexture:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorRemoteTexture()) SurfaceDescriptorRemoteTexture((aRhs).get_SurfaceDescriptorRemoteTexture());
            break;
        }
    case TSurfaceDescriptorDcompSurface:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDcompSurface()) SurfaceDescriptorDcompSurface((aRhs).get_SurfaceDescriptorDcompSurface());
            break;
        }
    case TSurfaceDescriptorExternalImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorExternalImage()) SurfaceDescriptorExternalImage((aRhs).get_SurfaceDescriptorExternalImage());
            break;
        }
    case TSurfaceDescriptorCanvasSurface:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorCanvasSurface()) SurfaceDescriptorCanvasSurface((aRhs).get_SurfaceDescriptorCanvasSurface());
            break;
        }
    case Tnull_t:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_null_t()) null_t((aRhs).get_null_t());
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    mType = t;
    return (*(this));
}

auto SurfaceDescriptor::operator=(SurfaceDescriptor&& aRhs) -> SurfaceDescriptor&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TSurfaceDescriptorBuffer:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer(std::move((aRhs).get_SurfaceDescriptorBuffer()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorD3D10:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10(std::move((aRhs).get_SurfaceDescriptorD3D10()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorDXGIYCbCr:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr(std::move((aRhs).get_SurfaceDescriptorDXGIYCbCr()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorDMABuf:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDMABuf()) SurfaceDescriptorDMABuf(std::move((aRhs).get_SurfaceDescriptorDMABuf()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TSurfaceTextureDescriptor:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor(std::move((aRhs).get_SurfaceTextureDescriptor()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorAndroidHardwareBuffer:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorAndroidHardwareBuffer()) SurfaceDescriptorAndroidHardwareBuffer(std::move((aRhs).get_SurfaceDescriptorAndroidHardwareBuffer()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TAndroidImageReaderImageDescriptor:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_AndroidImageReaderImageDescriptor()) AndroidImageReaderImageDescriptor(std::move((aRhs).get_AndroidImageReaderImageDescriptor()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TEGLImageDescriptor:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor(std::move((aRhs).get_EGLImageDescriptor()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorMacIOSurface:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface(std::move((aRhs).get_SurfaceDescriptorMacIOSurface()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorSharedGLTexture:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture(std::move((aRhs).get_SurfaceDescriptorSharedGLTexture()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorGPUVideo:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo(std::move((aRhs).get_SurfaceDescriptorGPUVideo()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorRemoteTexture:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorRemoteTexture()) SurfaceDescriptorRemoteTexture(std::move((aRhs).get_SurfaceDescriptorRemoteTexture()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorDcompSurface:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDcompSurface()) SurfaceDescriptorDcompSurface(std::move((aRhs).get_SurfaceDescriptorDcompSurface()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorExternalImage:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorExternalImage()) SurfaceDescriptorExternalImage(std::move((aRhs).get_SurfaceDescriptorExternalImage()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TSurfaceDescriptorCanvasSurface:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_SurfaceDescriptorCanvasSurface()) SurfaceDescriptorCanvasSurface(std::move((aRhs).get_SurfaceDescriptorCanvasSurface()));
            (aRhs).MaybeDestroy();
            break;
        }
    case Tnull_t:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_null_t()) null_t(std::move((aRhs).get_null_t()));
            (aRhs).MaybeDestroy();
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    (aRhs).mType = T__None;
    mType = t;
    return (*(this));
}

auto SurfaceDescriptor::operator==(const SurfaceDescriptorBuffer& aRhs) const -> bool
{
    return (get_SurfaceDescriptorBuffer()) == (aRhs);
}

auto SurfaceDescriptor::operator==(const SurfaceDescriptorD3D10& aRhs) const -> bool
{
    return (get_SurfaceDescriptorD3D10()) == (aRhs);
}

auto SurfaceDescriptor::operator==(const SurfaceDescriptorDXGIYCbCr& aRhs) const -> bool
{
    return (get_SurfaceDescriptorDXGIYCbCr()) == (aRhs);
}

auto SurfaceDescriptor::operator==(const SurfaceDescriptorDMABuf& aRhs) const -> bool
{
    return (get_SurfaceDescriptorDMABuf()) == (aRhs);
}

auto SurfaceDescriptor::operator==(const SurfaceTextureDescriptor& aRhs) const -> bool
{
    return (get_SurfaceTextureDescriptor()) == (aRhs);
}

auto SurfaceDescriptor::operator==(const SurfaceDescriptorAndroidHardwareBuffer& aRhs) const -> bool
{
    return (get_SurfaceDescriptorAndroidHardwareBuffer()) == (aRhs);
}

auto SurfaceDescriptor::operator==(const AndroidImageReaderImageDescriptor& aRhs) const -> bool
{
    return (get_AndroidImageReaderImageDescriptor()) == (aRhs);
}

auto SurfaceDescriptor::operator==(const EGLImageDescriptor& aRhs) const -> bool
{
    return (get_EGLImageDescriptor()) == (aRhs);
}

auto SurfaceDescriptor::operator==(const SurfaceDescriptorMacIOSurface& aRhs) const -> bool
{
    return (get_SurfaceDescriptorMacIOSurface()) == (aRhs);
}

auto SurfaceDescriptor::operator==(const SurfaceDescriptorSharedGLTexture& aRhs) const -> bool
{
    return (get_SurfaceDescriptorSharedGLTexture()) == (aRhs);
}

auto SurfaceDescriptor::operator==(const SurfaceDescriptorGPUVideo& aRhs) const -> bool
{
    return (get_SurfaceDescriptorGPUVideo()) == (aRhs);
}

auto SurfaceDescriptor::operator==(const SurfaceDescriptorRemoteTexture& aRhs) const -> bool
{
    return (get_SurfaceDescriptorRemoteTexture()) == (aRhs);
}

auto SurfaceDescriptor::operator==(const SurfaceDescriptorDcompSurface& aRhs) const -> bool
{
    return (get_SurfaceDescriptorDcompSurface()) == (aRhs);
}

auto SurfaceDescriptor::operator==(const SurfaceDescriptorExternalImage& aRhs) const -> bool
{
    return (get_SurfaceDescriptorExternalImage()) == (aRhs);
}

auto SurfaceDescriptor::operator==(const SurfaceDescriptorCanvasSurface& aRhs) const -> bool
{
    return (get_SurfaceDescriptorCanvasSurface()) == (aRhs);
}

auto SurfaceDescriptor::operator==(const null_t& aRhs) const -> bool
{
    return (get_null_t()) == (aRhs);
}

auto SurfaceDescriptor::operator==(const SurfaceDescriptor& aRhs) const -> bool
{
    if ((type()) != ((aRhs).type())) {
        return false;
    }

    switch (type()) {
    case TSurfaceDescriptorBuffer:
        {
            return (get_SurfaceDescriptorBuffer()) == ((aRhs).get_SurfaceDescriptorBuffer());
        }
    case TSurfaceDescriptorD3D10:
        {
            return (get_SurfaceDescriptorD3D10()) == ((aRhs).get_SurfaceDescriptorD3D10());
        }
    case TSurfaceDescriptorDXGIYCbCr:
        {
            return (get_SurfaceDescriptorDXGIYCbCr()) == ((aRhs).get_SurfaceDescriptorDXGIYCbCr());
        }
    case TSurfaceDescriptorDMABuf:
        {
            return (get_SurfaceDescriptorDMABuf()) == ((aRhs).get_SurfaceDescriptorDMABuf());
        }
    case TSurfaceTextureDescriptor:
        {
            return (get_SurfaceTextureDescriptor()) == ((aRhs).get_SurfaceTextureDescriptor());
        }
    case TSurfaceDescriptorAndroidHardwareBuffer:
        {
            return (get_SurfaceDescriptorAndroidHardwareBuffer()) == ((aRhs).get_SurfaceDescriptorAndroidHardwareBuffer());
        }
    case TAndroidImageReaderImageDescriptor:
        {
            return (get_AndroidImageReaderImageDescriptor()) == ((aRhs).get_AndroidImageReaderImageDescriptor());
        }
    case TEGLImageDescriptor:
        {
            return (get_EGLImageDescriptor()) == ((aRhs).get_EGLImageDescriptor());
        }
    case TSurfaceDescriptorMacIOSurface:
        {
            return (get_SurfaceDescriptorMacIOSurface()) == ((aRhs).get_SurfaceDescriptorMacIOSurface());
        }
    case TSurfaceDescriptorSharedGLTexture:
        {
            return (get_SurfaceDescriptorSharedGLTexture()) == ((aRhs).get_SurfaceDescriptorSharedGLTexture());
        }
    case TSurfaceDescriptorGPUVideo:
        {
            return (get_SurfaceDescriptorGPUVideo()) == ((aRhs).get_SurfaceDescriptorGPUVideo());
        }
    case TSurfaceDescriptorRemoteTexture:
        {
            return (get_SurfaceDescriptorRemoteTexture()) == ((aRhs).get_SurfaceDescriptorRemoteTexture());
        }
    case TSurfaceDescriptorDcompSurface:
        {
            return (get_SurfaceDescriptorDcompSurface()) == ((aRhs).get_SurfaceDescriptorDcompSurface());
        }
    case TSurfaceDescriptorExternalImage:
        {
            return (get_SurfaceDescriptorExternalImage()) == ((aRhs).get_SurfaceDescriptorExternalImage());
        }
    case TSurfaceDescriptorCanvasSurface:
        {
            return (get_SurfaceDescriptorCanvasSurface()) == ((aRhs).get_SurfaceDescriptorCanvasSurface());
        }
    case Tnull_t:
        {
            return (get_null_t()) == ((aRhs).get_null_t());
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return false;
        }
    }
}

} // namespace layers
} // namespace mozilla

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

    switch (type) {
    case union__::TSurfaceDescriptorBuffer:
        {
            IPC::WriteParam(aWriter, (aVar).get_SurfaceDescriptorBuffer());
            // Sentinel = 'TSurfaceDescriptorBuffer'
            (aWriter)->WriteSentinel(1978075543);
            return;
        }
    case union__::TSurfaceDescriptorD3D10:
        {
            IPC::WriteParam(aWriter, (aVar).get_SurfaceDescriptorD3D10());
            // Sentinel = 'TSurfaceDescriptorD3D10'
            (aWriter)->WriteSentinel(1783433305);
            return;
        }
    case union__::TSurfaceDescriptorDXGIYCbCr:
        {
            IPC::WriteParam(aWriter, (aVar).get_SurfaceDescriptorDXGIYCbCr());
            // Sentinel = 'TSurfaceDescriptorDXGIYCbCr'
            (aWriter)->WriteSentinel(2440366620);
            return;
        }
    case union__::TSurfaceDescriptorDMABuf:
        {
            IPC::WriteParam(aWriter, (aVar).get_SurfaceDescriptorDMABuf());
            // Sentinel = 'TSurfaceDescriptorDMABuf'
            (aWriter)->WriteSentinel(1950288172);
            return;
        }
    case union__::TSurfaceTextureDescriptor:
        {
            IPC::WriteParam(aWriter, (aVar).get_SurfaceTextureDescriptor());
            // Sentinel = 'TSurfaceTextureDescriptor'
            (aWriter)->WriteSentinel(2169768494);
            return;
        }
    case union__::TSurfaceDescriptorAndroidHardwareBuffer:
        {
            IPC::WriteParam(aWriter, (aVar).get_SurfaceDescriptorAndroidHardwareBuffer());
            // Sentinel = 'TSurfaceDescriptorAndroidHardwareBuffer'
            (aWriter)->WriteSentinel(882118534);
            return;
        }
    case union__::TAndroidImageReaderImageDescriptor:
        {
            IPC::WriteParam(aWriter, (aVar).get_AndroidImageReaderImageDescriptor());
            // Sentinel = 'TAndroidImageReaderImageDescriptor'
            (aWriter)->WriteSentinel(3812494670);
            return;
        }
    case union__::TEGLImageDescriptor:
        {
            IPC::WriteParam(aWriter, (aVar).get_EGLImageDescriptor());
            // Sentinel = 'TEGLImageDescriptor'
            (aWriter)->WriteSentinel(1117521711);
            return;
        }
    case union__::TSurfaceDescriptorMacIOSurface:
        {
            IPC::WriteParam(aWriter, (aVar).get_SurfaceDescriptorMacIOSurface());
            // Sentinel = 'TSurfaceDescriptorMacIOSurface'
            (aWriter)->WriteSentinel(3041594287);
            return;
        }
    case union__::TSurfaceDescriptorSharedGLTexture:
        {
            IPC::WriteParam(aWriter, (aVar).get_SurfaceDescriptorSharedGLTexture());
            // Sentinel = 'TSurfaceDescriptorSharedGLTexture'
            (aWriter)->WriteSentinel(3701148952);
            return;
        }
    case union__::TSurfaceDescriptorGPUVideo:
        {
            IPC::WriteParam(aWriter, (aVar).get_SurfaceDescriptorGPUVideo());
            // Sentinel = 'TSurfaceDescriptorGPUVideo'
            (aWriter)->WriteSentinel(2292386336);
            return;
        }
    case union__::TSurfaceDescriptorRemoteTexture:
        {
            IPC::WriteParam(aWriter, (aVar).get_SurfaceDescriptorRemoteTexture());
            // Sentinel = 'TSurfaceDescriptorRemoteTexture'
            (aWriter)->WriteSentinel(3310881946);
            return;
        }
    case union__::TSurfaceDescriptorDcompSurface:
        {
            IPC::WriteParam(aWriter, (aVar).get_SurfaceDescriptorDcompSurface());
            // Sentinel = 'TSurfaceDescriptorDcompSurface'
            (aWriter)->WriteSentinel(3082357753);
            return;
        }
    case union__::TSurfaceDescriptorExternalImage:
        {
            IPC::WriteParam(aWriter, (aVar).get_SurfaceDescriptorExternalImage());
            // Sentinel = 'TSurfaceDescriptorExternalImage'
            (aWriter)->WriteSentinel(3302886499);
            return;
        }
    case union__::TSurfaceDescriptorCanvasSurface:
        {
            IPC::WriteParam(aWriter, (aVar).get_SurfaceDescriptorCanvasSurface());
            // Sentinel = 'TSurfaceDescriptorCanvasSurface'
            (aWriter)->WriteSentinel(3290696802);
            return;
        }
    case union__::Tnull_t:
        {
            IPC::WriteParam(aWriter, (aVar).get_null_t());
            // Sentinel = 'Tnull_t'
            (aWriter)->WriteSentinel(190186211);
            return;
        }
    default:
        {
            aWriter->FatalError("unknown variant of union SurfaceDescriptor");
            return;
        }
    }
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TSurfaceDescriptorCanvasSurface'
            if ((!((aReader)->ReadSentinel(3290696802)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TSurfaceDescriptorCanvasSurface of union SurfaceDescriptor");
                return {};
            }
            return std::move(tmp);
        }
    case union__::Tnull_t:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::null_t>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant Tnull_t of union SurfaceDescriptor");
                return {};

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

} // namespace IPC
