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 mFeatureWrCompositor(nullptr),
23 mFeatureWrAngle(nullptr),
24 mFeatureWrDComp(nullptr),
25 mFeatureWrPartial(nullptr),
26 mFeatureWrShaderCache(nullptr),
27 mFeatureWrOptimizedShaders(nullptr),
28 mFeatureWrScissoredCacheClears(nullptr),
29 mFeatureHwCompositing(nullptr),
30 mFeatureD3D11HwAngle(nullptr),
31 mFeatureD3D11Compositing(nullptr),
32 mFeatureGPUProcess(nullptr),
33 mWrForceEnabled(false),
34 mWrSoftwareForceEnabled(false),
35 mWrCompositorForceEnabled(false),
37 mWrForceAngleNoGPUProcess(false),
38 mWrDCompWinEnabled(false),
39 mWrCompositorDCompRequired(false),
40 mWrForcePartialPresent(false),
41 mWrPartialPresent(false),
42 mWrOptimizedShaders(false),
43 mWrScissoredCacheClearsEnabled(false),
44 mWrScissoredCacheClearsForceEnabled(false),
45 mGPUProcessAllowSoftware(false),
46 mWrEnvForceEnabled(false),
47 mScaledResolution(false),
48 mDisableHwCompositingNoWr(false),
50 mIsEarlyBetaOrEarlier(false),
52 mIsWin11OrLater(false) {}
56 void ConfigureWebRender();
57 void ConfigureFromBlocklist(long aFeature
, FeatureState
* aFeatureState
);
60 void EmplaceUserPref(const char* aPrefName
, Maybe
<bool>& aValue
);
61 void ConfigureWebRenderQualified();
63 nsCOMPtr
<nsIGfxInfo
> mGfxInfo
;
65 FeatureState
* mFeatureWr
;
66 FeatureState
* mFeatureWrCompositor
;
67 FeatureState
* mFeatureWrAngle
;
68 FeatureState
* mFeatureWrDComp
;
69 FeatureState
* mFeatureWrPartial
;
70 FeatureState
* mFeatureWrShaderCache
;
71 FeatureState
* mFeatureWrOptimizedShaders
;
72 FeatureState
* mFeatureWrScissoredCacheClears
;
74 FeatureState
* mFeatureHwCompositing
;
75 FeatureState
* mFeatureD3D11HwAngle
;
76 FeatureState
* mFeatureD3D11Compositing
;
77 FeatureState
* mFeatureGPUProcess
;
82 Maybe
<bool> mWrCompositorEnabled
;
84 bool mWrSoftwareForceEnabled
;
85 bool mWrCompositorForceEnabled
;
87 bool mWrForceAngleNoGPUProcess
;
88 bool mWrDCompWinEnabled
;
89 bool mWrCompositorDCompRequired
;
90 bool mWrForcePartialPresent
;
91 bool mWrPartialPresent
;
92 Maybe
<bool> mWrShaderCache
;
93 bool mWrOptimizedShaders
;
94 bool mWrScissoredCacheClearsEnabled
;
95 bool mWrScissoredCacheClearsForceEnabled
;
96 bool mGPUProcessAllowSoftware
;
99 * Environment variables
101 bool mWrEnvForceEnabled
;
106 HwStretchingSupport mHwStretchingSupport
;
107 bool mScaledResolution
;
108 bool mDisableHwCompositingNoWr
;
110 bool mIsEarlyBetaOrEarlier
;
112 bool mIsWin11OrLater
;
116 } // namespace mozilla
118 #endif // mozilla_gfx_config_gfxConfigParams_h