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

#ifndef LayersSurfaces_h
#define LayersSurfaces_h

#include "mozilla/Attributes.h"
#include "IPCMessageStart.h"
#include "mozilla/RefPtr.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsTHashtable.h"
#include "mozilla/MozPromise.h"
#include "mozilla/OperatorNewExtensions.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/ipc/ByteBuf.h"
#include "mozilla/ipc/FileDescriptor.h"
#include "mozilla/ipc/IPCForwards.h"
#include "mozilla/ipc/Shmem.h"

// Headers for typedefs
#include "ImageTypes.h"
#include "mozilla/gfx/FileHandleWrapper.h"
#include "mozilla/gfx/Matrix.h"
#include "mozilla/gfx/Point.h"
#include "mozilla/gfx/Rect.h"
#include "mozilla/gfx/Types.h"
#include "mozilla/ipc/IPCCore.h"
#include "mozilla/ipc/IPDLStructMember.h"
#include "mozilla/ipc/ProtocolUtils.h"
#include "mozilla/ipc/SharedMemoryHandle.h"
#include "mozilla/layers/GpuFence.h"
#include "mozilla/layers/LayersTypes.h"
#include "mozilla/layers/VideoBridgeUtils.h"
#include "mozilla/webrender/WebRenderTypes.h"


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct SurfaceDescriptorD3D10|
//
namespace mozilla {
namespace layers {
class SurfaceDescriptorD3D10 final
{
private:
    typedef ::mozilla::gfx::FileHandleWrapper FileHandleWrapper;
    typedef ::mozilla::layers::GpuProcessTextureId GpuProcessTextureId;
    typedef ::uint32_t uint32_t;
    typedef ::mozilla::gfx::SurfaceFormat SurfaceFormat;
    typedef ::mozilla::gfx::IntSize IntSize;
    typedef ::mozilla::gfx::ColorSpace2 ColorSpace2;
    typedef ::mozilla::gfx::ColorRange ColorRange;
    typedef ::mozilla::layers::CompositeProcessFencesHolderId CompositeProcessFencesHolderId;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    SurfaceDescriptorD3D10() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT SurfaceDescriptorD3D10(
            FileHandleWrapper* _handle,
            const mozilla::Maybe<GpuProcessTextureId>& _gpuProcessTextureId,
            const uint32_t& _arrayIndex,
            const SurfaceFormat& _format,
            const IntSize& _size,
            const ColorSpace2& _colorSpace,
            const ColorRange& _colorRange,
            const bool& _hasKeyedMutex,
            const mozilla::Maybe<CompositeProcessFencesHolderId>& _fencesHolderId) :
        handle_(_handle),
        gpuProcessTextureId_(_gpuProcessTextureId),
        format_(_format),
        size_(_size),
        colorSpace_(_colorSpace),
        colorRange_(_colorRange),
        hasKeyedMutex_(_hasKeyedMutex),
        fencesHolderId_(_fencesHolderId),
        arrayIndex_(_arrayIndex)
    {
    }

    MOZ_IMPLICIT SurfaceDescriptorD3D10(
            RefPtr<FileHandleWrapper>&& _handle,
            mozilla::Maybe<GpuProcessTextureId>&& _gpuProcessTextureId,
            uint32_t&& _arrayIndex,
            SurfaceFormat&& _format,
            IntSize&& _size,
            ColorSpace2&& _colorSpace,
            ColorRange&& _colorRange,
            bool&& _hasKeyedMutex,
            mozilla::Maybe<CompositeProcessFencesHolderId>&& _fencesHolderId) :
        handle_(std::move(_handle)),
        gpuProcessTextureId_(std::move(_gpuProcessTextureId)),
        format_(std::move(_format)),
        size_(std::move(_size)),
        colorSpace_(std::move(_colorSpace)),
        colorRange_(std::move(_colorRange)),
        hasKeyedMutex_(std::move(_hasKeyedMutex)),
        fencesHolderId_(std::move(_fencesHolderId)),
        arrayIndex_(std::move(_arrayIndex))
    {
    }

    bool
    operator==(const SurfaceDescriptorD3D10& _o) const;

    bool
    operator!=(const SurfaceDescriptorD3D10& _o) const;

    RefPtr<FileHandleWrapper>&
    handle()
    {
        return handle_;
    }
    FileHandleWrapper*
    handle() const
    {
        return handle_;
    }

    mozilla::Maybe<GpuProcessTextureId>&
    gpuProcessTextureId()
    {
        return gpuProcessTextureId_;
    }
    const mozilla::Maybe<GpuProcessTextureId>&
    gpuProcessTextureId() const
    {
        return gpuProcessTextureId_;
    }

    uint32_t&
    arrayIndex()
    {
        return arrayIndex_;
    }
    const uint32_t&
    arrayIndex() const
    {
        return arrayIndex_;
    }

    SurfaceFormat&
    format()
    {
        return format_;
    }
    const SurfaceFormat&
    format() const
    {
        return format_;
    }

    IntSize&
    size()
    {
        return size_;
    }
    const IntSize&
    size() const
    {
        return size_;
    }

    ColorSpace2&
    colorSpace()
    {
        return colorSpace_;
    }
    const ColorSpace2&
    colorSpace() const
    {
        return colorSpace_;
    }

    ColorRange&
    colorRange()
    {
        return colorRange_;
    }
    const ColorRange&
    colorRange() const
    {
        return colorRange_;
    }

    bool&
    hasKeyedMutex()
    {
        return hasKeyedMutex_;
    }
    const bool&
    hasKeyedMutex() const
    {
        return hasKeyedMutex_;
    }

    mozilla::Maybe<CompositeProcessFencesHolderId>&
    fencesHolderId()
    {
        return fencesHolderId_;
    }
    const mozilla::Maybe<CompositeProcessFencesHolderId>&
    fencesHolderId() const
    {
        return fencesHolderId_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<RefPtr<FileHandleWrapper>> handle_;
    ::mozilla::ipc::IPDLStructMember<mozilla::Maybe<GpuProcessTextureId>> gpuProcessTextureId_;
    ::mozilla::ipc::IPDLStructMember<SurfaceFormat> format_;
    ::mozilla::ipc::IPDLStructMember<IntSize> size_;
    ::mozilla::ipc::IPDLStructMember<ColorSpace2> colorSpace_;
    ::mozilla::ipc::IPDLStructMember<ColorRange> colorRange_;
    ::mozilla::ipc::IPDLStructMember<bool> hasKeyedMutex_;
    ::mozilla::ipc::IPDLStructMember<mozilla::Maybe<CompositeProcessFencesHolderId>> fencesHolderId_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> arrayIndex_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::SurfaceDescriptorD3D10>
{
    typedef ::mozilla::layers::SurfaceDescriptorD3D10 paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct SurfaceDescriptorDXGIYCbCr|
//
namespace mozilla {
namespace layers {
class SurfaceDescriptorDXGIYCbCr final
{
private:
    typedef ::mozilla::gfx::FileHandleWrapper FileHandleWrapper;
    typedef ::mozilla::gfx::IntSize IntSize;
    typedef ::mozilla::gfx::ColorDepth ColorDepth;
    typedef ::mozilla::gfx::YUVColorSpace YUVColorSpace;
    typedef ::mozilla::gfx::ColorRange ColorRange;
    typedef ::mozilla::layers::CompositeProcessFencesHolderId CompositeProcessFencesHolderId;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    SurfaceDescriptorDXGIYCbCr() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT SurfaceDescriptorDXGIYCbCr(
            FileHandleWrapper* _handleY,
            FileHandleWrapper* _handleCb,
            FileHandleWrapper* _handleCr,
            const IntSize& _size,
            const IntSize& _sizeY,
            const IntSize& _sizeCbCr,
            const ColorDepth& _colorDepth,
            const YUVColorSpace& _yUVColorSpace,
            const ColorRange& _colorRange,
            const CompositeProcessFencesHolderId& _fencesHolderId) :
        handleY_(_handleY),
        handleCb_(_handleCb),
        handleCr_(_handleCr),
        size_(_size),
        sizeY_(_sizeY),
        sizeCbCr_(_sizeCbCr),
        colorDepth_(_colorDepth),
        yUVColorSpace_(_yUVColorSpace),
        colorRange_(_colorRange),
        fencesHolderId_(_fencesHolderId)
    {
    }

    MOZ_IMPLICIT SurfaceDescriptorDXGIYCbCr(
            RefPtr<FileHandleWrapper>&& _handleY,
            RefPtr<FileHandleWrapper>&& _handleCb,
            RefPtr<FileHandleWrapper>&& _handleCr,
            IntSize&& _size,
            IntSize&& _sizeY,
            IntSize&& _sizeCbCr,
            ColorDepth&& _colorDepth,
            YUVColorSpace&& _yUVColorSpace,
            ColorRange&& _colorRange,
            CompositeProcessFencesHolderId&& _fencesHolderId) :
        handleY_(std::move(_handleY)),
        handleCb_(std::move(_handleCb)),
        handleCr_(std::move(_handleCr)),
        size_(std::move(_size)),
        sizeY_(std::move(_sizeY)),
        sizeCbCr_(std::move(_sizeCbCr)),
        colorDepth_(std::move(_colorDepth)),
        yUVColorSpace_(std::move(_yUVColorSpace)),
        colorRange_(std::move(_colorRange)),
        fencesHolderId_(std::move(_fencesHolderId))
    {
    }

    bool
    operator==(const SurfaceDescriptorDXGIYCbCr& _o) const;

    bool
    operator!=(const SurfaceDescriptorDXGIYCbCr& _o) const;

    RefPtr<FileHandleWrapper>&
    handleY()
    {
        return handleY_;
    }
    FileHandleWrapper*
    handleY() const
    {
        return handleY_;
    }

    RefPtr<FileHandleWrapper>&
    handleCb()
    {
        return handleCb_;
    }
    FileHandleWrapper*
    handleCb() const
    {
        return handleCb_;
    }

    RefPtr<FileHandleWrapper>&
    handleCr()
    {
        return handleCr_;
    }
    FileHandleWrapper*
    handleCr() const
    {
        return handleCr_;
    }

    IntSize&
    size()
    {
        return size_;
    }
    const IntSize&
    size() const
    {
        return size_;
    }

    IntSize&
    sizeY()
    {
        return sizeY_;
    }
    const IntSize&
    sizeY() const
    {
        return sizeY_;
    }

    IntSize&
    sizeCbCr()
    {
        return sizeCbCr_;
    }
    const IntSize&
    sizeCbCr() const
    {
        return sizeCbCr_;
    }

    ColorDepth&
    colorDepth()
    {
        return colorDepth_;
    }
    const ColorDepth&
    colorDepth() const
    {
        return colorDepth_;
    }

    YUVColorSpace&
    yUVColorSpace()
    {
        return yUVColorSpace_;
    }
    const YUVColorSpace&
    yUVColorSpace() const
    {
        return yUVColorSpace_;
    }

    ColorRange&
    colorRange()
    {
        return colorRange_;
    }
    const ColorRange&
    colorRange() const
    {
        return colorRange_;
    }

    CompositeProcessFencesHolderId&
    fencesHolderId()
    {
        return fencesHolderId_;
    }
    const CompositeProcessFencesHolderId&
    fencesHolderId() const
    {
        return fencesHolderId_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<RefPtr<FileHandleWrapper>> handleY_;
    ::mozilla::ipc::IPDLStructMember<RefPtr<FileHandleWrapper>> handleCb_;
    ::mozilla::ipc::IPDLStructMember<RefPtr<FileHandleWrapper>> handleCr_;
    ::mozilla::ipc::IPDLStructMember<IntSize> size_;
    ::mozilla::ipc::IPDLStructMember<IntSize> sizeY_;
    ::mozilla::ipc::IPDLStructMember<IntSize> sizeCbCr_;
    ::mozilla::ipc::IPDLStructMember<ColorDepth> colorDepth_;
    ::mozilla::ipc::IPDLStructMember<YUVColorSpace> yUVColorSpace_;
    ::mozilla::ipc::IPDLStructMember<ColorRange> colorRange_;
    ::mozilla::ipc::IPDLStructMember<CompositeProcessFencesHolderId> fencesHolderId_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::SurfaceDescriptorDXGIYCbCr>
{
    typedef ::mozilla::layers::SurfaceDescriptorDXGIYCbCr paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct SurfaceDescriptorMacIOSurface|
//
namespace mozilla {
namespace layers {
class SurfaceDescriptorMacIOSurface final
{
private:
    typedef ::uint32_t uint32_t;
    typedef ::mozilla::gfx::YUVColorSpace YUVColorSpace;
    typedef ::mozilla::layers::GpuFence GpuFence;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    SurfaceDescriptorMacIOSurface() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT SurfaceDescriptorMacIOSurface(
            const uint32_t& _surfaceId,
            const bool& _isOpaque,
            const YUVColorSpace& _yUVColorSpace,
            GpuFence* _gpuFence) :
        isOpaque_(_isOpaque),
        yUVColorSpace_(_yUVColorSpace),
        gpuFence_(_gpuFence),
        surfaceId_(_surfaceId)
    {
    }

    MOZ_IMPLICIT SurfaceDescriptorMacIOSurface(
            uint32_t&& _surfaceId,
            bool&& _isOpaque,
            YUVColorSpace&& _yUVColorSpace,
            RefPtr<GpuFence>&& _gpuFence) :
        isOpaque_(std::move(_isOpaque)),
        yUVColorSpace_(std::move(_yUVColorSpace)),
        gpuFence_(std::move(_gpuFence)),
        surfaceId_(std::move(_surfaceId))
    {
    }

    bool
    operator==(const SurfaceDescriptorMacIOSurface& _o) const;

    bool
    operator!=(const SurfaceDescriptorMacIOSurface& _o) const;

    uint32_t&
    surfaceId()
    {
        return surfaceId_;
    }
    const uint32_t&
    surfaceId() const
    {
        return surfaceId_;
    }

    bool&
    isOpaque()
    {
        return isOpaque_;
    }
    const bool&
    isOpaque() const
    {
        return isOpaque_;
    }

    YUVColorSpace&
    yUVColorSpace()
    {
        return yUVColorSpace_;
    }
    const YUVColorSpace&
    yUVColorSpace() const
    {
        return yUVColorSpace_;
    }

    RefPtr<GpuFence>&
    gpuFence()
    {
        return gpuFence_;
    }
    GpuFence*
    gpuFence() const
    {
        return gpuFence_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<bool> isOpaque_;
    ::mozilla::ipc::IPDLStructMember<YUVColorSpace> yUVColorSpace_;
    ::mozilla::ipc::IPDLStructMember<RefPtr<GpuFence>> gpuFence_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> surfaceId_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::SurfaceDescriptorMacIOSurface>
{
    typedef ::mozilla::layers::SurfaceDescriptorMacIOSurface paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct SurfaceDescriptorDMABuf|
//
namespace mozilla {
namespace layers {
class SurfaceDescriptorDMABuf final
{
private:
    typedef ::uint32_t uint32_t;
    typedef ::uint64_t uint64_t;
    typedef ::mozilla::gfx::FileHandleWrapper FileHandleWrapper;
    typedef ::mozilla::gfx::YUVColorSpace YUVColorSpace;
    typedef ::mozilla::gfx::ColorRange ColorRange;
    typedef ::mozilla::gfx::ColorSpace2 ColorSpace2;
    typedef ::mozilla::gfx::TransferFunction TransferFunction;
    typedef ::mozilla::ipc::FileDescriptor FileDescriptor;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    SurfaceDescriptorDMABuf() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT SurfaceDescriptorDMABuf(
            const uint32_t& _bufferType,
            const uint32_t& _fourccFormat,
            const nsTArray<uint64_t>& _modifier,
            const uint32_t& _flags,
            const nsTArray<mozilla::NotNull<RefPtr<FileHandleWrapper>>>& _fds,
            const nsTArray<uint32_t>& _width,
            const nsTArray<uint32_t>& _height,
            const nsTArray<uint32_t>& _widthAligned,
            const nsTArray<uint32_t>& _heightAligned,
            const nsTArray<uint32_t>& _format,
            const nsTArray<uint32_t>& _strides,
            const nsTArray<uint32_t>& _offsets,
            const YUVColorSpace& _yUVColorSpace,
            const ColorRange& _colorRange,
            const ColorSpace2& _colorPrimaries,
            const TransferFunction& _transferFunction,
            const uint32_t& _chromaLocation,
            const nsTArray<mozilla::NotNull<RefPtr<FileHandleWrapper>>>& _fence,
            const uint32_t& _uid,
            const uint32_t& _pid,
            const nsTArray<FileDescriptor>& _refCount,
            FileHandleWrapper* _semaphoreFd) :
        modifier_(_modifier),
        fds_(_fds),
        width_(_width),
        height_(_height),
        widthAligned_(_widthAligned),
        heightAligned_(_heightAligned),
        format_(_format),
        strides_(_strides),
        offsets_(_offsets),
        yUVColorSpace_(_yUVColorSpace),
        colorRange_(_colorRange),
        colorPrimaries_(_colorPrimaries),
        transferFunction_(_transferFunction),
        fence_(_fence),
        refCount_(_refCount),
        semaphoreFd_(_semaphoreFd),
        bufferType_(_bufferType),
        fourccFormat_(_fourccFormat),
        flags_(_flags),
        chromaLocation_(_chromaLocation),
        uid_(_uid),
        pid_(_pid)
    {
    }

    MOZ_IMPLICIT SurfaceDescriptorDMABuf(
            uint32_t&& _bufferType,
            uint32_t&& _fourccFormat,
            nsTArray<uint64_t>&& _modifier,
            uint32_t&& _flags,
            nsTArray<mozilla::NotNull<RefPtr<FileHandleWrapper>>>&& _fds,
            nsTArray<uint32_t>&& _width,
            nsTArray<uint32_t>&& _height,
            nsTArray<uint32_t>&& _widthAligned,
            nsTArray<uint32_t>&& _heightAligned,
            nsTArray<uint32_t>&& _format,
            nsTArray<uint32_t>&& _strides,
            nsTArray<uint32_t>&& _offsets,
            YUVColorSpace&& _yUVColorSpace,
            ColorRange&& _colorRange,
            ColorSpace2&& _colorPrimaries,
            TransferFunction&& _transferFunction,
            uint32_t&& _chromaLocation,
            nsTArray<mozilla::NotNull<RefPtr<FileHandleWrapper>>>&& _fence,
            uint32_t&& _uid,
            uint32_t&& _pid,
            nsTArray<FileDescriptor>&& _refCount,
            RefPtr<FileHandleWrapper>&& _semaphoreFd) :
        modifier_(std::move(_modifier)),
        fds_(std::move(_fds)),
        width_(std::move(_width)),
        height_(std::move(_height)),
        widthAligned_(std::move(_widthAligned)),
        heightAligned_(std::move(_heightAligned)),
        format_(std::move(_format)),
        strides_(std::move(_strides)),
        offsets_(std::move(_offsets)),
        yUVColorSpace_(std::move(_yUVColorSpace)),
        colorRange_(std::move(_colorRange)),
        colorPrimaries_(std::move(_colorPrimaries)),
        transferFunction_(std::move(_transferFunction)),
        fence_(std::move(_fence)),
        refCount_(std::move(_refCount)),
        semaphoreFd_(std::move(_semaphoreFd)),
        bufferType_(std::move(_bufferType)),
        fourccFormat_(std::move(_fourccFormat)),
        flags_(std::move(_flags)),
        chromaLocation_(std::move(_chromaLocation)),
        uid_(std::move(_uid)),
        pid_(std::move(_pid))
    {
    }

    bool
    operator==(const SurfaceDescriptorDMABuf& _o) const;

    bool
    operator!=(const SurfaceDescriptorDMABuf& _o) const;

    uint32_t&
    bufferType()
    {
        return bufferType_;
    }
    const uint32_t&
    bufferType() const
    {
        return bufferType_;
    }

    uint32_t&
    fourccFormat()
    {
        return fourccFormat_;
    }
    const uint32_t&
    fourccFormat() const
    {
        return fourccFormat_;
    }

    nsTArray<uint64_t>&
    modifier()
    {
        return modifier_;
    }
    const nsTArray<uint64_t>&
    modifier() const
    {
        return modifier_;
    }

    uint32_t&
    flags()
    {
        return flags_;
    }
    const uint32_t&
    flags() const
    {
        return flags_;
    }

    nsTArray<mozilla::NotNull<RefPtr<FileHandleWrapper>>>&
    fds()
    {
        return fds_;
    }
    const nsTArray<mozilla::NotNull<RefPtr<FileHandleWrapper>>>&
    fds() const
    {
        return fds_;
    }

    nsTArray<uint32_t>&
    width()
    {
        return width_;
    }
    const nsTArray<uint32_t>&
    width() const
    {
        return width_;
    }

    nsTArray<uint32_t>&
    height()
    {
        return height_;
    }
    const nsTArray<uint32_t>&
    height() const
    {
        return height_;
    }

    nsTArray<uint32_t>&
    widthAligned()
    {
        return widthAligned_;
    }
    const nsTArray<uint32_t>&
    widthAligned() const
    {
        return widthAligned_;
    }

    nsTArray<uint32_t>&
    heightAligned()
    {
        return heightAligned_;
    }
    const nsTArray<uint32_t>&
    heightAligned() const
    {
        return heightAligned_;
    }

    nsTArray<uint32_t>&
    format()
    {
        return format_;
    }
    const nsTArray<uint32_t>&
    format() const
    {
        return format_;
    }

    nsTArray<uint32_t>&
    strides()
    {
        return strides_;
    }
    const nsTArray<uint32_t>&
    strides() const
    {
        return strides_;
    }

    nsTArray<uint32_t>&
    offsets()
    {
        return offsets_;
    }
    const nsTArray<uint32_t>&
    offsets() const
    {
        return offsets_;
    }

    YUVColorSpace&
    yUVColorSpace()
    {
        return yUVColorSpace_;
    }
    const YUVColorSpace&
    yUVColorSpace() const
    {
        return yUVColorSpace_;
    }

    ColorRange&
    colorRange()
    {
        return colorRange_;
    }
    const ColorRange&
    colorRange() const
    {
        return colorRange_;
    }

    ColorSpace2&
    colorPrimaries()
    {
        return colorPrimaries_;
    }
    const ColorSpace2&
    colorPrimaries() const
    {
        return colorPrimaries_;
    }

    TransferFunction&
    transferFunction()
    {
        return transferFunction_;
    }
    const TransferFunction&
    transferFunction() const
    {
        return transferFunction_;
    }

    uint32_t&
    chromaLocation()
    {
        return chromaLocation_;
    }
    const uint32_t&
    chromaLocation() const
    {
        return chromaLocation_;
    }

    nsTArray<mozilla::NotNull<RefPtr<FileHandleWrapper>>>&
    fence()
    {
        return fence_;
    }
    const nsTArray<mozilla::NotNull<RefPtr<FileHandleWrapper>>>&
    fence() const
    {
        return fence_;
    }

    uint32_t&
    uid()
    {
        return uid_;
    }
    const uint32_t&
    uid() const
    {
        return uid_;
    }

    uint32_t&
    pid()
    {
        return pid_;
    }
    const uint32_t&
    pid() const
    {
        return pid_;
    }

    nsTArray<FileDescriptor>&
    refCount()
    {
        return refCount_;
    }
    const nsTArray<FileDescriptor>&
    refCount() const
    {
        return refCount_;
    }

    RefPtr<FileHandleWrapper>&
    semaphoreFd()
    {
        return semaphoreFd_;
    }
    FileHandleWrapper*
    semaphoreFd() const
    {
        return semaphoreFd_;
    }

private:
    void
    StaticAssertions() const;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint64_t>> modifier_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<mozilla::NotNull<RefPtr<FileHandleWrapper>>>> fds_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint32_t>> width_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint32_t>> height_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint32_t>> widthAligned_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint32_t>> heightAligned_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint32_t>> format_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint32_t>> strides_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint32_t>> offsets_;
    ::mozilla::ipc::IPDLStructMember<YUVColorSpace> yUVColorSpace_;
    ::mozilla::ipc::IPDLStructMember<ColorRange> colorRange_;
    ::mozilla::ipc::IPDLStructMember<ColorSpace2> colorPrimaries_;
    ::mozilla::ipc::IPDLStructMember<TransferFunction> transferFunction_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<mozilla::NotNull<RefPtr<FileHandleWrapper>>>> fence_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<FileDescriptor>> refCount_;
    ::mozilla::ipc::IPDLStructMember<RefPtr<FileHandleWrapper>> semaphoreFd_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> bufferType_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> fourccFormat_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> flags_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> chromaLocation_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> uid_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> pid_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::SurfaceDescriptorDMABuf>
{
    typedef ::mozilla::layers::SurfaceDescriptorDMABuf paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct SurfaceTextureDescriptor|
//
namespace mozilla {
namespace layers {
class SurfaceTextureDescriptor final
{
private:
    typedef ::uint64_t uint64_t;
    typedef ::mozilla::gfx::IntSize IntSize;
    typedef ::mozilla::gfx::SurfaceFormat SurfaceFormat;
    typedef ::mozilla::gfx::Matrix4x4 Matrix4x4;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    SurfaceTextureDescriptor() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT SurfaceTextureDescriptor(
            const uint64_t& _handle,
            const IntSize& _size,
            const SurfaceFormat& _format,
            const bool& _continuous,
            const bool& _forceBT709ColorSpace,
            const mozilla::Maybe<Matrix4x4>& _transformOverride) :
        size_(_size),
        format_(_format),
        continuous_(_continuous),
        forceBT709ColorSpace_(_forceBT709ColorSpace),
        transformOverride_(_transformOverride),
        handle_(_handle)
    {
    }

    MOZ_IMPLICIT SurfaceTextureDescriptor(
            uint64_t&& _handle,
            IntSize&& _size,
            SurfaceFormat&& _format,
            bool&& _continuous,
            bool&& _forceBT709ColorSpace,
            mozilla::Maybe<Matrix4x4>&& _transformOverride) :
        size_(std::move(_size)),
        format_(std::move(_format)),
        continuous_(std::move(_continuous)),
        forceBT709ColorSpace_(std::move(_forceBT709ColorSpace)),
        transformOverride_(std::move(_transformOverride)),
        handle_(std::move(_handle))
    {
    }

    bool
    operator==(const SurfaceTextureDescriptor& _o) const;

    bool
    operator!=(const SurfaceTextureDescriptor& _o) const;

    uint64_t&
    handle()
    {
        return handle_;
    }
    const uint64_t&
    handle() const
    {
        return handle_;
    }

    IntSize&
    size()
    {
        return size_;
    }
    const IntSize&
    size() const
    {
        return size_;
    }

    SurfaceFormat&
    format()
    {
        return format_;
    }
    const SurfaceFormat&
    format() const
    {
        return format_;
    }

    bool&
    continuous()
    {
        return continuous_;
    }
    const bool&
    continuous() const
    {
        return continuous_;
    }

    bool&
    forceBT709ColorSpace()
    {
        return forceBT709ColorSpace_;
    }
    const bool&
    forceBT709ColorSpace() const
    {
        return forceBT709ColorSpace_;
    }

    mozilla::Maybe<Matrix4x4>&
    transformOverride()
    {
        return transformOverride_;
    }
    const mozilla::Maybe<Matrix4x4>&
    transformOverride() const
    {
        return transformOverride_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<IntSize> size_;
    ::mozilla::ipc::IPDLStructMember<SurfaceFormat> format_;
    ::mozilla::ipc::IPDLStructMember<bool> continuous_;
    ::mozilla::ipc::IPDLStructMember<bool> forceBT709ColorSpace_;
    ::mozilla::ipc::IPDLStructMember<mozilla::Maybe<Matrix4x4>> transformOverride_;
    ::mozilla::ipc::IPDLStructMember<uint64_t> handle_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::SurfaceTextureDescriptor>
{
    typedef ::mozilla::layers::SurfaceTextureDescriptor paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct SurfaceDescriptorAndroidHardwareBuffer|
//
namespace mozilla {
namespace layers {
class SurfaceDescriptorAndroidHardwareBuffer final
{
private:
    typedef ::uint64_t uint64_t;
    typedef ::mozilla::gfx::IntSize IntSize;
    typedef ::mozilla::gfx::SurfaceFormat SurfaceFormat;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    SurfaceDescriptorAndroidHardwareBuffer() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT SurfaceDescriptorAndroidHardwareBuffer(
            const uint64_t& _bufferId,
            const IntSize& _size,
            const SurfaceFormat& _format) :
        size_(_size),
        format_(_format),
        bufferId_(_bufferId)
    {
    }

    MOZ_IMPLICIT SurfaceDescriptorAndroidHardwareBuffer(
            uint64_t&& _bufferId,
            IntSize&& _size,
            SurfaceFormat&& _format) :
        size_(std::move(_size)),
        format_(std::move(_format)),
        bufferId_(std::move(_bufferId))
    {
    }

    bool
    operator==(const SurfaceDescriptorAndroidHardwareBuffer& _o) const;

    bool
    operator!=(const SurfaceDescriptorAndroidHardwareBuffer& _o) const;

    uint64_t&
    bufferId()
    {
        return bufferId_;
    }
    const uint64_t&
    bufferId() const
    {
        return bufferId_;
    }

    IntSize&
    size()
    {
        return size_;
    }
    const IntSize&
    size() const
    {
        return size_;
    }

    SurfaceFormat&
    format()
    {
        return format_;
    }
    const SurfaceFormat&
    format() const
    {
        return format_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<IntSize> size_;
    ::mozilla::ipc::IPDLStructMember<SurfaceFormat> format_;
    ::mozilla::ipc::IPDLStructMember<uint64_t> bufferId_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::SurfaceDescriptorAndroidHardwareBuffer>
{
    typedef ::mozilla::layers::SurfaceDescriptorAndroidHardwareBuffer paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct EGLImageDescriptor|
//
namespace mozilla {
namespace layers {
class EGLImageDescriptor final
{
private:
    typedef ::uintptr_t uintptr_t;
    typedef ::mozilla::gfx::IntSize IntSize;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    EGLImageDescriptor() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT EGLImageDescriptor(
            const uintptr_t& _image,
            const uintptr_t& _fence,
            const IntSize& _size,
            const bool& _hasAlpha) :
        image_(_image),
        fence_(_fence),
        size_(_size),
        hasAlpha_(_hasAlpha)
    {
    }

    MOZ_IMPLICIT EGLImageDescriptor(
            uintptr_t&& _image,
            uintptr_t&& _fence,
            IntSize&& _size,
            bool&& _hasAlpha) :
        image_(std::move(_image)),
        fence_(std::move(_fence)),
        size_(std::move(_size)),
        hasAlpha_(std::move(_hasAlpha))
    {
    }

    bool
    operator==(const EGLImageDescriptor& _o) const;

    bool
    operator!=(const EGLImageDescriptor& _o) const;

    uintptr_t&
    image()
    {
        return image_;
    }
    const uintptr_t&
    image() const
    {
        return image_;
    }

    uintptr_t&
    fence()
    {
        return fence_;
    }
    const uintptr_t&
    fence() const
    {
        return fence_;
    }

    IntSize&
    size()
    {
        return size_;
    }
    const IntSize&
    size() const
    {
        return size_;
    }

    bool&
    hasAlpha()
    {
        return hasAlpha_;
    }
    const bool&
    hasAlpha() const
    {
        return hasAlpha_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<uintptr_t> image_;
    ::mozilla::ipc::IPDLStructMember<uintptr_t> fence_;
    ::mozilla::ipc::IPDLStructMember<IntSize> size_;
    ::mozilla::ipc::IPDLStructMember<bool> hasAlpha_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::EGLImageDescriptor>
{
    typedef ::mozilla::layers::EGLImageDescriptor paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct SurfaceDescriptorSharedGLTexture|
//
namespace mozilla {
namespace layers {
class SurfaceDescriptorSharedGLTexture final
{
private:
    typedef ::uint32_t uint32_t;
    typedef ::uintptr_t uintptr_t;
    typedef ::mozilla::gfx::IntSize IntSize;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    SurfaceDescriptorSharedGLTexture() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT SurfaceDescriptorSharedGLTexture(
            const uint32_t& _texture,
            const uint32_t& _target,
            const uintptr_t& _fence,
            const IntSize& _size,
            const bool& _hasAlpha) :
        fence_(_fence),
        size_(_size),
        hasAlpha_(_hasAlpha),
        texture_(_texture),
        target_(_target)
    {
    }

    MOZ_IMPLICIT SurfaceDescriptorSharedGLTexture(
            uint32_t&& _texture,
            uint32_t&& _target,
            uintptr_t&& _fence,
            IntSize&& _size,
            bool&& _hasAlpha) :
        fence_(std::move(_fence)),
        size_(std::move(_size)),
        hasAlpha_(std::move(_hasAlpha)),
        texture_(std::move(_texture)),
        target_(std::move(_target))
    {
    }

    bool
    operator==(const SurfaceDescriptorSharedGLTexture& _o) const;

    bool
    operator!=(const SurfaceDescriptorSharedGLTexture& _o) const;

    uint32_t&
    texture()
    {
        return texture_;
    }
    const uint32_t&
    texture() const
    {
        return texture_;
    }

    uint32_t&
    target()
    {
        return target_;
    }
    const uint32_t&
    target() const
    {
        return target_;
    }

    uintptr_t&
    fence()
    {
        return fence_;
    }
    const uintptr_t&
    fence() const
    {
        return fence_;
    }

    IntSize&
    size()
    {
        return size_;
    }
    const IntSize&
    size() const
    {
        return size_;
    }

    bool&
    hasAlpha()
    {
        return hasAlpha_;
    }
    const bool&
    hasAlpha() const
    {
        return hasAlpha_;
    }

private:
    void
    StaticAssertions() const;
    ::mozilla::ipc::IPDLStructMember<uintptr_t> fence_;
    ::mozilla::ipc::IPDLStructMember<IntSize> size_;
    ::mozilla::ipc::IPDLStructMember<bool> hasAlpha_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> texture_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> target_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::SurfaceDescriptorSharedGLTexture>
{
    typedef ::mozilla::layers::SurfaceDescriptorSharedGLTexture paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct SurfaceDescriptorDcompSurface|
//
namespace mozilla {
namespace layers {
class SurfaceDescriptorDcompSurface final
{
private:
    typedef ::mozilla::ipc::FileDescriptor FileDescriptor;
    typedef ::mozilla::gfx::IntSize IntSize;
    typedef ::mozilla::gfx::SurfaceFormat SurfaceFormat;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    SurfaceDescriptorDcompSurface() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT SurfaceDescriptorDcompSurface(
            const FileDescriptor& _handle,
            const IntSize& _size,
            const SurfaceFormat& _format) :
        handle_(_handle),
        size_(_size),
        format_(_format)
    {
    }

    MOZ_IMPLICIT SurfaceDescriptorDcompSurface(
            FileDescriptor&& _handle,
            IntSize&& _size,
            SurfaceFormat&& _format) :
        handle_(std::move(_handle)),
        size_(std::move(_size)),
        format_(std::move(_format))
    {
    }

    bool
    operator==(const SurfaceDescriptorDcompSurface& _o) const;

    bool
    operator!=(const SurfaceDescriptorDcompSurface& _o) const;

    FileDescriptor&
    handle()
    {
        return handle_;
    }
    const FileDescriptor&
    handle() const
    {
        return handle_;
    }

    IntSize&
    size()
    {
        return size_;
    }
    const IntSize&
    size() const
    {
        return size_;
    }

    SurfaceFormat&
    format()
    {
        return format_;
    }
    const SurfaceFormat&
    format() const
    {
        return format_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<FileDescriptor> handle_;
    ::mozilla::ipc::IPDLStructMember<IntSize> size_;
    ::mozilla::ipc::IPDLStructMember<SurfaceFormat> format_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::SurfaceDescriptorDcompSurface>
{
    typedef ::mozilla::layers::SurfaceDescriptorDcompSurface paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |union RemoteDecoderVideoSubDescriptor|
//
namespace mozilla {
namespace layers {
class RemoteDecoderVideoSubDescriptor final
{
public:
    enum Type {
        T__None,
        TSurfaceDescriptorD3D10 = 1,
        TSurfaceDescriptorDXGIYCbCr,
        TSurfaceDescriptorDMABuf,
        TSurfaceDescriptorMacIOSurface,
        TSurfaceDescriptorDcompSurface,
        Tnull_t,
        T__Last = Tnull_t
    };

private:
    typedef ::mozilla::layers::SurfaceDescriptorD3D10 SurfaceDescriptorD3D10;
    typedef ::mozilla::layers::SurfaceDescriptorDXGIYCbCr SurfaceDescriptorDXGIYCbCr;
    typedef ::mozilla::layers::SurfaceDescriptorDMABuf SurfaceDescriptorDMABuf;
    typedef ::mozilla::layers::SurfaceDescriptorMacIOSurface SurfaceDescriptorMacIOSurface;
    typedef ::mozilla::layers::SurfaceDescriptorDcompSurface SurfaceDescriptorDcompSurface;
    typedef ::mozilla::null_t null_t;
    typedef SurfaceDescriptorD3D10 SurfaceDescriptorD3D10__tdef;
    typedef SurfaceDescriptorDXGIYCbCr SurfaceDescriptorDXGIYCbCr__tdef;
    typedef SurfaceDescriptorDMABuf SurfaceDescriptorDMABuf__tdef;
    typedef SurfaceDescriptorMacIOSurface SurfaceDescriptorMacIOSurface__tdef;
    typedef SurfaceDescriptorDcompSurface SurfaceDescriptorDcompSurface__tdef;
    typedef null_t null_t__tdef;

    SurfaceDescriptorD3D10*
    ptr_SurfaceDescriptorD3D10()
    {
        return (&(mVSurfaceDescriptorD3D10));
    }
    const SurfaceDescriptorD3D10*
    constptr_SurfaceDescriptorD3D10() const
    {
        return (&(mVSurfaceDescriptorD3D10));
    }
    SurfaceDescriptorDXGIYCbCr*
    ptr_SurfaceDescriptorDXGIYCbCr()
    {
        return (&(mVSurfaceDescriptorDXGIYCbCr));
    }
    const SurfaceDescriptorDXGIYCbCr*
    constptr_SurfaceDescriptorDXGIYCbCr() const
    {
        return (&(mVSurfaceDescriptorDXGIYCbCr));
    }
    SurfaceDescriptorDMABuf*
    ptr_SurfaceDescriptorDMABuf()
    {
        return (&(mVSurfaceDescriptorDMABuf));
    }
    const SurfaceDescriptorDMABuf*
    constptr_SurfaceDescriptorDMABuf() const
    {
        return (&(mVSurfaceDescriptorDMABuf));
    }
    SurfaceDescriptorMacIOSurface*
    ptr_SurfaceDescriptorMacIOSurface()
    {
        return (&(mVSurfaceDescriptorMacIOSurface));
    }
    const SurfaceDescriptorMacIOSurface*
    constptr_SurfaceDescriptorMacIOSurface() const
    {
        return (&(mVSurfaceDescriptorMacIOSurface));
    }
    SurfaceDescriptorDcompSurface*
    ptr_SurfaceDescriptorDcompSurface()
    {
        return (&(mVSurfaceDescriptorDcompSurface));
    }
    const SurfaceDescriptorDcompSurface*
    constptr_SurfaceDescriptorDcompSurface() const
    {
        return (&(mVSurfaceDescriptorDcompSurface));
    }
    null_t*
    ptr_null_t()
    {
        return (&(mVnull_t));
    }
    const null_t*
    constptr_null_t() const
    {
        return (&(mVnull_t));
    }

    void
    MaybeDestroy();

    void
    AssertSanity() const
    {
        MOZ_RELEASE_ASSERT((T__None) <= (mType), "invalid type tag");
        MOZ_RELEASE_ASSERT((mType) <= (T__Last), "invalid type tag");
    }
    void
    AssertSanity(Type aType) const
    {
        AssertSanity();
        MOZ_RELEASE_ASSERT((mType) == (aType), "unexpected type tag");
    }

public:
    MOZ_IMPLICIT RemoteDecoderVideoSubDescriptor() :
        mType(T__None)
    {
    }

    MOZ_IMPLICIT RemoteDecoderVideoSubDescriptor(const SurfaceDescriptorD3D10& aOther);

    MOZ_IMPLICIT RemoteDecoderVideoSubDescriptor(SurfaceDescriptorD3D10&& aOther);

    MOZ_IMPLICIT RemoteDecoderVideoSubDescriptor(const SurfaceDescriptorDXGIYCbCr& aOther);

    MOZ_IMPLICIT RemoteDecoderVideoSubDescriptor(SurfaceDescriptorDXGIYCbCr&& aOther);

    MOZ_IMPLICIT RemoteDecoderVideoSubDescriptor(const SurfaceDescriptorDMABuf& aOther);

    MOZ_IMPLICIT RemoteDecoderVideoSubDescriptor(SurfaceDescriptorDMABuf&& aOther);

    MOZ_IMPLICIT RemoteDecoderVideoSubDescriptor(const SurfaceDescriptorMacIOSurface& aOther);

    MOZ_IMPLICIT RemoteDecoderVideoSubDescriptor(SurfaceDescriptorMacIOSurface&& aOther);

    MOZ_IMPLICIT RemoteDecoderVideoSubDescriptor(const SurfaceDescriptorDcompSurface& aOther);

    MOZ_IMPLICIT RemoteDecoderVideoSubDescriptor(SurfaceDescriptorDcompSurface&& aOther);

    MOZ_IMPLICIT RemoteDecoderVideoSubDescriptor(const null_t& aOther);

    MOZ_IMPLICIT RemoteDecoderVideoSubDescriptor(null_t&& aOther);

    MOZ_IMPLICIT RemoteDecoderVideoSubDescriptor(const RemoteDecoderVideoSubDescriptor& aOther);

    MOZ_IMPLICIT RemoteDecoderVideoSubDescriptor(RemoteDecoderVideoSubDescriptor&& aOther);

    ~RemoteDecoderVideoSubDescriptor();

    Type
    type() const
    {
        return mType;
    }

    RemoteDecoderVideoSubDescriptor&
    operator=(const SurfaceDescriptorD3D10& aRhs);

    RemoteDecoderVideoSubDescriptor&
    operator=(SurfaceDescriptorD3D10&& aRhs);

    RemoteDecoderVideoSubDescriptor&
    operator=(const SurfaceDescriptorDXGIYCbCr& aRhs);

    RemoteDecoderVideoSubDescriptor&
    operator=(SurfaceDescriptorDXGIYCbCr&& aRhs);

    RemoteDecoderVideoSubDescriptor&
    operator=(const SurfaceDescriptorDMABuf& aRhs);

    RemoteDecoderVideoSubDescriptor&
    operator=(SurfaceDescriptorDMABuf&& aRhs);

    RemoteDecoderVideoSubDescriptor&
    operator=(const SurfaceDescriptorMacIOSurface& aRhs);

    RemoteDecoderVideoSubDescriptor&
    operator=(SurfaceDescriptorMacIOSurface&& aRhs);

    RemoteDecoderVideoSubDescriptor&
    operator=(const SurfaceDescriptorDcompSurface& aRhs);

    RemoteDecoderVideoSubDescriptor&
    operator=(SurfaceDescriptorDcompSurface&& aRhs);

    RemoteDecoderVideoSubDescriptor&
    operator=(const null_t& aRhs);

    RemoteDecoderVideoSubDescriptor&
    operator=(null_t&& aRhs);

    RemoteDecoderVideoSubDescriptor&
    operator=(const RemoteDecoderVideoSubDescriptor& aRhs);

    RemoteDecoderVideoSubDescriptor&
    operator=(RemoteDecoderVideoSubDescriptor&& aRhs);

    bool
    operator==(const SurfaceDescriptorD3D10& aRhs) const;

    bool
    operator==(const SurfaceDescriptorDXGIYCbCr& aRhs) const;

    bool
    operator==(const SurfaceDescriptorDMABuf& aRhs) const;

    bool
    operator==(const SurfaceDescriptorMacIOSurface& aRhs) const;

    bool
    operator==(const SurfaceDescriptorDcompSurface& aRhs) const;

    bool
    operator==(const null_t& aRhs) const;

    bool
    operator==(const RemoteDecoderVideoSubDescriptor& aRhs) const;

    SurfaceDescriptorD3D10&
    get_SurfaceDescriptorD3D10()
    {
        AssertSanity(TSurfaceDescriptorD3D10);
        return (*(ptr_SurfaceDescriptorD3D10()));
    }
    const SurfaceDescriptorD3D10&
    get_SurfaceDescriptorD3D10() const
    {
        AssertSanity(TSurfaceDescriptorD3D10);
        return (*(constptr_SurfaceDescriptorD3D10()));
    }
    operator SurfaceDescriptorD3D10&()
    {
        return get_SurfaceDescriptorD3D10();
    }
    operator const SurfaceDescriptorD3D10&() const
    {
        return get_SurfaceDescriptorD3D10();
    }

    SurfaceDescriptorDXGIYCbCr&
    get_SurfaceDescriptorDXGIYCbCr()
    {
        AssertSanity(TSurfaceDescriptorDXGIYCbCr);
        return (*(ptr_SurfaceDescriptorDXGIYCbCr()));
    }
    const SurfaceDescriptorDXGIYCbCr&
    get_SurfaceDescriptorDXGIYCbCr() const
    {
        AssertSanity(TSurfaceDescriptorDXGIYCbCr);
        return (*(constptr_SurfaceDescriptorDXGIYCbCr()));
    }
    operator SurfaceDescriptorDXGIYCbCr&()
    {
        return get_SurfaceDescriptorDXGIYCbCr();
    }
    operator const SurfaceDescriptorDXGIYCbCr&() const
    {
        return get_SurfaceDescriptorDXGIYCbCr();
    }

    SurfaceDescriptorDMABuf&
    get_SurfaceDescriptorDMABuf()
    {
        AssertSanity(TSurfaceDescriptorDMABuf);
        return (*(ptr_SurfaceDescriptorDMABuf()));
    }
    const SurfaceDescriptorDMABuf&
    get_SurfaceDescriptorDMABuf() const
    {
        AssertSanity(TSurfaceDescriptorDMABuf);
        return (*(constptr_SurfaceDescriptorDMABuf()));
    }
    operator SurfaceDescriptorDMABuf&()
    {
        return get_SurfaceDescriptorDMABuf();
    }
    operator const SurfaceDescriptorDMABuf&() const
    {
        return get_SurfaceDescriptorDMABuf();
    }

    SurfaceDescriptorMacIOSurface&
    get_SurfaceDescriptorMacIOSurface()
    {
        AssertSanity(TSurfaceDescriptorMacIOSurface);
        return (*(ptr_SurfaceDescriptorMacIOSurface()));
    }
    const SurfaceDescriptorMacIOSurface&
    get_SurfaceDescriptorMacIOSurface() const
    {
        AssertSanity(TSurfaceDescriptorMacIOSurface);
        return (*(constptr_SurfaceDescriptorMacIOSurface()));
    }
    operator SurfaceDescriptorMacIOSurface&()
    {
        return get_SurfaceDescriptorMacIOSurface();
    }
    operator const SurfaceDescriptorMacIOSurface&() const
    {
        return get_SurfaceDescriptorMacIOSurface();
    }

    SurfaceDescriptorDcompSurface&
    get_SurfaceDescriptorDcompSurface()
    {
        AssertSanity(TSurfaceDescriptorDcompSurface);
        return (*(ptr_SurfaceDescriptorDcompSurface()));
    }
    const SurfaceDescriptorDcompSurface&
    get_SurfaceDescriptorDcompSurface() const
    {
        AssertSanity(TSurfaceDescriptorDcompSurface);
        return (*(constptr_SurfaceDescriptorDcompSurface()));
    }
    operator SurfaceDescriptorDcompSurface&()
    {
        return get_SurfaceDescriptorDcompSurface();
    }
    operator const SurfaceDescriptorDcompSurface&() const
    {
        return get_SurfaceDescriptorDcompSurface();
    }

    null_t&
    get_null_t()
    {
        AssertSanity(Tnull_t);
        return (*(ptr_null_t()));
    }
    const null_t&
    get_null_t() const
    {
        AssertSanity(Tnull_t);
        return (*(constptr_null_t()));
    }
    operator null_t&()
    {
        return get_null_t();
    }
    operator const null_t&() const
    {
        return get_null_t();
    }

private:
    union {
        SurfaceDescriptorD3D10 mVSurfaceDescriptorD3D10;
        SurfaceDescriptorDXGIYCbCr mVSurfaceDescriptorDXGIYCbCr;
        SurfaceDescriptorDMABuf mVSurfaceDescriptorDMABuf;
        SurfaceDescriptorMacIOSurface mVSurfaceDescriptorMacIOSurface;
        SurfaceDescriptorDcompSurface mVSurfaceDescriptorDcompSurface;
        null_t mVnull_t;
    };
    Type mType;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::RemoteDecoderVideoSubDescriptor>
{
    typedef ::mozilla::layers::RemoteDecoderVideoSubDescriptor paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct SurfaceDescriptorRemoteDecoder|
//
namespace mozilla {
namespace layers {
class SurfaceDescriptorRemoteDecoder final
{
private:
    typedef ::uint64_t uint64_t;
    typedef ::mozilla::layers::RemoteDecoderVideoSubDescriptor RemoteDecoderVideoSubDescriptor;
    typedef ::mozilla::layers::MaybeVideoBridgeSource MaybeVideoBridgeSource;
    typedef ::mozilla::layers::SurfaceDescriptorRemoteDecoderId SurfaceDescriptorRemoteDecoderId;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    SurfaceDescriptorRemoteDecoder() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT SurfaceDescriptorRemoteDecoder(
            const uint64_t& _handle,
            const RemoteDecoderVideoSubDescriptor& _subdesc,
            const MaybeVideoBridgeSource& _source,
            const SurfaceDescriptorRemoteDecoderId& _id) :
        subdesc_(_subdesc),
        source_(_source),
        id_(_id),
        handle_(_handle)
    {
    }

    MOZ_IMPLICIT SurfaceDescriptorRemoteDecoder(
            uint64_t&& _handle,
            RemoteDecoderVideoSubDescriptor&& _subdesc,
            MaybeVideoBridgeSource&& _source,
            SurfaceDescriptorRemoteDecoderId&& _id) :
        subdesc_(std::move(_subdesc)),
        source_(std::move(_source)),
        id_(std::move(_id)),
        handle_(std::move(_handle))
    {
    }

    bool
    operator==(const SurfaceDescriptorRemoteDecoder& _o) const;

    bool
    operator!=(const SurfaceDescriptorRemoteDecoder& _o) const;

    uint64_t&
    handle()
    {
        return handle_;
    }
    const uint64_t&
    handle() const
    {
        return handle_;
    }

    RemoteDecoderVideoSubDescriptor&
    subdesc()
    {
        return subdesc_;
    }
    const RemoteDecoderVideoSubDescriptor&
    subdesc() const
    {
        return subdesc_;
    }

    MaybeVideoBridgeSource&
    source()
    {
        return source_;
    }
    const MaybeVideoBridgeSource&
    source() const
    {
        return source_;
    }

    SurfaceDescriptorRemoteDecoderId&
    id()
    {
        return id_;
    }
    const SurfaceDescriptorRemoteDecoderId&
    id() const
    {
        return id_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<RemoteDecoderVideoSubDescriptor> subdesc_;
    ::mozilla::ipc::IPDLStructMember<MaybeVideoBridgeSource> source_;
    ::mozilla::ipc::IPDLStructMember<SurfaceDescriptorRemoteDecoderId> id_;
    ::mozilla::ipc::IPDLStructMember<uint64_t> handle_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::SurfaceDescriptorRemoteDecoder>
{
    typedef ::mozilla::layers::SurfaceDescriptorRemoteDecoder paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |union SurfaceDescriptorGPUVideo|
//
namespace mozilla {
namespace layers {
class SurfaceDescriptorGPUVideo final
{
public:
    enum Type {
        T__None,
        TSurfaceDescriptorRemoteDecoder = 1,
        T__Last = TSurfaceDescriptorRemoteDecoder
    };

private:
    typedef ::mozilla::layers::SurfaceDescriptorRemoteDecoder SurfaceDescriptorRemoteDecoder;
    typedef SurfaceDescriptorRemoteDecoder SurfaceDescriptorRemoteDecoder__tdef;

    SurfaceDescriptorRemoteDecoder*
    ptr_SurfaceDescriptorRemoteDecoder()
    {
        return (&(mVSurfaceDescriptorRemoteDecoder));
    }
    const SurfaceDescriptorRemoteDecoder*
    constptr_SurfaceDescriptorRemoteDecoder() const
    {
        return (&(mVSurfaceDescriptorRemoteDecoder));
    }

    void
    MaybeDestroy();

    void
    AssertSanity() const
    {
        MOZ_RELEASE_ASSERT((T__None) <= (mType), "invalid type tag");
        MOZ_RELEASE_ASSERT((mType) <= (T__Last), "invalid type tag");
    }
    void
    AssertSanity(Type aType) const
    {
        AssertSanity();
        MOZ_RELEASE_ASSERT((mType) == (aType), "unexpected type tag");
    }

public:
    MOZ_IMPLICIT SurfaceDescriptorGPUVideo() :
        mType(T__None)
    {
    }

    MOZ_IMPLICIT SurfaceDescriptorGPUVideo(const SurfaceDescriptorRemoteDecoder& aOther);

    MOZ_IMPLICIT SurfaceDescriptorGPUVideo(SurfaceDescriptorRemoteDecoder&& aOther);

    MOZ_IMPLICIT SurfaceDescriptorGPUVideo(const SurfaceDescriptorGPUVideo& aOther);

    MOZ_IMPLICIT SurfaceDescriptorGPUVideo(SurfaceDescriptorGPUVideo&& aOther);

    ~SurfaceDescriptorGPUVideo();

    Type
    type() const
    {
        return mType;
    }

    SurfaceDescriptorGPUVideo&
    operator=(const SurfaceDescriptorRemoteDecoder& aRhs);

    SurfaceDescriptorGPUVideo&
    operator=(SurfaceDescriptorRemoteDecoder&& aRhs);

    SurfaceDescriptorGPUVideo&
    operator=(const SurfaceDescriptorGPUVideo& aRhs);

    SurfaceDescriptorGPUVideo&
    operator=(SurfaceDescriptorGPUVideo&& aRhs);

    bool
    operator==(const SurfaceDescriptorRemoteDecoder& aRhs) const;

    bool
    operator==(const SurfaceDescriptorGPUVideo& aRhs) const;

    SurfaceDescriptorRemoteDecoder&
    get_SurfaceDescriptorRemoteDecoder()
    {
        AssertSanity(TSurfaceDescriptorRemoteDecoder);
        return (*(ptr_SurfaceDescriptorRemoteDecoder()));
    }
    const SurfaceDescriptorRemoteDecoder&
    get_SurfaceDescriptorRemoteDecoder() const
    {
        AssertSanity(TSurfaceDescriptorRemoteDecoder);
        return (*(constptr_SurfaceDescriptorRemoteDecoder()));
    }
    operator SurfaceDescriptorRemoteDecoder&()
    {
        return get_SurfaceDescriptorRemoteDecoder();
    }
    operator const SurfaceDescriptorRemoteDecoder&() const
    {
        return get_SurfaceDescriptorRemoteDecoder();
    }

private:
    union {
        SurfaceDescriptorRemoteDecoder mVSurfaceDescriptorRemoteDecoder;
    };
    Type mType;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::SurfaceDescriptorGPUVideo>
{
    typedef ::mozilla::layers::SurfaceDescriptorGPUVideo paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct RGBDescriptor|
//
namespace mozilla {
namespace layers {
class RGBDescriptor final
{
private:
    typedef ::mozilla::gfx::IntSize IntSize;
    typedef ::mozilla::gfx::SurfaceFormat SurfaceFormat;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    RGBDescriptor() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT RGBDescriptor(
            const IntSize& _size,
            const SurfaceFormat& _format) :
        size_(_size),
        format_(_format)
    {
    }

    MOZ_IMPLICIT RGBDescriptor(
            IntSize&& _size,
            SurfaceFormat&& _format) :
        size_(std::move(_size)),
        format_(std::move(_format))
    {
    }

    bool
    operator==(const RGBDescriptor& _o) const;

    bool
    operator!=(const RGBDescriptor& _o) const;

    IntSize&
    size()
    {
        return size_;
    }
    const IntSize&
    size() const
    {
        return size_;
    }

    SurfaceFormat&
    format()
    {
        return format_;
    }
    const SurfaceFormat&
    format() const
    {
        return format_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<IntSize> size_;
    ::mozilla::ipc::IPDLStructMember<SurfaceFormat> format_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::RGBDescriptor>
{
    typedef ::mozilla::layers::RGBDescriptor paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct YCbCrDescriptor|
//
namespace mozilla {
namespace layers {
class YCbCrDescriptor final
{
private:
    typedef ::mozilla::gfx::IntRect IntRect;
    typedef ::mozilla::gfx::IntSize IntSize;
    typedef ::uint32_t uint32_t;
    typedef ::mozilla::StereoMode StereoMode;
    typedef ::mozilla::gfx::ColorDepth ColorDepth;
    typedef ::mozilla::gfx::YUVColorSpace YUVColorSpace;
    typedef ::mozilla::gfx::ColorRange ColorRange;
    typedef ::mozilla::gfx::ChromaSubsampling ChromaSubsampling;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    YCbCrDescriptor() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT YCbCrDescriptor(
            const IntRect& _display,
            const IntSize& _ySize,
            const uint32_t& _yStride,
            const IntSize& _cbCrSize,
            const uint32_t& _cbCrStride,
            const uint32_t& _yOffset,
            const uint32_t& _cbOffset,
            const uint32_t& _crOffset,
            const StereoMode& _stereoMode,
            const ColorDepth& _colorDepth,
            const YUVColorSpace& _yUVColorSpace,
            const ColorRange& _colorRange,
            const ChromaSubsampling& _chromaSubsampling) :
        display_(_display),
        ySize_(_ySize),
        cbCrSize_(_cbCrSize),
        stereoMode_(_stereoMode),
        colorDepth_(_colorDepth),
        yUVColorSpace_(_yUVColorSpace),
        colorRange_(_colorRange),
        chromaSubsampling_(_chromaSubsampling),
        yStride_(_yStride),
        cbCrStride_(_cbCrStride),
        yOffset_(_yOffset),
        cbOffset_(_cbOffset),
        crOffset_(_crOffset)
    {
    }

    MOZ_IMPLICIT YCbCrDescriptor(
            IntRect&& _display,
            IntSize&& _ySize,
            uint32_t&& _yStride,
            IntSize&& _cbCrSize,
            uint32_t&& _cbCrStride,
            uint32_t&& _yOffset,
            uint32_t&& _cbOffset,
            uint32_t&& _crOffset,
            StereoMode&& _stereoMode,
            ColorDepth&& _colorDepth,
            YUVColorSpace&& _yUVColorSpace,
            ColorRange&& _colorRange,
            ChromaSubsampling&& _chromaSubsampling) :
        display_(std::move(_display)),
        ySize_(std::move(_ySize)),
        cbCrSize_(std::move(_cbCrSize)),
        stereoMode_(std::move(_stereoMode)),
        colorDepth_(std::move(_colorDepth)),
        yUVColorSpace_(std::move(_yUVColorSpace)),
        colorRange_(std::move(_colorRange)),
        chromaSubsampling_(std::move(_chromaSubsampling)),
        yStride_(std::move(_yStride)),
        cbCrStride_(std::move(_cbCrStride)),
        yOffset_(std::move(_yOffset)),
        cbOffset_(std::move(_cbOffset)),
        crOffset_(std::move(_crOffset))
    {
    }

    bool
    operator==(const YCbCrDescriptor& _o) const;

    bool
    operator!=(const YCbCrDescriptor& _o) const;

    IntRect&
    display()
    {
        return display_;
    }
    const IntRect&
    display() const
    {
        return display_;
    }

    IntSize&
    ySize()
    {
        return ySize_;
    }
    const IntSize&
    ySize() const
    {
        return ySize_;
    }

    uint32_t&
    yStride()
    {
        return yStride_;
    }
    const uint32_t&
    yStride() const
    {
        return yStride_;
    }

    IntSize&
    cbCrSize()
    {
        return cbCrSize_;
    }
    const IntSize&
    cbCrSize() const
    {
        return cbCrSize_;
    }

    uint32_t&
    cbCrStride()
    {
        return cbCrStride_;
    }
    const uint32_t&
    cbCrStride() const
    {
        return cbCrStride_;
    }

    uint32_t&
    yOffset()
    {
        return yOffset_;
    }
    const uint32_t&
    yOffset() const
    {
        return yOffset_;
    }

    uint32_t&
    cbOffset()
    {
        return cbOffset_;
    }
    const uint32_t&
    cbOffset() const
    {
        return cbOffset_;
    }

    uint32_t&
    crOffset()
    {
        return crOffset_;
    }
    const uint32_t&
    crOffset() const
    {
        return crOffset_;
    }

    StereoMode&
    stereoMode()
    {
        return stereoMode_;
    }
    const StereoMode&
    stereoMode() const
    {
        return stereoMode_;
    }

    ColorDepth&
    colorDepth()
    {
        return colorDepth_;
    }
    const ColorDepth&
    colorDepth() const
    {
        return colorDepth_;
    }

    YUVColorSpace&
    yUVColorSpace()
    {
        return yUVColorSpace_;
    }
    const YUVColorSpace&
    yUVColorSpace() const
    {
        return yUVColorSpace_;
    }

    ColorRange&
    colorRange()
    {
        return colorRange_;
    }
    const ColorRange&
    colorRange() const
    {
        return colorRange_;
    }

    ChromaSubsampling&
    chromaSubsampling()
    {
        return chromaSubsampling_;
    }
    const ChromaSubsampling&
    chromaSubsampling() const
    {
        return chromaSubsampling_;
    }

private:
    void
    StaticAssertions() const;
    ::mozilla::ipc::IPDLStructMember<IntRect> display_;
    ::mozilla::ipc::IPDLStructMember<IntSize> ySize_;
    ::mozilla::ipc::IPDLStructMember<IntSize> cbCrSize_;
    ::mozilla::ipc::IPDLStructMember<StereoMode> stereoMode_;
    ::mozilla::ipc::IPDLStructMember<ColorDepth> colorDepth_;
    ::mozilla::ipc::IPDLStructMember<YUVColorSpace> yUVColorSpace_;
    ::mozilla::ipc::IPDLStructMember<ColorRange> colorRange_;
    ::mozilla::ipc::IPDLStructMember<ChromaSubsampling> chromaSubsampling_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> yStride_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> cbCrStride_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> yOffset_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> cbOffset_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> crOffset_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::YCbCrDescriptor>
{
    typedef ::mozilla::layers::YCbCrDescriptor paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |union BufferDescriptor|
//
namespace mozilla {
namespace layers {
class BufferDescriptor final
{
public:
    enum Type {
        T__None,
        TRGBDescriptor = 1,
        TYCbCrDescriptor,
        T__Last = TYCbCrDescriptor
    };

private:
    typedef ::mozilla::layers::RGBDescriptor RGBDescriptor;
    typedef ::mozilla::layers::YCbCrDescriptor YCbCrDescriptor;
    typedef RGBDescriptor RGBDescriptor__tdef;
    typedef YCbCrDescriptor YCbCrDescriptor__tdef;

    RGBDescriptor*
    ptr_RGBDescriptor()
    {
        return (&(mVRGBDescriptor));
    }
    const RGBDescriptor*
    constptr_RGBDescriptor() const
    {
        return (&(mVRGBDescriptor));
    }
    YCbCrDescriptor*
    ptr_YCbCrDescriptor()
    {
        return (&(mVYCbCrDescriptor));
    }
    const YCbCrDescriptor*
    constptr_YCbCrDescriptor() const
    {
        return (&(mVYCbCrDescriptor));
    }

    void
    MaybeDestroy();

    void
    AssertSanity() const
    {
        MOZ_RELEASE_ASSERT((T__None) <= (mType), "invalid type tag");
        MOZ_RELEASE_ASSERT((mType) <= (T__Last), "invalid type tag");
    }
    void
    AssertSanity(Type aType) const
    {
        AssertSanity();
        MOZ_RELEASE_ASSERT((mType) == (aType), "unexpected type tag");
    }

public:
    MOZ_IMPLICIT BufferDescriptor() :
        mType(T__None)
    {
    }

    MOZ_IMPLICIT BufferDescriptor(const RGBDescriptor& aOther);

    MOZ_IMPLICIT BufferDescriptor(RGBDescriptor&& aOther);

    MOZ_IMPLICIT BufferDescriptor(const YCbCrDescriptor& aOther);

    MOZ_IMPLICIT BufferDescriptor(YCbCrDescriptor&& aOther);

    MOZ_IMPLICIT BufferDescriptor(const BufferDescriptor& aOther);

    MOZ_IMPLICIT BufferDescriptor(BufferDescriptor&& aOther);

    ~BufferDescriptor();

    Type
    type() const
    {
        return mType;
    }

    BufferDescriptor&
    operator=(const RGBDescriptor& aRhs);

    BufferDescriptor&
    operator=(RGBDescriptor&& aRhs);

    BufferDescriptor&
    operator=(const YCbCrDescriptor& aRhs);

    BufferDescriptor&
    operator=(YCbCrDescriptor&& aRhs);

    BufferDescriptor&
    operator=(const BufferDescriptor& aRhs);

    BufferDescriptor&
    operator=(BufferDescriptor&& aRhs);

    bool
    operator==(const RGBDescriptor& aRhs) const;

    bool
    operator==(const YCbCrDescriptor& aRhs) const;

    bool
    operator==(const BufferDescriptor& aRhs) const;

    RGBDescriptor&
    get_RGBDescriptor()
    {
        AssertSanity(TRGBDescriptor);
        return (*(ptr_RGBDescriptor()));
    }
    const RGBDescriptor&
    get_RGBDescriptor() const
    {
        AssertSanity(TRGBDescriptor);
        return (*(constptr_RGBDescriptor()));
    }
    operator RGBDescriptor&()
    {
        return get_RGBDescriptor();
    }
    operator const RGBDescriptor&() const
    {
        return get_RGBDescriptor();
    }

    YCbCrDescriptor&
    get_YCbCrDescriptor()
    {
        AssertSanity(TYCbCrDescriptor);
        return (*(ptr_YCbCrDescriptor()));
    }
    const YCbCrDescriptor&
    get_YCbCrDescriptor() const
    {
        AssertSanity(TYCbCrDescriptor);
        return (*(constptr_YCbCrDescriptor()));
    }
    operator YCbCrDescriptor&()
    {
        return get_YCbCrDescriptor();
    }
    operator const YCbCrDescriptor&() const
    {
        return get_YCbCrDescriptor();
    }

private:
    union {
        RGBDescriptor mVRGBDescriptor;
        YCbCrDescriptor mVYCbCrDescriptor;
    };
    Type mType;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::BufferDescriptor>
{
    typedef ::mozilla::layers::BufferDescriptor paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |union MemoryOrShmem|
//
namespace mozilla {
namespace layers {
class MemoryOrShmem final
{
public:
    enum Type {
        T__None,
        Tuintptr_t = 1,
        TShmem,
        T__Last = TShmem
    };

private:
    typedef ::uintptr_t uintptr_t;
    typedef ::mozilla::ipc::Shmem Shmem;
    typedef uintptr_t uintptr_t__tdef;
    typedef Shmem Shmem__tdef;

    uintptr_t*
    ptr_uintptr_t()
    {
        return (&(mVuintptr_t));
    }
    const uintptr_t*
    constptr_uintptr_t() const
    {
        return (&(mVuintptr_t));
    }
    Shmem*
    ptr_Shmem()
    {
        return (&(mVShmem));
    }
    const Shmem*
    constptr_Shmem() const
    {
        return (&(mVShmem));
    }

    void
    MaybeDestroy();

    void
    AssertSanity() const
    {
        MOZ_RELEASE_ASSERT((T__None) <= (mType), "invalid type tag");
        MOZ_RELEASE_ASSERT((mType) <= (T__Last), "invalid type tag");
    }
    void
    AssertSanity(Type aType) const
    {
        AssertSanity();
        MOZ_RELEASE_ASSERT((mType) == (aType), "unexpected type tag");
    }

public:
    MOZ_IMPLICIT MemoryOrShmem() :
        mType(T__None)
    {
    }

    MOZ_IMPLICIT MemoryOrShmem(const uintptr_t& aOther);

    MOZ_IMPLICIT MemoryOrShmem(uintptr_t&& aOther);

    MOZ_IMPLICIT MemoryOrShmem(Shmem& aOther);

    MOZ_IMPLICIT MemoryOrShmem(Shmem&& aOther);

    MOZ_IMPLICIT MemoryOrShmem(const MemoryOrShmem& aOther);

    MOZ_IMPLICIT MemoryOrShmem(MemoryOrShmem&& aOther);

    ~MemoryOrShmem();

    Type
    type() const
    {
        return mType;
    }

    MemoryOrShmem&
    operator=(const uintptr_t& aRhs);

    MemoryOrShmem&
    operator=(uintptr_t&& aRhs);

    MemoryOrShmem&
    operator=(Shmem& aRhs);

    MemoryOrShmem&
    operator=(Shmem&& aRhs);

    MemoryOrShmem&
    operator=(const MemoryOrShmem& aRhs);

    MemoryOrShmem&
    operator=(MemoryOrShmem&& aRhs);

    bool
    operator==(const uintptr_t& aRhs) const;

    bool
    operator==(Shmem& aRhs) const;

    bool
    operator==(const MemoryOrShmem& aRhs) const;

    uintptr_t&
    get_uintptr_t()
    {
        AssertSanity(Tuintptr_t);
        return (*(ptr_uintptr_t()));
    }
    const uintptr_t&
    get_uintptr_t() const
    {
        AssertSanity(Tuintptr_t);
        return (*(constptr_uintptr_t()));
    }
    operator uintptr_t&()
    {
        return get_uintptr_t();
    }
    operator const uintptr_t&() const
    {
        return get_uintptr_t();
    }

    Shmem&
    get_Shmem()
    {
        AssertSanity(TShmem);
        return (*(ptr_Shmem()));
    }
    Shmem&
    get_Shmem() const
    {
        AssertSanity(TShmem);
        return const_cast<Shmem&>((*(constptr_Shmem())));
    }
    operator Shmem&()
    {
        return get_Shmem();
    }
    operator Shmem&() const
    {
        return get_Shmem();
    }

private:
    union {
        uintptr_t mVuintptr_t;
        Shmem mVShmem;
    };
    Type mType;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::MemoryOrShmem>
{
    typedef ::mozilla::layers::MemoryOrShmem paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct SurfaceDescriptorBuffer|
//
namespace mozilla {
namespace layers {
class SurfaceDescriptorBuffer final
{
private:
    typedef ::mozilla::layers::BufferDescriptor BufferDescriptor;
    typedef ::mozilla::layers::MemoryOrShmem MemoryOrShmem;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    SurfaceDescriptorBuffer() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT SurfaceDescriptorBuffer(
            const BufferDescriptor& _desc,
            const MemoryOrShmem& _data) :
        desc_(_desc),
        data_(_data)
    {
    }

    MOZ_IMPLICIT SurfaceDescriptorBuffer(
            BufferDescriptor&& _desc,
            MemoryOrShmem&& _data) :
        desc_(std::move(_desc)),
        data_(std::move(_data))
    {
    }

    bool
    operator==(const SurfaceDescriptorBuffer& _o) const;

    bool
    operator!=(const SurfaceDescriptorBuffer& _o) const;

    BufferDescriptor&
    desc()
    {
        return desc_;
    }
    const BufferDescriptor&
    desc() const
    {
        return desc_;
    }

    MemoryOrShmem&
    data()
    {
        return data_;
    }
    const MemoryOrShmem&
    data() const
    {
        return data_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<BufferDescriptor> desc_;
    ::mozilla::ipc::IPDLStructMember<MemoryOrShmem> data_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::SurfaceDescriptorBuffer>
{
    typedef ::mozilla::layers::SurfaceDescriptorBuffer paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct SurfaceDescriptorShared|
//
namespace mozilla {
namespace layers {
class SurfaceDescriptorShared final
{
private:
    typedef ::mozilla::gfx::IntSize IntSize;
    typedef ::int32_t int32_t;
    typedef ::mozilla::gfx::SurfaceFormat SurfaceFormat;
    typedef ::mozilla::ipc::ReadOnlySharedMemoryHandle ReadOnlySharedMemoryHandle;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    SurfaceDescriptorShared() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT SurfaceDescriptorShared(
            const IntSize& _size,
            const int32_t& _stride,
            const SurfaceFormat& _format,
            ReadOnlySharedMemoryHandle&& _handle) :
        size_(_size),
        format_(_format),
        handle_(std::move(_handle)),
        stride_(_stride)
    {
    }

    MOZ_IMPLICIT SurfaceDescriptorShared(
            IntSize&& _size,
            int32_t&& _stride,
            SurfaceFormat&& _format,
            ReadOnlySharedMemoryHandle&& _handle) :
        size_(std::move(_size)),
        format_(std::move(_format)),
        handle_(std::move(_handle)),
        stride_(std::move(_stride))
    {
    }

    IntSize&
    size()
    {
        return size_;
    }
    const IntSize&
    size() const
    {
        return size_;
    }

    int32_t&
    stride()
    {
        return stride_;
    }
    const int32_t&
    stride() const
    {
        return stride_;
    }

    SurfaceFormat&
    format()
    {
        return format_;
    }
    const SurfaceFormat&
    format() const
    {
        return format_;
    }

    ReadOnlySharedMemoryHandle&
    handle()
    {
        return handle_;
    }
    const ReadOnlySharedMemoryHandle&
    handle() const
    {
        return handle_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<IntSize> size_;
    ::mozilla::ipc::IPDLStructMember<SurfaceFormat> format_;
    ::mozilla::ipc::IPDLStructMember<ReadOnlySharedMemoryHandle> handle_;
    ::mozilla::ipc::IPDLStructMember<int32_t> stride_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::SurfaceDescriptorShared>
{
    typedef ::mozilla::layers::SurfaceDescriptorShared paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            paramType&& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct SurfaceDescriptorExternalImage|
//
namespace mozilla {
namespace layers {
class SurfaceDescriptorExternalImage final
{
private:
    typedef ::mozilla::wr::ExternalImageSource ExternalImageSource;
    typedef ::mozilla::wr::ExternalImageId ExternalImageId;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    SurfaceDescriptorExternalImage() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT SurfaceDescriptorExternalImage(
            const ExternalImageSource& _source,
            const ExternalImageId& _id) :
        source_(_source),
        id_(_id)
    {
    }

    MOZ_IMPLICIT SurfaceDescriptorExternalImage(
            ExternalImageSource&& _source,
            ExternalImageId&& _id) :
        source_(std::move(_source)),
        id_(std::move(_id))
    {
    }

    bool
    operator==(const SurfaceDescriptorExternalImage& _o) const;

    bool
    operator!=(const SurfaceDescriptorExternalImage& _o) const;

    ExternalImageSource&
    source()
    {
        return source_;
    }
    const ExternalImageSource&
    source() const
    {
        return source_;
    }

    ExternalImageId&
    id()
    {
        return id_;
    }
    const ExternalImageId&
    id() const
    {
        return id_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<ExternalImageSource> source_;
    ::mozilla::ipc::IPDLStructMember<ExternalImageId> id_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::SurfaceDescriptorExternalImage>
{
    typedef ::mozilla::layers::SurfaceDescriptorExternalImage paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct SurfaceDescriptorRemoteTexture|
//
namespace mozilla {
namespace layers {
class SurfaceDescriptorRemoteTexture final
{
private:
    typedef ::mozilla::layers::RemoteTextureId RemoteTextureId;
    typedef ::mozilla::layers::RemoteTextureOwnerId RemoteTextureOwnerId;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    SurfaceDescriptorRemoteTexture() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT SurfaceDescriptorRemoteTexture(
            const RemoteTextureId& _textureId,
            const RemoteTextureOwnerId& _ownerId) :
        textureId_(_textureId),
        ownerId_(_ownerId)
    {
    }

    MOZ_IMPLICIT SurfaceDescriptorRemoteTexture(
            RemoteTextureId&& _textureId,
            RemoteTextureOwnerId&& _ownerId) :
        textureId_(std::move(_textureId)),
        ownerId_(std::move(_ownerId))
    {
    }

    bool
    operator==(const SurfaceDescriptorRemoteTexture& _o) const;

    bool
    operator!=(const SurfaceDescriptorRemoteTexture& _o) const;

    RemoteTextureId&
    textureId()
    {
        return textureId_;
    }
    const RemoteTextureId&
    textureId() const
    {
        return textureId_;
    }

    RemoteTextureOwnerId&
    ownerId()
    {
        return ownerId_;
    }
    const RemoteTextureOwnerId&
    ownerId() const
    {
        return ownerId_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<RemoteTextureId> textureId_;
    ::mozilla::ipc::IPDLStructMember<RemoteTextureOwnerId> ownerId_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::SurfaceDescriptorRemoteTexture>
{
    typedef ::mozilla::layers::SurfaceDescriptorRemoteTexture paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct SurfaceDescriptorCanvasSurface|
//
namespace mozilla {
namespace layers {
class SurfaceDescriptorCanvasSurface final
{
private:
    typedef ::uint32_t uint32_t;
    typedef ::mozilla::ipc::ActorId ActorId;
    typedef ::uintptr_t uintptr_t;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    SurfaceDescriptorCanvasSurface() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT SurfaceDescriptorCanvasSurface(
            const uint32_t& _managerId,
            const ActorId& _canvasId,
            const uintptr_t& _surfaceId) :
        canvasId_(_canvasId),
        surfaceId_(_surfaceId),
        managerId_(_managerId)
    {
    }

    MOZ_IMPLICIT SurfaceDescriptorCanvasSurface(
            uint32_t&& _managerId,
            ActorId&& _canvasId,
            uintptr_t&& _surfaceId) :
        canvasId_(std::move(_canvasId)),
        surfaceId_(std::move(_surfaceId)),
        managerId_(std::move(_managerId))
    {
    }

    bool
    operator==(const SurfaceDescriptorCanvasSurface& _o) const;

    bool
    operator!=(const SurfaceDescriptorCanvasSurface& _o) const;

    uint32_t&
    managerId()
    {
        return managerId_;
    }
    const uint32_t&
    managerId() const
    {
        return managerId_;
    }

    ActorId&
    canvasId()
    {
        return canvasId_;
    }
    const ActorId&
    canvasId() const
    {
        return canvasId_;
    }

    uintptr_t&
    surfaceId()
    {
        return surfaceId_;
    }
    const uintptr_t&
    surfaceId() const
    {
        return surfaceId_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<ActorId> canvasId_;
    ::mozilla::ipc::IPDLStructMember<uintptr_t> surfaceId_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> managerId_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::SurfaceDescriptorCanvasSurface>
{
    typedef ::mozilla::layers::SurfaceDescriptorCanvasSurface paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |union SurfaceDescriptor|
//
namespace mozilla {
namespace layers {
class SurfaceDescriptor final
{
public:
    enum Type {
        T__None,
        TSurfaceDescriptorBuffer = 1,
        TSurfaceDescriptorD3D10,
        TSurfaceDescriptorDXGIYCbCr,
        TSurfaceDescriptorDMABuf,
        TSurfaceTextureDescriptor,
        TSurfaceDescriptorAndroidHardwareBuffer,
        TEGLImageDescriptor,
        TSurfaceDescriptorMacIOSurface,
        TSurfaceDescriptorSharedGLTexture,
        TSurfaceDescriptorGPUVideo,
        TSurfaceDescriptorRemoteTexture,
        TSurfaceDescriptorDcompSurface,
        TSurfaceDescriptorExternalImage,
        TSurfaceDescriptorCanvasSurface,
        Tnull_t,
        T__Last = Tnull_t
    };

private:
    typedef ::mozilla::layers::SurfaceDescriptorBuffer SurfaceDescriptorBuffer;
    typedef ::mozilla::layers::SurfaceDescriptorD3D10 SurfaceDescriptorD3D10;
    typedef ::mozilla::layers::SurfaceDescriptorDXGIYCbCr SurfaceDescriptorDXGIYCbCr;
    typedef ::mozilla::layers::SurfaceDescriptorDMABuf SurfaceDescriptorDMABuf;
    typedef ::mozilla::layers::SurfaceTextureDescriptor SurfaceTextureDescriptor;
    typedef ::mozilla::layers::SurfaceDescriptorAndroidHardwareBuffer SurfaceDescriptorAndroidHardwareBuffer;
    typedef ::mozilla::layers::EGLImageDescriptor EGLImageDescriptor;
    typedef ::mozilla::layers::SurfaceDescriptorMacIOSurface SurfaceDescriptorMacIOSurface;
    typedef ::mozilla::layers::SurfaceDescriptorSharedGLTexture SurfaceDescriptorSharedGLTexture;
    typedef ::mozilla::layers::SurfaceDescriptorGPUVideo SurfaceDescriptorGPUVideo;
    typedef ::mozilla::layers::SurfaceDescriptorRemoteTexture SurfaceDescriptorRemoteTexture;
    typedef ::mozilla::layers::SurfaceDescriptorDcompSurface SurfaceDescriptorDcompSurface;
    typedef ::mozilla::layers::SurfaceDescriptorExternalImage SurfaceDescriptorExternalImage;
    typedef ::mozilla::layers::SurfaceDescriptorCanvasSurface SurfaceDescriptorCanvasSurface;
    typedef ::mozilla::null_t null_t;
    typedef SurfaceDescriptorBuffer SurfaceDescriptorBuffer__tdef;
    typedef SurfaceDescriptorD3D10 SurfaceDescriptorD3D10__tdef;
    typedef SurfaceDescriptorDXGIYCbCr SurfaceDescriptorDXGIYCbCr__tdef;
    typedef SurfaceDescriptorDMABuf SurfaceDescriptorDMABuf__tdef;
    typedef SurfaceTextureDescriptor SurfaceTextureDescriptor__tdef;
    typedef SurfaceDescriptorAndroidHardwareBuffer SurfaceDescriptorAndroidHardwareBuffer__tdef;
    typedef EGLImageDescriptor EGLImageDescriptor__tdef;
    typedef SurfaceDescriptorMacIOSurface SurfaceDescriptorMacIOSurface__tdef;
    typedef SurfaceDescriptorSharedGLTexture SurfaceDescriptorSharedGLTexture__tdef;
    typedef SurfaceDescriptorGPUVideo SurfaceDescriptorGPUVideo__tdef;
    typedef SurfaceDescriptorRemoteTexture SurfaceDescriptorRemoteTexture__tdef;
    typedef SurfaceDescriptorDcompSurface SurfaceDescriptorDcompSurface__tdef;
    typedef SurfaceDescriptorExternalImage SurfaceDescriptorExternalImage__tdef;
    typedef SurfaceDescriptorCanvasSurface SurfaceDescriptorCanvasSurface__tdef;
    typedef null_t null_t__tdef;

    SurfaceDescriptorBuffer*
    ptr_SurfaceDescriptorBuffer()
    {
        return (&(mVSurfaceDescriptorBuffer));
    }
    const SurfaceDescriptorBuffer*
    constptr_SurfaceDescriptorBuffer() const
    {
        return (&(mVSurfaceDescriptorBuffer));
    }
    SurfaceDescriptorD3D10*
    ptr_SurfaceDescriptorD3D10()
    {
        return (&(mVSurfaceDescriptorD3D10));
    }
    const SurfaceDescriptorD3D10*
    constptr_SurfaceDescriptorD3D10() const
    {
        return (&(mVSurfaceDescriptorD3D10));
    }
    SurfaceDescriptorDXGIYCbCr*
    ptr_SurfaceDescriptorDXGIYCbCr()
    {
        return (&(mVSurfaceDescriptorDXGIYCbCr));
    }
    const SurfaceDescriptorDXGIYCbCr*
    constptr_SurfaceDescriptorDXGIYCbCr() const
    {
        return (&(mVSurfaceDescriptorDXGIYCbCr));
    }
    SurfaceDescriptorDMABuf*
    ptr_SurfaceDescriptorDMABuf()
    {
        return (&(mVSurfaceDescriptorDMABuf));
    }
    const SurfaceDescriptorDMABuf*
    constptr_SurfaceDescriptorDMABuf() const
    {
        return (&(mVSurfaceDescriptorDMABuf));
    }
    SurfaceTextureDescriptor*
    ptr_SurfaceTextureDescriptor()
    {
        return (&(mVSurfaceTextureDescriptor));
    }
    const SurfaceTextureDescriptor*
    constptr_SurfaceTextureDescriptor() const
    {
        return (&(mVSurfaceTextureDescriptor));
    }
    SurfaceDescriptorAndroidHardwareBuffer*
    ptr_SurfaceDescriptorAndroidHardwareBuffer()
    {
        return (&(mVSurfaceDescriptorAndroidHardwareBuffer));
    }
    const SurfaceDescriptorAndroidHardwareBuffer*
    constptr_SurfaceDescriptorAndroidHardwareBuffer() const
    {
        return (&(mVSurfaceDescriptorAndroidHardwareBuffer));
    }
    EGLImageDescriptor*
    ptr_EGLImageDescriptor()
    {
        return (&(mVEGLImageDescriptor));
    }
    const EGLImageDescriptor*
    constptr_EGLImageDescriptor() const
    {
        return (&(mVEGLImageDescriptor));
    }
    SurfaceDescriptorMacIOSurface*
    ptr_SurfaceDescriptorMacIOSurface()
    {
        return (&(mVSurfaceDescriptorMacIOSurface));
    }
    const SurfaceDescriptorMacIOSurface*
    constptr_SurfaceDescriptorMacIOSurface() const
    {
        return (&(mVSurfaceDescriptorMacIOSurface));
    }
    SurfaceDescriptorSharedGLTexture*
    ptr_SurfaceDescriptorSharedGLTexture()
    {
        return (&(mVSurfaceDescriptorSharedGLTexture));
    }
    const SurfaceDescriptorSharedGLTexture*
    constptr_SurfaceDescriptorSharedGLTexture() const
    {
        return (&(mVSurfaceDescriptorSharedGLTexture));
    }
    SurfaceDescriptorGPUVideo*
    ptr_SurfaceDescriptorGPUVideo()
    {
        return (&(mVSurfaceDescriptorGPUVideo));
    }
    const SurfaceDescriptorGPUVideo*
    constptr_SurfaceDescriptorGPUVideo() const
    {
        return (&(mVSurfaceDescriptorGPUVideo));
    }
    SurfaceDescriptorRemoteTexture*
    ptr_SurfaceDescriptorRemoteTexture()
    {
        return (&(mVSurfaceDescriptorRemoteTexture));
    }
    const SurfaceDescriptorRemoteTexture*
    constptr_SurfaceDescriptorRemoteTexture() const
    {
        return (&(mVSurfaceDescriptorRemoteTexture));
    }
    SurfaceDescriptorDcompSurface*
    ptr_SurfaceDescriptorDcompSurface()
    {
        return (&(mVSurfaceDescriptorDcompSurface));
    }
    const SurfaceDescriptorDcompSurface*
    constptr_SurfaceDescriptorDcompSurface() const
    {
        return (&(mVSurfaceDescriptorDcompSurface));
    }
    SurfaceDescriptorExternalImage*
    ptr_SurfaceDescriptorExternalImage()
    {
        return (&(mVSurfaceDescriptorExternalImage));
    }
    const SurfaceDescriptorExternalImage*
    constptr_SurfaceDescriptorExternalImage() const
    {
        return (&(mVSurfaceDescriptorExternalImage));
    }
    SurfaceDescriptorCanvasSurface*
    ptr_SurfaceDescriptorCanvasSurface()
    {
        return (&(mVSurfaceDescriptorCanvasSurface));
    }
    const SurfaceDescriptorCanvasSurface*
    constptr_SurfaceDescriptorCanvasSurface() const
    {
        return (&(mVSurfaceDescriptorCanvasSurface));
    }
    null_t*
    ptr_null_t()
    {
        return (&(mVnull_t));
    }
    const null_t*
    constptr_null_t() const
    {
        return (&(mVnull_t));
    }

    void
    MaybeDestroy();

    void
    AssertSanity() const
    {
        MOZ_RELEASE_ASSERT((T__None) <= (mType), "invalid type tag");
        MOZ_RELEASE_ASSERT((mType) <= (T__Last), "invalid type tag");
    }
    void
    AssertSanity(Type aType) const
    {
        AssertSanity();
        MOZ_RELEASE_ASSERT((mType) == (aType), "unexpected type tag");
    }

public:
    MOZ_IMPLICIT SurfaceDescriptor() :
        mType(T__None)
    {
    }

    MOZ_IMPLICIT SurfaceDescriptor(const SurfaceDescriptorBuffer& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(SurfaceDescriptorBuffer&& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(const SurfaceDescriptorD3D10& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(SurfaceDescriptorD3D10&& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(const SurfaceDescriptorDXGIYCbCr& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(SurfaceDescriptorDXGIYCbCr&& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(const SurfaceDescriptorDMABuf& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(SurfaceDescriptorDMABuf&& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(const SurfaceTextureDescriptor& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(SurfaceTextureDescriptor&& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(const SurfaceDescriptorAndroidHardwareBuffer& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(SurfaceDescriptorAndroidHardwareBuffer&& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(const EGLImageDescriptor& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(EGLImageDescriptor&& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(const SurfaceDescriptorMacIOSurface& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(SurfaceDescriptorMacIOSurface&& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(const SurfaceDescriptorSharedGLTexture& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(SurfaceDescriptorSharedGLTexture&& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(const SurfaceDescriptorGPUVideo& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(SurfaceDescriptorGPUVideo&& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(const SurfaceDescriptorRemoteTexture& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(SurfaceDescriptorRemoteTexture&& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(const SurfaceDescriptorDcompSurface& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(SurfaceDescriptorDcompSurface&& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(const SurfaceDescriptorExternalImage& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(SurfaceDescriptorExternalImage&& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(const SurfaceDescriptorCanvasSurface& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(SurfaceDescriptorCanvasSurface&& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(const null_t& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(null_t&& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(const SurfaceDescriptor& aOther);

    MOZ_IMPLICIT SurfaceDescriptor(SurfaceDescriptor&& aOther);

    ~SurfaceDescriptor();

    Type
    type() const
    {
        return mType;
    }

    SurfaceDescriptor&
    operator=(const SurfaceDescriptorBuffer& aRhs);

    SurfaceDescriptor&
    operator=(SurfaceDescriptorBuffer&& aRhs);

    SurfaceDescriptor&
    operator=(const SurfaceDescriptorD3D10& aRhs);

    SurfaceDescriptor&
    operator=(SurfaceDescriptorD3D10&& aRhs);

    SurfaceDescriptor&
    operator=(const SurfaceDescriptorDXGIYCbCr& aRhs);

    SurfaceDescriptor&
    operator=(SurfaceDescriptorDXGIYCbCr&& aRhs);

    SurfaceDescriptor&
    operator=(const SurfaceDescriptorDMABuf& aRhs);

    SurfaceDescriptor&
    operator=(SurfaceDescriptorDMABuf&& aRhs);

    SurfaceDescriptor&
    operator=(const SurfaceTextureDescriptor& aRhs);

    SurfaceDescriptor&
    operator=(SurfaceTextureDescriptor&& aRhs);

    SurfaceDescriptor&
    operator=(const SurfaceDescriptorAndroidHardwareBuffer& aRhs);

    SurfaceDescriptor&
    operator=(SurfaceDescriptorAndroidHardwareBuffer&& aRhs);

    SurfaceDescriptor&
    operator=(const EGLImageDescriptor& aRhs);

    SurfaceDescriptor&
    operator=(EGLImageDescriptor&& aRhs);

    SurfaceDescriptor&
    operator=(const SurfaceDescriptorMacIOSurface& aRhs);

    SurfaceDescriptor&
    operator=(SurfaceDescriptorMacIOSurface&& aRhs);

    SurfaceDescriptor&
    operator=(const SurfaceDescriptorSharedGLTexture& aRhs);

    SurfaceDescriptor&
    operator=(SurfaceDescriptorSharedGLTexture&& aRhs);

    SurfaceDescriptor&
    operator=(const SurfaceDescriptorGPUVideo& aRhs);

    SurfaceDescriptor&
    operator=(SurfaceDescriptorGPUVideo&& aRhs);

    SurfaceDescriptor&
    operator=(const SurfaceDescriptorRemoteTexture& aRhs);

    SurfaceDescriptor&
    operator=(SurfaceDescriptorRemoteTexture&& aRhs);

    SurfaceDescriptor&
    operator=(const SurfaceDescriptorDcompSurface& aRhs);

    SurfaceDescriptor&
    operator=(SurfaceDescriptorDcompSurface&& aRhs);

    SurfaceDescriptor&
    operator=(const SurfaceDescriptorExternalImage& aRhs);

    SurfaceDescriptor&
    operator=(SurfaceDescriptorExternalImage&& aRhs);

    SurfaceDescriptor&
    operator=(const SurfaceDescriptorCanvasSurface& aRhs);

    SurfaceDescriptor&
    operator=(SurfaceDescriptorCanvasSurface&& aRhs);

    SurfaceDescriptor&
    operator=(const null_t& aRhs);

    SurfaceDescriptor&
    operator=(null_t&& aRhs);

    SurfaceDescriptor&
    operator=(const SurfaceDescriptor& aRhs);

    SurfaceDescriptor&
    operator=(SurfaceDescriptor&& aRhs);

    bool
    operator==(const SurfaceDescriptorBuffer& aRhs) const;

    bool
    operator==(const SurfaceDescriptorD3D10& aRhs) const;

    bool
    operator==(const SurfaceDescriptorDXGIYCbCr& aRhs) const;

    bool
    operator==(const SurfaceDescriptorDMABuf& aRhs) const;

    bool
    operator==(const SurfaceTextureDescriptor& aRhs) const;

    bool
    operator==(const SurfaceDescriptorAndroidHardwareBuffer& aRhs) const;

    bool
    operator==(const EGLImageDescriptor& aRhs) const;

    bool
    operator==(const SurfaceDescriptorMacIOSurface& aRhs) const;

    bool
    operator==(const SurfaceDescriptorSharedGLTexture& aRhs) const;

    bool
    operator==(const SurfaceDescriptorGPUVideo& aRhs) const;

    bool
    operator==(const SurfaceDescriptorRemoteTexture& aRhs) const;

    bool
    operator==(const SurfaceDescriptorDcompSurface& aRhs) const;

    bool
    operator==(const SurfaceDescriptorExternalImage& aRhs) const;

    bool
    operator==(const SurfaceDescriptorCanvasSurface& aRhs) const;

    bool
    operator==(const null_t& aRhs) const;

    bool
    operator==(const SurfaceDescriptor& aRhs) const;

    SurfaceDescriptorBuffer&
    get_SurfaceDescriptorBuffer()
    {
        AssertSanity(TSurfaceDescriptorBuffer);
        return (*(ptr_SurfaceDescriptorBuffer()));
    }
    const SurfaceDescriptorBuffer&
    get_SurfaceDescriptorBuffer() const
    {
        AssertSanity(TSurfaceDescriptorBuffer);
        return (*(constptr_SurfaceDescriptorBuffer()));
    }
    operator SurfaceDescriptorBuffer&()
    {
        return get_SurfaceDescriptorBuffer();
    }
    operator const SurfaceDescriptorBuffer&() const
    {
        return get_SurfaceDescriptorBuffer();
    }

    SurfaceDescriptorD3D10&
    get_SurfaceDescriptorD3D10()
    {
        AssertSanity(TSurfaceDescriptorD3D10);
        return (*(ptr_SurfaceDescriptorD3D10()));
    }
    const SurfaceDescriptorD3D10&
    get_SurfaceDescriptorD3D10() const
    {
        AssertSanity(TSurfaceDescriptorD3D10);
        return (*(constptr_SurfaceDescriptorD3D10()));
    }
    operator SurfaceDescriptorD3D10&()
    {
        return get_SurfaceDescriptorD3D10();
    }
    operator const SurfaceDescriptorD3D10&() const
    {
        return get_SurfaceDescriptorD3D10();
    }

    SurfaceDescriptorDXGIYCbCr&
    get_SurfaceDescriptorDXGIYCbCr()
    {
        AssertSanity(TSurfaceDescriptorDXGIYCbCr);
        return (*(ptr_SurfaceDescriptorDXGIYCbCr()));
    }
    const SurfaceDescriptorDXGIYCbCr&
    get_SurfaceDescriptorDXGIYCbCr() const
    {
        AssertSanity(TSurfaceDescriptorDXGIYCbCr);
        return (*(constptr_SurfaceDescriptorDXGIYCbCr()));
    }
    operator SurfaceDescriptorDXGIYCbCr&()
    {
        return get_SurfaceDescriptorDXGIYCbCr();
    }
    operator const SurfaceDescriptorDXGIYCbCr&() const
    {
        return get_SurfaceDescriptorDXGIYCbCr();
    }

    SurfaceDescriptorDMABuf&
    get_SurfaceDescriptorDMABuf()
    {
        AssertSanity(TSurfaceDescriptorDMABuf);
        return (*(ptr_SurfaceDescriptorDMABuf()));
    }
    const SurfaceDescriptorDMABuf&
    get_SurfaceDescriptorDMABuf() const
    {
        AssertSanity(TSurfaceDescriptorDMABuf);
        return (*(constptr_SurfaceDescriptorDMABuf()));
    }
    operator SurfaceDescriptorDMABuf&()
    {
        return get_SurfaceDescriptorDMABuf();
    }
    operator const SurfaceDescriptorDMABuf&() const
    {
        return get_SurfaceDescriptorDMABuf();
    }

    SurfaceTextureDescriptor&
    get_SurfaceTextureDescriptor()
    {
        AssertSanity(TSurfaceTextureDescriptor);
        return (*(ptr_SurfaceTextureDescriptor()));
    }
    const SurfaceTextureDescriptor&
    get_SurfaceTextureDescriptor() const
    {
        AssertSanity(TSurfaceTextureDescriptor);
        return (*(constptr_SurfaceTextureDescriptor()));
    }
    operator SurfaceTextureDescriptor&()
    {
        return get_SurfaceTextureDescriptor();
    }
    operator const SurfaceTextureDescriptor&() const
    {
        return get_SurfaceTextureDescriptor();
    }

    SurfaceDescriptorAndroidHardwareBuffer&
    get_SurfaceDescriptorAndroidHardwareBuffer()
    {
        AssertSanity(TSurfaceDescriptorAndroidHardwareBuffer);
        return (*(ptr_SurfaceDescriptorAndroidHardwareBuffer()));
    }
    const SurfaceDescriptorAndroidHardwareBuffer&
    get_SurfaceDescriptorAndroidHardwareBuffer() const
    {
        AssertSanity(TSurfaceDescriptorAndroidHardwareBuffer);
        return (*(constptr_SurfaceDescriptorAndroidHardwareBuffer()));
    }
    operator SurfaceDescriptorAndroidHardwareBuffer&()
    {
        return get_SurfaceDescriptorAndroidHardwareBuffer();
    }
    operator const SurfaceDescriptorAndroidHardwareBuffer&() const
    {
        return get_SurfaceDescriptorAndroidHardwareBuffer();
    }

    EGLImageDescriptor&
    get_EGLImageDescriptor()
    {
        AssertSanity(TEGLImageDescriptor);
        return (*(ptr_EGLImageDescriptor()));
    }
    const EGLImageDescriptor&
    get_EGLImageDescriptor() const
    {
        AssertSanity(TEGLImageDescriptor);
        return (*(constptr_EGLImageDescriptor()));
    }
    operator EGLImageDescriptor&()
    {
        return get_EGLImageDescriptor();
    }
    operator const EGLImageDescriptor&() const
    {
        return get_EGLImageDescriptor();
    }

    SurfaceDescriptorMacIOSurface&
    get_SurfaceDescriptorMacIOSurface()
    {
        AssertSanity(TSurfaceDescriptorMacIOSurface);
        return (*(ptr_SurfaceDescriptorMacIOSurface()));
    }
    const SurfaceDescriptorMacIOSurface&
    get_SurfaceDescriptorMacIOSurface() const
    {
        AssertSanity(TSurfaceDescriptorMacIOSurface);
        return (*(constptr_SurfaceDescriptorMacIOSurface()));
    }
    operator SurfaceDescriptorMacIOSurface&()
    {
        return get_SurfaceDescriptorMacIOSurface();
    }
    operator const SurfaceDescriptorMacIOSurface&() const
    {
        return get_SurfaceDescriptorMacIOSurface();
    }

    SurfaceDescriptorSharedGLTexture&
    get_SurfaceDescriptorSharedGLTexture()
    {
        AssertSanity(TSurfaceDescriptorSharedGLTexture);
        return (*(ptr_SurfaceDescriptorSharedGLTexture()));
    }
    const SurfaceDescriptorSharedGLTexture&
    get_SurfaceDescriptorSharedGLTexture() const
    {
        AssertSanity(TSurfaceDescriptorSharedGLTexture);
        return (*(constptr_SurfaceDescriptorSharedGLTexture()));
    }
    operator SurfaceDescriptorSharedGLTexture&()
    {
        return get_SurfaceDescriptorSharedGLTexture();
    }
    operator const SurfaceDescriptorSharedGLTexture&() const
    {
        return get_SurfaceDescriptorSharedGLTexture();
    }

    SurfaceDescriptorGPUVideo&
    get_SurfaceDescriptorGPUVideo()
    {
        AssertSanity(TSurfaceDescriptorGPUVideo);
        return (*(ptr_SurfaceDescriptorGPUVideo()));
    }
    const SurfaceDescriptorGPUVideo&
    get_SurfaceDescriptorGPUVideo() const
    {
        AssertSanity(TSurfaceDescriptorGPUVideo);
        return (*(constptr_SurfaceDescriptorGPUVideo()));
    }
    operator SurfaceDescriptorGPUVideo&()
    {
        return get_SurfaceDescriptorGPUVideo();
    }
    operator const SurfaceDescriptorGPUVideo&() const
    {
        return get_SurfaceDescriptorGPUVideo();
    }

    SurfaceDescriptorRemoteTexture&
    get_SurfaceDescriptorRemoteTexture()
    {
        AssertSanity(TSurfaceDescriptorRemoteTexture);
        return (*(ptr_SurfaceDescriptorRemoteTexture()));
    }
    const SurfaceDescriptorRemoteTexture&
    get_SurfaceDescriptorRemoteTexture() const
    {
        AssertSanity(TSurfaceDescriptorRemoteTexture);
        return (*(constptr_SurfaceDescriptorRemoteTexture()));
    }
    operator SurfaceDescriptorRemoteTexture&()
    {
        return get_SurfaceDescriptorRemoteTexture();
    }
    operator const SurfaceDescriptorRemoteTexture&() const
    {
        return get_SurfaceDescriptorRemoteTexture();
    }

    SurfaceDescriptorDcompSurface&
    get_SurfaceDescriptorDcompSurface()
    {
        AssertSanity(TSurfaceDescriptorDcompSurface);
        return (*(ptr_SurfaceDescriptorDcompSurface()));
    }
    const SurfaceDescriptorDcompSurface&
    get_SurfaceDescriptorDcompSurface() const
    {
        AssertSanity(TSurfaceDescriptorDcompSurface);
        return (*(constptr_SurfaceDescriptorDcompSurface()));
    }
    operator SurfaceDescriptorDcompSurface&()
    {
        return get_SurfaceDescriptorDcompSurface();
    }
    operator const SurfaceDescriptorDcompSurface&() const
    {
        return get_SurfaceDescriptorDcompSurface();
    }

    SurfaceDescriptorExternalImage&
    get_SurfaceDescriptorExternalImage()
    {
        AssertSanity(TSurfaceDescriptorExternalImage);
        return (*(ptr_SurfaceDescriptorExternalImage()));
    }
    const SurfaceDescriptorExternalImage&
    get_SurfaceDescriptorExternalImage() const
    {
        AssertSanity(TSurfaceDescriptorExternalImage);
        return (*(constptr_SurfaceDescriptorExternalImage()));
    }
    operator SurfaceDescriptorExternalImage&()
    {
        return get_SurfaceDescriptorExternalImage();
    }
    operator const SurfaceDescriptorExternalImage&() const
    {
        return get_SurfaceDescriptorExternalImage();
    }

    SurfaceDescriptorCanvasSurface&
    get_SurfaceDescriptorCanvasSurface()
    {
        AssertSanity(TSurfaceDescriptorCanvasSurface);
        return (*(ptr_SurfaceDescriptorCanvasSurface()));
    }
    const SurfaceDescriptorCanvasSurface&
    get_SurfaceDescriptorCanvasSurface() const
    {
        AssertSanity(TSurfaceDescriptorCanvasSurface);
        return (*(constptr_SurfaceDescriptorCanvasSurface()));
    }
    operator SurfaceDescriptorCanvasSurface&()
    {
        return get_SurfaceDescriptorCanvasSurface();
    }
    operator const SurfaceDescriptorCanvasSurface&() const
    {
        return get_SurfaceDescriptorCanvasSurface();
    }

    null_t&
    get_null_t()
    {
        AssertSanity(Tnull_t);
        return (*(ptr_null_t()));
    }
    const null_t&
    get_null_t() const
    {
        AssertSanity(Tnull_t);
        return (*(constptr_null_t()));
    }
    operator null_t&()
    {
        return get_null_t();
    }
    operator const null_t&() const
    {
        return get_null_t();
    }

private:
    union {
        SurfaceDescriptorBuffer mVSurfaceDescriptorBuffer;
        SurfaceDescriptorD3D10 mVSurfaceDescriptorD3D10;
        SurfaceDescriptorDXGIYCbCr mVSurfaceDescriptorDXGIYCbCr;
        SurfaceDescriptorDMABuf mVSurfaceDescriptorDMABuf;
        SurfaceTextureDescriptor mVSurfaceTextureDescriptor;
        SurfaceDescriptorAndroidHardwareBuffer mVSurfaceDescriptorAndroidHardwareBuffer;
        EGLImageDescriptor mVEGLImageDescriptor;
        SurfaceDescriptorMacIOSurface mVSurfaceDescriptorMacIOSurface;
        SurfaceDescriptorSharedGLTexture mVSurfaceDescriptorSharedGLTexture;
        SurfaceDescriptorGPUVideo mVSurfaceDescriptorGPUVideo;
        SurfaceDescriptorRemoteTexture mVSurfaceDescriptorRemoteTexture;
        SurfaceDescriptorDcompSurface mVSurfaceDescriptorDcompSurface;
        SurfaceDescriptorExternalImage mVSurfaceDescriptorExternalImage;
        SurfaceDescriptorCanvasSurface mVSurfaceDescriptorCanvasSurface;
        null_t mVnull_t;
    };
    Type mType;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::SurfaceDescriptor>
{
    typedef ::mozilla::layers::SurfaceDescriptor paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC

#endif // ifndef LayersSurfaces_h
