1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_gfx_config_gfxConfigManager_h
7 #define mozilla_gfx_config_gfxConfigManager_h
9 #include "gfxFeature.h"
18 class gfxConfigManager
{
21 : mFeatureWr(nullptr),
22 mFeatureWrQualified(nullptr),
23 mFeatureWrCompositor(nullptr),
24 mFeatureWrAngle(nullptr),
25 mFeatureWrDComp(nullptr),
26 mFeatureWrPartial(nullptr),
27 mFeatureWrShaderCache(nullptr),
28 mFeatureWrOptimizedShaders(nullptr),
29 mFeatureWrSoftware(nullptr),
30 mFeatureHwCompositing(nullptr),
31 mFeatureD3D11HwAngle(nullptr),
32 mFeatureD3D11Compositing(nullptr),
33 mFeatureGPUProcess(nullptr),
34 mWrForceEnabled(false),
35 mWrSoftwareForceEnabled(false),
36 mWrCompositorForceEnabled(false),
38 mWrForceAngleNoGPUProcess(false),
39 mWrDCompWinEnabled(false),
40 mWrCompositorDCompRequired(false),
41 mWrPartialPresent(false),
42 mWrOptimizedShaders(false),
43 mGPUProcessAllowSoftware(false),
44 mWrEnvForceEnabled(false),
45 mScaledResolution(false),
46 mDisableHwCompositingNoWr(false),
48 mIsEarlyBetaOrEarlier(false),
50 mIsWin10OrLater(false) {}
54 void ConfigureWebRender();
55 void ConfigureFromBlocklist(long aFeature
, FeatureState
* aFeatureState
);
58 void EmplaceUserPref(const char* aPrefName
, Maybe
<bool>& aValue
);
59 void ConfigureWebRenderQualified();
61 nsCOMPtr
<nsIGfxInfo
> mGfxInfo
;
63 FeatureState
* mFeatureWr
;
64 FeatureState
* mFeatureWrQualified
;
65 FeatureState
* mFeatureWrCompositor
;
66 FeatureState
* mFeatureWrAngle
;
67 FeatureState
* mFeatureWrDComp
;
68 FeatureState
* mFeatureWrPartial
;
69 FeatureState
* mFeatureWrShaderCache
;
70 FeatureState
* mFeatureWrOptimizedShaders
;
71 FeatureState
* mFeatureWrSoftware
;
73 FeatureState
* mFeatureHwCompositing
;
74 FeatureState
* mFeatureD3D11HwAngle
;
75 FeatureState
* mFeatureD3D11Compositing
;
76 FeatureState
* mFeatureGPUProcess
;
81 Maybe
<bool> mWrCompositorEnabled
;
83 bool mWrSoftwareForceEnabled
;
84 bool mWrCompositorForceEnabled
;
86 bool mWrForceAngleNoGPUProcess
;
87 bool mWrDCompWinEnabled
;
88 bool mWrCompositorDCompRequired
;
89 bool mWrPartialPresent
;
90 Maybe
<bool> mWrShaderCache
;
91 bool mWrOptimizedShaders
;
92 bool mGPUProcessAllowSoftware
;
95 * Environment variables
97 bool mWrEnvForceEnabled
;
102 HwStretchingSupport mHwStretchingSupport
;
103 bool mScaledResolution
;
104 bool mDisableHwCompositingNoWr
;
106 bool mIsEarlyBetaOrEarlier
;
108 bool mIsWin10OrLater
;
112 } // namespace mozilla
114 #endif // mozilla_gfx_config_gfxConfigParams_h