summaryrefslogtreecommitdiffstats
path: root/gfx/ipc/GraphicsMessages.ipdlh
blob: 6f201c927213cc7be6d18ba9f2f763b0d17c0fb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/* -*- 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/. */

include "mozilla/GfxMessageUtils.h";

using struct DxgiAdapterDesc from "mozilla/D3DMessageUtils.h";
using struct mozilla::null_t from "mozilla/ipc/IPCCore.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 {

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 useD2D1;
  FeatureStatus d3d11HwAngle;
};

struct ContentDeviceData
{
  DevicePrefs prefs;
  D3D11DeviceStatus d3d11;
  uint8_t[] cmsOutputProfileData;
};

// Represents the state of a feature that has failed to initialize.
struct FeatureFailure
{
  FeatureStatus status;
  nsCString message;
  nsCString failureId;
};

struct GPUDeviceData
{
  // If a feature state has changed from Enabled -> Failure, these will be non-
  // null.
  FeatureFailure? d3d11Compositing;
  FeatureFailure? oglCompositing;
  D3D11DeviceStatus? gpuDevice;
};

union GfxVarValue
{
  BackendType;
  bool;
  gfxImageFormat;
  IntSize;
  nsCString;
  nsString;
  int32_t;
  float;
  uint64_t[];
};

struct GfxVarUpdate
{
  uint32_t index;
  GfxVarValue value;
};

struct GfxInfoFeatureStatus
{
    int32_t feature;
    int32_t status;
    nsCString failureId;
};

} // namespace gfx
} // namespace mozilla