gecko-dev/gfx/ipc/GraphicsMessages.ipdlh
Jean-Yves Avenard 237243edf2 Bug 1497294 - P4. Use EnumSet with D3D11DeviceStatus and checks for P010 and P016 support. r=mattwoodrow
This allows to more easily construct it and add new values as needed.

The other bool members could be made to be part of the set, but this would require more significant code change.

Depends on D8082

Differential Revision: https://phabricator.services.mozilla.com/D8129

--HG--
extra : moz-landing-system : lando
2018-10-10 22:14:51 +00:00

107 lines
2.1 KiB
Plaintext

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* vim: sw=2 ts=8 et :
*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
using struct DxgiAdapterDesc from "mozilla/D3DMessageUtils.h";
using struct mozilla::null_t from "ipc/IPCMessageUtils.h";
using mozilla::gfx::FeatureStatus from "gfxTelemetry.h";
using mozilla::gfx::BackendType from "mozilla/gfx/Types.h";
using mozilla::gfx::IntSize from "mozilla/gfx/Point.h";
using gfxImageFormat from "mozilla/gfx/Types.h";
using mozilla::gfx::D3D11Checks::VideoFormatOption from "mozilla/gfx/D3D11Checks.h";
using mozilla::gfx::D3D11Checks::VideoFormatOptionSet from "mozilla/gfx/D3D11Checks.h";
namespace mozilla {
namespace gfx {
union GfxPrefValue {
bool;
int32_t;
uint32_t;
float;
nsCString;
};
struct GfxPrefSetting {
int32_t index;
GfxPrefValue value;
};
struct D3D11DeviceStatus
{
bool isWARP;
bool textureSharingWorks;
uint32_t featureLevel;
DxgiAdapterDesc adapter;
int32_t sequenceNumber;
VideoFormatOptionSet formatOptions;
};
struct DevicePrefs
{
FeatureStatus hwCompositing;
FeatureStatus d3d11Compositing;
FeatureStatus oglCompositing;
FeatureStatus advancedLayers;
FeatureStatus useD2D1;
};
struct ContentDeviceData
{
DevicePrefs prefs;
D3D11DeviceStatus d3d11;
};
// Represents the state of a feature that has failed to initialize.
struct FeatureFailure
{
FeatureStatus status;
nsCString message;
nsCString failureId;
};
// If a feature state has changed from Enabled -> Failure, this will be non-
// null.
union FeatureChange
{
null_t;
FeatureFailure;
};
union GPUDeviceStatus
{
null_t;
D3D11DeviceStatus;
};
struct GPUDeviceData
{
FeatureChange d3d11Compositing;
FeatureChange oglCompositing;
FeatureChange advancedLayers;
GPUDeviceStatus gpuDevice;
};
union GfxVarValue
{
BackendType;
bool;
gfxImageFormat;
IntSize;
nsCString;
nsString;
int32_t;
};
struct GfxVarUpdate
{
size_t index;
GfxVarValue value;
};
} // namespace gfx
} // namespace mozilla