Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/GfxMessageUtils.h"
#include "mozilla/gfx/GraphicsMessages.h"
#include "ipc/IPCMessageUtils.h"
#include "ipc/IPCMessageUtilsSpecializations.h"
#include "nsIFile.h"
#include "mozilla/ipc/Endpoint.h"
#include "mozilla/ipc/ProtocolMessageUtils.h"
#include "mozilla/ipc/ProtocolUtils.h"
#include "mozilla/ipc/ShmemMessageUtils.h"
#include "mozilla/ipc/TaintingIPCUtils.h"
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct D3D11DeviceStatus|
//
namespace mozilla {
namespace gfx {
auto D3D11DeviceStatus::StaticAssertions() const -> void
{
static_assert(
(offsetof(D3D11DeviceStatus, sequenceNumber_) - offsetof(D3D11DeviceStatus, featureLevel_)) == 4,
"Bad assumptions about field layout!");
}
} // namespace gfx
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::gfx::D3D11DeviceStatus>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).isWARP());
// Sentinel = 'isWARP'
(aWriter)->WriteSentinel(130941463);
IPC::WriteParam(aWriter, (aVar).textureSharingWorks());
// Sentinel = 'textureSharingWorks'
(aWriter)->WriteSentinel(1344473076);
IPC::WriteParam(aWriter, (aVar).adapter());
// Sentinel = 'adapter'
(aWriter)->WriteSentinel(188941026);
IPC::WriteParam(aWriter, (aVar).formatOptions());
// Sentinel = 'formatOptions'
(aWriter)->WriteSentinel(636290422);
(aWriter)->WriteBytes((&((aVar).featureLevel())), 8);
// Sentinel = 'featureLevel | sequenceNumber'
(aWriter)->WriteSentinel(2858814307);
}
auto ParamTraits<::mozilla::gfx::D3D11DeviceStatus>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___isWARP = IPC::ReadParam<bool>(aReader);
if (!maybe___isWARP) {
aReader->FatalError("Error deserializing 'isWARP' (bool) member of 'D3D11DeviceStatus'");
return {};
}
auto& _isWARP = *maybe___isWARP;
// Sentinel = 'isWARP'
if ((!((aReader)->ReadSentinel(130941463)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'isWARP' (bool) member of 'D3D11DeviceStatus'");
return {};
}
auto maybe___textureSharingWorks = IPC::ReadParam<bool>(aReader);
if (!maybe___textureSharingWorks) {
aReader->FatalError("Error deserializing 'textureSharingWorks' (bool) member of 'D3D11DeviceStatus'");
return {};
}
auto& _textureSharingWorks = *maybe___textureSharingWorks;
// Sentinel = 'textureSharingWorks'
if ((!((aReader)->ReadSentinel(1344473076)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'textureSharingWorks' (bool) member of 'D3D11DeviceStatus'");
return {};
}
auto maybe___adapter = IPC::ReadParam<::DxgiAdapterDesc>(aReader);
if (!maybe___adapter) {
aReader->FatalError("Error deserializing 'adapter' (DxgiAdapterDesc) member of 'D3D11DeviceStatus'");
return {};
}
auto& _adapter = *maybe___adapter;
// Sentinel = 'adapter'
if ((!((aReader)->ReadSentinel(188941026)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'adapter' (DxgiAdapterDesc) member of 'D3D11DeviceStatus'");
return {};
}
auto maybe___formatOptions = IPC::ReadParam<::mozilla::gfx::D3D11Checks::VideoFormatOptionSet>(aReader);
if (!maybe___formatOptions) {
aReader->FatalError("Error deserializing 'formatOptions' (VideoFormatOptionSet) member of 'D3D11DeviceStatus'");
return {};
}
auto& _formatOptions = *maybe___formatOptions;
// Sentinel = 'formatOptions'
if ((!((aReader)->ReadSentinel(636290422)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'formatOptions' (VideoFormatOptionSet) member of 'D3D11DeviceStatus'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_isWARP),
std::move(_textureSharingWorks),
::uint32_t{0},
std::move(_adapter),
::int32_t{0},
std::move(_formatOptions)};
if ((!((aReader)->ReadBytesInto((&((result__)->featureLevel())), 8)))) {
aReader->FatalError("Error bulk reading fields from uint32_t");
return {};
}
// Sentinel = 'featureLevel | sequenceNumber'
if ((!((aReader)->ReadSentinel(2858814307)))) {
mozilla::ipc::SentinelReadError("Error bulk reading fields from uint32_t");
return {};
}
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct DevicePrefs|
//
namespace mozilla {
namespace gfx {
} // namespace gfx
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::gfx::DevicePrefs>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).hwCompositing());
// Sentinel = 'hwCompositing'
(aWriter)->WriteSentinel(629867884);
IPC::WriteParam(aWriter, (aVar).d3d11Compositing());
// Sentinel = 'd3d11Compositing'
(aWriter)->WriteSentinel(774899178);
IPC::WriteParam(aWriter, (aVar).oglCompositing());
// Sentinel = 'oglCompositing'
(aWriter)->WriteSentinel(722273743);
IPC::WriteParam(aWriter, (aVar).useD2D1());
// Sentinel = 'useD2D1'
(aWriter)->WriteSentinel(172229177);
IPC::WriteParam(aWriter, (aVar).d3d11HwAngle());
// Sentinel = 'd3d11HwAngle'
(aWriter)->WriteSentinel(407307268);
}
auto ParamTraits<::mozilla::gfx::DevicePrefs>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___hwCompositing = IPC::ReadParam<::mozilla::gfx::FeatureStatus>(aReader);
if (!maybe___hwCompositing) {
aReader->FatalError("Error deserializing 'hwCompositing' (FeatureStatus) member of 'DevicePrefs'");
return {};
}
auto& _hwCompositing = *maybe___hwCompositing;
// Sentinel = 'hwCompositing'
if ((!((aReader)->ReadSentinel(629867884)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'hwCompositing' (FeatureStatus) member of 'DevicePrefs'");
return {};
}
auto maybe___d3d11Compositing = IPC::ReadParam<::mozilla::gfx::FeatureStatus>(aReader);
if (!maybe___d3d11Compositing) {
aReader->FatalError("Error deserializing 'd3d11Compositing' (FeatureStatus) member of 'DevicePrefs'");
return {};
}
auto& _d3d11Compositing = *maybe___d3d11Compositing;
// Sentinel = 'd3d11Compositing'
if ((!((aReader)->ReadSentinel(774899178)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'd3d11Compositing' (FeatureStatus) member of 'DevicePrefs'");
return {};
}
auto maybe___oglCompositing = IPC::ReadParam<::mozilla::gfx::FeatureStatus>(aReader);
if (!maybe___oglCompositing) {
aReader->FatalError("Error deserializing 'oglCompositing' (FeatureStatus) member of 'DevicePrefs'");
return {};
}
auto& _oglCompositing = *maybe___oglCompositing;
// Sentinel = 'oglCompositing'
if ((!((aReader)->ReadSentinel(722273743)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'oglCompositing' (FeatureStatus) member of 'DevicePrefs'");
return {};
}
auto maybe___useD2D1 = IPC::ReadParam<::mozilla::gfx::FeatureStatus>(aReader);
if (!maybe___useD2D1) {
aReader->FatalError("Error deserializing 'useD2D1' (FeatureStatus) member of 'DevicePrefs'");
return {};
}
auto& _useD2D1 = *maybe___useD2D1;
// Sentinel = 'useD2D1'
if ((!((aReader)->ReadSentinel(172229177)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'useD2D1' (FeatureStatus) member of 'DevicePrefs'");
return {};
}
auto maybe___d3d11HwAngle = IPC::ReadParam<::mozilla::gfx::FeatureStatus>(aReader);
if (!maybe___d3d11HwAngle) {
aReader->FatalError("Error deserializing 'd3d11HwAngle' (FeatureStatus) member of 'DevicePrefs'");
return {};
}
auto& _d3d11HwAngle = *maybe___d3d11HwAngle;
// Sentinel = 'd3d11HwAngle'
if ((!((aReader)->ReadSentinel(407307268)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'd3d11HwAngle' (FeatureStatus) member of 'DevicePrefs'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_hwCompositing),
std::move(_d3d11Compositing),
std::move(_oglCompositing),
std::move(_useD2D1),
std::move(_d3d11HwAngle)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct ContentDeviceData|
//
namespace mozilla {
namespace gfx {
} // namespace gfx
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::gfx::ContentDeviceData>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).prefs());
// Sentinel = 'prefs'
(aWriter)->WriteSentinel(107676193);
IPC::WriteParam(aWriter, (aVar).d3d11());
// Sentinel = 'd3d11'
(aWriter)->WriteSentinel(75759966);
IPC::WriteParam(aWriter, (aVar).cmsOutputProfileData());
// Sentinel = 'cmsOutputProfileData'
(aWriter)->WriteSentinel(1454376992);
}
auto ParamTraits<::mozilla::gfx::ContentDeviceData>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___prefs = IPC::ReadParam<::mozilla::gfx::DevicePrefs>(aReader);
if (!maybe___prefs) {
aReader->FatalError("Error deserializing 'prefs' (DevicePrefs) member of 'ContentDeviceData'");
return {};
}
auto& _prefs = *maybe___prefs;
// Sentinel = 'prefs'
if ((!((aReader)->ReadSentinel(107676193)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'prefs' (DevicePrefs) member of 'ContentDeviceData'");
return {};
}
auto maybe___d3d11 = IPC::ReadParam<::mozilla::gfx::D3D11DeviceStatus>(aReader);
if (!maybe___d3d11) {
aReader->FatalError("Error deserializing 'd3d11' (D3D11DeviceStatus) member of 'ContentDeviceData'");
return {};
}
auto& _d3d11 = *maybe___d3d11;
// Sentinel = 'd3d11'
if ((!((aReader)->ReadSentinel(75759966)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'd3d11' (D3D11DeviceStatus) member of 'ContentDeviceData'");
return {};
}
auto maybe___cmsOutputProfileData = IPC::ReadParam<nsTArray<::uint8_t>>(aReader);
if (!maybe___cmsOutputProfileData) {
aReader->FatalError("Error deserializing 'cmsOutputProfileData' (uint8_t[]) member of 'ContentDeviceData'");
return {};
}
auto& _cmsOutputProfileData = *maybe___cmsOutputProfileData;
// Sentinel = 'cmsOutputProfileData'
if ((!((aReader)->ReadSentinel(1454376992)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'cmsOutputProfileData' (uint8_t[]) member of 'ContentDeviceData'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_prefs),
std::move(_d3d11),
std::move(_cmsOutputProfileData)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct FeatureFailure|
//
namespace mozilla {
namespace gfx {
} // namespace gfx
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::gfx::FeatureFailure>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).status());
// Sentinel = 'status'
(aWriter)->WriteSentinel(154731173);
IPC::WriteParam(aWriter, (aVar).message());
// Sentinel = 'message'
(aWriter)->WriteSentinel(197198566);
IPC::WriteParam(aWriter, (aVar).failureId());
// Sentinel = 'failureId'
(aWriter)->WriteSentinel(306447254);
}
auto ParamTraits<::mozilla::gfx::FeatureFailure>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___status = IPC::ReadParam<::mozilla::gfx::FeatureStatus>(aReader);
if (!maybe___status) {
aReader->FatalError("Error deserializing 'status' (FeatureStatus) member of 'FeatureFailure'");
return {};
}
auto& _status = *maybe___status;
// Sentinel = 'status'
if ((!((aReader)->ReadSentinel(154731173)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'status' (FeatureStatus) member of 'FeatureFailure'");
return {};
}
auto maybe___message = IPC::ReadParam<::nsCString>(aReader);
if (!maybe___message) {
aReader->FatalError("Error deserializing 'message' (nsCString) member of 'FeatureFailure'");
return {};
}
auto& _message = *maybe___message;
// Sentinel = 'message'
if ((!((aReader)->ReadSentinel(197198566)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'message' (nsCString) member of 'FeatureFailure'");
return {};
}
auto maybe___failureId = IPC::ReadParam<::nsCString>(aReader);
if (!maybe___failureId) {
aReader->FatalError("Error deserializing 'failureId' (nsCString) member of 'FeatureFailure'");
return {};
}
auto& _failureId = *maybe___failureId;
// Sentinel = 'failureId'
if ((!((aReader)->ReadSentinel(306447254)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'failureId' (nsCString) member of 'FeatureFailure'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_status),
std::move(_message),
std::move(_failureId)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct GPUDeviceData|
//
namespace mozilla {
namespace gfx {
} // namespace gfx
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::gfx::GPUDeviceData>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).d3d11Compositing());
// Sentinel = 'd3d11Compositing'
(aWriter)->WriteSentinel(774899178);
IPC::WriteParam(aWriter, (aVar).oglCompositing());
// Sentinel = 'oglCompositing'
(aWriter)->WriteSentinel(722273743);
IPC::WriteParam(aWriter, (aVar).gpuDevice());
// Sentinel = 'gpuDevice'
(aWriter)->WriteSentinel(304743325);
}
auto ParamTraits<::mozilla::gfx::GPUDeviceData>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___d3d11Compositing = IPC::ReadParam<mozilla::Maybe<::mozilla::gfx::FeatureFailure>>(aReader);
if (!maybe___d3d11Compositing) {
aReader->FatalError("Error deserializing 'd3d11Compositing' (FeatureFailure?) member of 'GPUDeviceData'");
return {};
}
auto& _d3d11Compositing = *maybe___d3d11Compositing;
// Sentinel = 'd3d11Compositing'
if ((!((aReader)->ReadSentinel(774899178)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'd3d11Compositing' (FeatureFailure?) member of 'GPUDeviceData'");
return {};
}
auto maybe___oglCompositing = IPC::ReadParam<mozilla::Maybe<::mozilla::gfx::FeatureFailure>>(aReader);
if (!maybe___oglCompositing) {
aReader->FatalError("Error deserializing 'oglCompositing' (FeatureFailure?) member of 'GPUDeviceData'");
return {};
}
auto& _oglCompositing = *maybe___oglCompositing;
// Sentinel = 'oglCompositing'
if ((!((aReader)->ReadSentinel(722273743)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'oglCompositing' (FeatureFailure?) member of 'GPUDeviceData'");
return {};
}
auto maybe___gpuDevice = IPC::ReadParam<mozilla::Maybe<::mozilla::gfx::D3D11DeviceStatus>>(aReader);
if (!maybe___gpuDevice) {
aReader->FatalError("Error deserializing 'gpuDevice' (D3D11DeviceStatus?) member of 'GPUDeviceData'");
return {};
}
auto& _gpuDevice = *maybe___gpuDevice;
// Sentinel = 'gpuDevice'
if ((!((aReader)->ReadSentinel(304743325)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'gpuDevice' (D3D11DeviceStatus?) member of 'GPUDeviceData'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_d3d11Compositing),
std::move(_oglCompositing),
std::move(_gpuDevice)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union GfxVarValue|
//
namespace mozilla {
namespace gfx {
auto GfxVarValue::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case TBackendType:
{
(ptr_BackendType())->~BackendType__tdef();
break;
}
case Tbool:
{
(ptr_bool())->~bool__tdef();
break;
}
case TgfxImageFormat:
{
(ptr_gfxImageFormat())->~gfxImageFormat__tdef();
break;
}
case TIntSize:
{
(ptr_IntSize())->~IntSize__tdef();
break;
}
case TnsCString:
{
(ptr_nsCString())->~nsCString__tdef();
break;
}
case TnsString:
{
(ptr_nsString())->~nsString__tdef();
break;
}
case Tint32_t:
{
(ptr_int32_t())->~int32_t__tdef();
break;
}
case Tfloat:
{
(ptr_float())->~float__tdef();
break;
}
case TArrayOfuint64_t:
{
(ptr_ArrayOfuint64_t())->~ArrayOfuint64_t__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(const BackendType& aOther)
{
new (mozilla::KnownNotNull, ptr_BackendType()) BackendType(aOther);
mType = TBackendType;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(BackendType&& aOther)
{
new (mozilla::KnownNotNull, ptr_BackendType()) BackendType(std::move(aOther));
mType = TBackendType;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(const bool& aOther)
{
new (mozilla::KnownNotNull, ptr_bool()) bool(aOther);
mType = Tbool;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(bool&& aOther)
{
new (mozilla::KnownNotNull, ptr_bool()) bool(std::move(aOther));
mType = Tbool;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(const gfxImageFormat& aOther)
{
new (mozilla::KnownNotNull, ptr_gfxImageFormat()) gfxImageFormat(aOther);
mType = TgfxImageFormat;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(gfxImageFormat&& aOther)
{
new (mozilla::KnownNotNull, ptr_gfxImageFormat()) gfxImageFormat(std::move(aOther));
mType = TgfxImageFormat;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(const IntSize& aOther)
{
new (mozilla::KnownNotNull, ptr_IntSize()) IntSize(aOther);
mType = TIntSize;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(IntSize&& aOther)
{
new (mozilla::KnownNotNull, ptr_IntSize()) IntSize(std::move(aOther));
mType = TIntSize;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(const nsCString& aOther)
{
new (mozilla::KnownNotNull, ptr_nsCString()) nsCString(aOther);
mType = TnsCString;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(nsCString&& aOther)
{
new (mozilla::KnownNotNull, ptr_nsCString()) nsCString(std::move(aOther));
mType = TnsCString;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(const nsString& aOther)
{
new (mozilla::KnownNotNull, ptr_nsString()) nsString(aOther);
mType = TnsString;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(nsString&& aOther)
{
new (mozilla::KnownNotNull, ptr_nsString()) nsString(std::move(aOther));
mType = TnsString;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(const int32_t& aOther)
{
new (mozilla::KnownNotNull, ptr_int32_t()) int32_t(aOther);
mType = Tint32_t;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(int32_t&& aOther)
{
new (mozilla::KnownNotNull, ptr_int32_t()) int32_t(std::move(aOther));
mType = Tint32_t;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(const float& aOther)
{
new (mozilla::KnownNotNull, ptr_float()) float(aOther);
mType = Tfloat;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(float&& aOther)
{
new (mozilla::KnownNotNull, ptr_float()) float(std::move(aOther));
mType = Tfloat;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(const nsTArray<uint64_t>& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfuint64_t()) nsTArray<uint64_t>((aOther).Clone());
mType = TArrayOfuint64_t;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(nsTArray<uint64_t>&& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfuint64_t()) nsTArray<uint64_t>(std::move(aOther));
mType = TArrayOfuint64_t;
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(const GfxVarValue& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case TBackendType:
{
new (mozilla::KnownNotNull, ptr_BackendType()) BackendType((aOther).get_BackendType());
break;
}
case Tbool:
{
new (mozilla::KnownNotNull, ptr_bool()) bool((aOther).get_bool());
break;
}
case TgfxImageFormat:
{
new (mozilla::KnownNotNull, ptr_gfxImageFormat()) gfxImageFormat((aOther).get_gfxImageFormat());
break;
}
case TIntSize:
{
new (mozilla::KnownNotNull, ptr_IntSize()) IntSize((aOther).get_IntSize());
break;
}
case TnsCString:
{
new (mozilla::KnownNotNull, ptr_nsCString()) nsCString((aOther).get_nsCString());
break;
}
case TnsString:
{
new (mozilla::KnownNotNull, ptr_nsString()) nsString((aOther).get_nsString());
break;
}
case Tint32_t:
{
new (mozilla::KnownNotNull, ptr_int32_t()) int32_t((aOther).get_int32_t());
break;
}
case Tfloat:
{
new (mozilla::KnownNotNull, ptr_float()) float((aOther).get_float());
break;
}
case TArrayOfuint64_t:
{
new (mozilla::KnownNotNull, ptr_ArrayOfuint64_t()) nsTArray<uint64_t>(((aOther).get_ArrayOfuint64_t()).Clone());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT GfxVarValue::GfxVarValue(GfxVarValue&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case TBackendType:
{
new (mozilla::KnownNotNull, ptr_BackendType()) BackendType(std::move((aOther).get_BackendType()));
(aOther).MaybeDestroy();
break;
}
case Tbool:
{
new (mozilla::KnownNotNull, ptr_bool()) bool(std::move((aOther).get_bool()));
(aOther).MaybeDestroy();
break;
}
case TgfxImageFormat:
{
new (mozilla::KnownNotNull, ptr_gfxImageFormat()) gfxImageFormat(std::move((aOther).get_gfxImageFormat()));
(aOther).MaybeDestroy();
break;
}
case TIntSize:
{
new (mozilla::KnownNotNull, ptr_IntSize()) IntSize(std::move((aOther).get_IntSize()));
(aOther).MaybeDestroy();
break;
}
case TnsCString:
{
new (mozilla::KnownNotNull, ptr_nsCString()) nsCString(std::move((aOther).get_nsCString()));
(aOther).MaybeDestroy();
break;
}
case TnsString:
{
new (mozilla::KnownNotNull, ptr_nsString()) nsString(std::move((aOther).get_nsString()));
(aOther).MaybeDestroy();
break;
}
case Tint32_t:
{
new (mozilla::KnownNotNull, ptr_int32_t()) int32_t(std::move((aOther).get_int32_t()));
(aOther).MaybeDestroy();
break;
}
case Tfloat:
{
new (mozilla::KnownNotNull, ptr_float()) float(std::move((aOther).get_float()));
(aOther).MaybeDestroy();
break;
}
case TArrayOfuint64_t:
{
new (mozilla::KnownNotNull, ptr_ArrayOfuint64_t()) nsTArray<uint64_t>(std::move((aOther).get_ArrayOfuint64_t()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
GfxVarValue::~GfxVarValue()
{
MaybeDestroy();
}
auto GfxVarValue::operator=(const BackendType& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_BackendType()) BackendType(aRhs);
mType = TBackendType;
return (*(this));
}
auto GfxVarValue::operator=(BackendType&& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_BackendType()) BackendType(std::move(aRhs));
mType = TBackendType;
return (*(this));
}
auto GfxVarValue::operator=(const bool& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_bool()) bool(aRhs);
mType = Tbool;
return (*(this));
}
auto GfxVarValue::operator=(bool&& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_bool()) bool(std::move(aRhs));
mType = Tbool;
return (*(this));
}
auto GfxVarValue::operator=(const gfxImageFormat& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_gfxImageFormat()) gfxImageFormat(aRhs);
mType = TgfxImageFormat;
return (*(this));
}
auto GfxVarValue::operator=(gfxImageFormat&& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_gfxImageFormat()) gfxImageFormat(std::move(aRhs));
mType = TgfxImageFormat;
return (*(this));
}
auto GfxVarValue::operator=(const IntSize& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_IntSize()) IntSize(aRhs);
mType = TIntSize;
return (*(this));
}
auto GfxVarValue::operator=(IntSize&& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_IntSize()) IntSize(std::move(aRhs));
mType = TIntSize;
return (*(this));
}
auto GfxVarValue::operator=(const nsCString& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsCString()) nsCString(aRhs);
mType = TnsCString;
return (*(this));
}
auto GfxVarValue::operator=(nsCString&& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsCString()) nsCString(std::move(aRhs));
mType = TnsCString;
return (*(this));
}
auto GfxVarValue::operator=(const nsString& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsString()) nsString(aRhs);
mType = TnsString;
return (*(this));
}
auto GfxVarValue::operator=(nsString&& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsString()) nsString(std::move(aRhs));
mType = TnsString;
return (*(this));
}
auto GfxVarValue::operator=(const int32_t& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int32_t()) int32_t(aRhs);
mType = Tint32_t;
return (*(this));
}
auto GfxVarValue::operator=(int32_t&& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int32_t()) int32_t(std::move(aRhs));
mType = Tint32_t;
return (*(this));
}
auto GfxVarValue::operator=(const float& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_float()) float(aRhs);
mType = Tfloat;
return (*(this));
}
auto GfxVarValue::operator=(float&& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_float()) float(std::move(aRhs));
mType = Tfloat;
return (*(this));
}
auto GfxVarValue::operator=(const nsTArray<uint64_t>& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfuint64_t()) nsTArray<uint64_t>((aRhs).Clone());
mType = TArrayOfuint64_t;
return (*(this));
}
auto GfxVarValue::operator=(nsTArray<uint64_t>&& aRhs) -> GfxVarValue&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfuint64_t()) nsTArray<uint64_t>(std::move(aRhs));
mType = TArrayOfuint64_t;
return (*(this));
}
auto GfxVarValue::operator=(const GfxVarValue& aRhs) -> GfxVarValue&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TBackendType:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_BackendType()) BackendType((aRhs).get_BackendType());
break;
}
case Tbool:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_bool()) bool((aRhs).get_bool());
break;
}
case TgfxImageFormat:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_gfxImageFormat()) gfxImageFormat((aRhs).get_gfxImageFormat());
break;
}
case TIntSize:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_IntSize()) IntSize((aRhs).get_IntSize());
break;
}
case TnsCString:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsCString()) nsCString((aRhs).get_nsCString());
break;
}
case TnsString:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsString()) nsString((aRhs).get_nsString());
break;
}
case Tint32_t:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int32_t()) int32_t((aRhs).get_int32_t());
break;
}
case Tfloat:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_float()) float((aRhs).get_float());
break;
}
case TArrayOfuint64_t:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfuint64_t()) nsTArray<uint64_t>(((aRhs).get_ArrayOfuint64_t()).Clone());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto GfxVarValue::operator=(GfxVarValue&& aRhs) -> GfxVarValue&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TBackendType:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_BackendType()) BackendType(std::move((aRhs).get_BackendType()));
(aRhs).MaybeDestroy();
break;
}
case Tbool:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_bool()) bool(std::move((aRhs).get_bool()));
(aRhs).MaybeDestroy();
break;
}
case TgfxImageFormat:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_gfxImageFormat()) gfxImageFormat(std::move((aRhs).get_gfxImageFormat()));
(aRhs).MaybeDestroy();
break;
}
case TIntSize:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_IntSize()) IntSize(std::move((aRhs).get_IntSize()));
(aRhs).MaybeDestroy();
break;
}
case TnsCString:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsCString()) nsCString(std::move((aRhs).get_nsCString()));
(aRhs).MaybeDestroy();
break;
}
case TnsString:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsString()) nsString(std::move((aRhs).get_nsString()));
(aRhs).MaybeDestroy();
break;
}
case Tint32_t:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int32_t()) int32_t(std::move((aRhs).get_int32_t()));
(aRhs).MaybeDestroy();
break;
}
case Tfloat:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_float()) float(std::move((aRhs).get_float()));
(aRhs).MaybeDestroy();
break;
}
case TArrayOfuint64_t:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfuint64_t()) nsTArray<uint64_t>(std::move((aRhs).get_ArrayOfuint64_t()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace gfx
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::gfx::GfxVarValue>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::gfx::GfxVarValue union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'GfxVarValue'
(aWriter)->WriteSentinel(420742220);
switch (type) {
case union__::TBackendType:
{
IPC::WriteParam(aWriter, (aVar).get_BackendType());
// Sentinel = 'TBackendType'
(aWriter)->WriteSentinel(481952927);
return;
}
case union__::Tbool:
{
IPC::WriteParam(aWriter, (aVar).get_bool());
// Sentinel = 'Tbool'
(aWriter)->WriteSentinel(96993793);
return;
}
case union__::TgfxImageFormat:
{
IPC::WriteParam(aWriter, (aVar).get_gfxImageFormat());
// Sentinel = 'TgfxImageFormat'
(aWriter)->WriteSentinel(776472038);
return;
}
case union__::TIntSize:
{
IPC::WriteParam(aWriter, (aVar).get_IntSize());
// Sentinel = 'TIntSize'
(aWriter)->WriteSentinel(224330523);
return;
}
case union__::TnsCString:
{
IPC::WriteParam(aWriter, (aVar).get_nsCString());
// Sentinel = 'TnsCString'
(aWriter)->WriteSentinel(353960944);
return;
}
case union__::TnsString:
{
IPC::WriteParam(aWriter, (aVar).get_nsString());
// Sentinel = 'TnsString'
(aWriter)->WriteSentinel(302908333);
return;
}
case union__::Tint32_t:
{
IPC::WriteParam(aWriter, (aVar).get_int32_t());
// Sentinel = 'Tint32_t'
(aWriter)->WriteSentinel(217252568);
return;
}
case union__::Tfloat:
{
IPC::WriteParam(aWriter, (aVar).get_float());
// Sentinel = 'Tfloat'
(aWriter)->WriteSentinel(137298539);
return;
}
case union__::TArrayOfuint64_t:
{
IPC::WriteParam(aWriter, (aVar).get_ArrayOfuint64_t());
// Sentinel = 'TArrayOfuint64_t'
(aWriter)->WriteSentinel(865404422);
return;
}
default:
{
aWriter->FatalError("unknown variant of union GfxVarValue");
return;
}
}
}
auto ParamTraits<::mozilla::gfx::GfxVarValue>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::gfx::GfxVarValue union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union GfxVarValue");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'GfxVarValue'
if ((!((aReader)->ReadSentinel(420742220)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union GfxVarValue");
return {};
}
switch (type) {
case union__::TBackendType:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::gfx::BackendType>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TBackendType of union GfxVarValue");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TBackendType'
if ((!((aReader)->ReadSentinel(481952927)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TBackendType of union GfxVarValue");
return {};
}
return std::move(tmp);
}
case union__::Tbool:
{
auto maybe__tmp = IPC::ReadParam<bool>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tbool of union GfxVarValue");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tbool'
if ((!((aReader)->ReadSentinel(96993793)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tbool of union GfxVarValue");
return {};
}
return std::move(tmp);
}
case union__::TgfxImageFormat:
{
auto maybe__tmp = IPC::ReadParam<::gfxImageFormat>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TgfxImageFormat of union GfxVarValue");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TgfxImageFormat'
if ((!((aReader)->ReadSentinel(776472038)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TgfxImageFormat of union GfxVarValue");
return {};
}
return std::move(tmp);
}
case union__::TIntSize:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::gfx::IntSize>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TIntSize of union GfxVarValue");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TIntSize'
if ((!((aReader)->ReadSentinel(224330523)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TIntSize of union GfxVarValue");
return {};
}
return std::move(tmp);
}
case union__::TnsCString:
{
auto maybe__tmp = IPC::ReadParam<::nsCString>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TnsCString of union GfxVarValue");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TnsCString'
if ((!((aReader)->ReadSentinel(353960944)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TnsCString of union GfxVarValue");
return {};
}
return std::move(tmp);
}
case union__::TnsString:
{
auto maybe__tmp = IPC::ReadParam<::nsString>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TnsString of union GfxVarValue");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TnsString'
if ((!((aReader)->ReadSentinel(302908333)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TnsString of union GfxVarValue");
return {};
}
return std::move(tmp);
}
case union__::Tint32_t:
{
auto maybe__tmp = IPC::ReadParam<::int32_t>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tint32_t of union GfxVarValue");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tint32_t'
if ((!((aReader)->ReadSentinel(217252568)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tint32_t of union GfxVarValue");
return {};
}
return std::move(tmp);
}
case union__::Tfloat:
{
auto maybe__tmp = IPC::ReadParam<float>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tfloat of union GfxVarValue");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tfloat'
if ((!((aReader)->ReadSentinel(137298539)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tfloat of union GfxVarValue");
return {};
}
return std::move(tmp);
}
case union__::TArrayOfuint64_t:
{
auto maybe__tmp = IPC::ReadParam<nsTArray<::uint64_t>>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TArrayOfuint64_t of union GfxVarValue");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TArrayOfuint64_t'
if ((!((aReader)->ReadSentinel(865404422)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TArrayOfuint64_t of union GfxVarValue");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union GfxVarValue");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct GfxVarUpdate|
//
namespace mozilla {
namespace gfx {
} // namespace gfx
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::gfx::GfxVarUpdate>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).value());
// Sentinel = 'value'
(aWriter)->WriteSentinel(107610654);
(aWriter)->WriteBytes((&((aVar).index())), 4);
// Sentinel = 'index'
(aWriter)->WriteSentinel(104333849);
}
auto ParamTraits<::mozilla::gfx::GfxVarUpdate>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___value = IPC::ReadParam<::mozilla::gfx::GfxVarValue>(aReader);
if (!maybe___value) {
aReader->FatalError("Error deserializing 'value' (GfxVarValue) member of 'GfxVarUpdate'");
return {};
}
auto& _value = *maybe___value;
// Sentinel = 'value'
if ((!((aReader)->ReadSentinel(107610654)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'value' (GfxVarValue) member of 'GfxVarUpdate'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
::uint32_t{0},
std::move(_value)};
if ((!((aReader)->ReadBytesInto((&((result__)->index())), 4)))) {
aReader->FatalError("Error bulk reading fields from uint32_t");
return {};
}
// Sentinel = 'index'
if ((!((aReader)->ReadSentinel(104333849)))) {
mozilla::ipc::SentinelReadError("Error bulk reading fields from uint32_t");
return {};
}
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct GfxInfoFeatureStatus|
//
namespace mozilla {
namespace gfx {
auto GfxInfoFeatureStatus::StaticAssertions() const -> void
{
static_assert(
(offsetof(GfxInfoFeatureStatus, status_) - offsetof(GfxInfoFeatureStatus, feature_)) == 4,
"Bad assumptions about field layout!");
}
} // namespace gfx
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::gfx::GfxInfoFeatureStatus>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).failureId());
// Sentinel = 'failureId'
(aWriter)->WriteSentinel(306447254);
(aWriter)->WriteBytes((&((aVar).feature())), 8);
// Sentinel = 'feature | status'
(aWriter)->WriteSentinel(888407629);
}
auto ParamTraits<::mozilla::gfx::GfxInfoFeatureStatus>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___failureId = IPC::ReadParam<::nsCString>(aReader);
if (!maybe___failureId) {
aReader->FatalError("Error deserializing 'failureId' (nsCString) member of 'GfxInfoFeatureStatus'");
return {};
}
auto& _failureId = *maybe___failureId;
// Sentinel = 'failureId'
if ((!((aReader)->ReadSentinel(306447254)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'failureId' (nsCString) member of 'GfxInfoFeatureStatus'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
::int32_t{0},
::int32_t{0},
std::move(_failureId)};
if ((!((aReader)->ReadBytesInto((&((result__)->feature())), 8)))) {
aReader->FatalError("Error bulk reading fields from int32_t");
return {};
}
// Sentinel = 'feature | status'
if ((!((aReader)->ReadSentinel(888407629)))) {
mozilla::ipc::SentinelReadError("Error bulk reading fields from int32_t");
return {};
}
return result__;
}
} // namespace IPC