commit 41d5125cab237d0c20494b5ca9bb7240b495b1ac
parent dc134ccc37bdfcf8c7cf63f291ff480c4e36021a
Author: Andrew Osmond <aosmond@gmail.com>
Date: Tue, 14 Oct 2025 13:10:03 +0000
Bug 1994095 - Remove pref to control whether software compositing is allowed in the GPU process. r=gfx-reviewers,bradwerth
We always want the GPU process, so let's simplify the code.
Differential Revision: https://phabricator.services.mozilla.com/D268482
Diffstat:
6 files changed, 0 insertions(+), 61 deletions(-)
diff --git a/gfx/config/gfxConfigManager.cpp b/gfx/config/gfxConfigManager.cpp
@@ -37,8 +37,6 @@ void gfxConfigManager::Init() {
StaticPrefs::gfx_wayland_hdr_force_enabled_AtStartup() ||
#endif
StaticPrefs::gfx_webrender_compositor_force_enabled_AtStartup();
- mGPUProcessAllowSoftware =
- StaticPrefs::layers_gpu_process_allow_software_AtStartup();
mWrForcePartialPresent =
StaticPrefs::gfx_webrender_force_partial_present_AtStartup();
mWrPartialPresent =
@@ -250,15 +248,6 @@ void gfxConfigManager::ConfigureWebRender() {
mFeatureHwCompositing->Disable(FeatureStatus::Blocked,
"Acceleration blocked by platform", ""_ns);
}
-
- if (!mFeatureHwCompositing->IsEnabled() &&
- mFeatureGPUProcess->IsEnabled() && !mGPUProcessAllowSoftware) {
- // We have neither WebRender nor OpenGL, we don't allow the GPU process
- // for basic compositor, and it wasn't disabled already.
- mFeatureGPUProcess->Disable(FeatureStatus::Unavailable,
- "Hardware compositing is unavailable.",
- ""_ns);
- }
}
mFeatureWrDComp->EnableByDefault();
diff --git a/gfx/config/gfxConfigManager.h b/gfx/config/gfxConfigManager.h
@@ -43,7 +43,6 @@ class gfxConfigManager {
mWrOptimizedShaders(false),
mWrScissoredCacheClearsEnabled(false),
mWrScissoredCacheClearsForceEnabled(false),
- mGPUProcessAllowSoftware(false),
mWrEnvForceEnabled(false),
mScaledResolution(false),
mDisableHwCompositingNoWr(false),
@@ -94,7 +93,6 @@ class gfxConfigManager {
bool mWrOptimizedShaders;
bool mWrScissoredCacheClearsEnabled;
bool mWrScissoredCacheClearsForceEnabled;
- bool mGPUProcessAllowSoftware;
/**
* Environment variables
diff --git a/gfx/tests/gtest/TestConfigManager.cpp b/gfx/tests/gtest/TestConfigManager.cpp
@@ -491,26 +491,6 @@ TEST_F(GfxConfigManager, WebRenderDisabledWithDisableHwCompositingNoWr) {
EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mWrScissoredCacheClears.IsEnabled());
EXPECT_FALSE(mFeatures.mHwCompositing.IsEnabled());
- EXPECT_FALSE(mFeatures.mGPUProcess.IsEnabled());
- EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
- EXPECT_TRUE(mFeatures.mGLNorm16Textures.IsEnabled());
-}
-
-TEST_F(GfxConfigManager, WebRenderDisabledWithAllowSoftwareGPUProcess) {
- mDisableHwCompositingNoWr = true;
- mMockGfxInfo->mStatusWr = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
- mGPUProcessAllowSoftware = true;
- ConfigureWebRender();
-
- EXPECT_FALSE(mFeatures.mWr.IsEnabled());
- EXPECT_FALSE(mFeatures.mWrCompositor.IsEnabled());
- EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
- EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
- EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
- EXPECT_FALSE(mFeatures.mWrShaderCache.IsEnabled());
- EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled());
- EXPECT_TRUE(mFeatures.mWrScissoredCacheClears.IsEnabled());
- EXPECT_FALSE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
EXPECT_TRUE(mFeatures.mGLNorm16Textures.IsEnabled());
diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -374,7 +374,6 @@ void gfxWindowsPlatform::InitAcceleration() {
DeviceManagerDx::Init();
InitializeConfig();
- InitGPUProcessSupport();
// Ensure devices initialization. SharedSurfaceANGLE and
// SharedSurfaceD3D11Interop use them. The devices are lazily initialized
// with WebRender to reduce memory usage.
@@ -501,7 +500,6 @@ bool gfxWindowsPlatform::HandleDeviceReset() {
InitializeConfig();
// XXX Add InitWebRenderConfig() calling.
if (mInitializedDevices) {
- InitGPUProcessSupport();
InitializeDevices();
}
UpdateANGLEConfig();
@@ -1671,26 +1669,6 @@ void gfxWindowsPlatform::InitializeD2D() {
d2d1_1.SetSuccessful();
}
-void gfxWindowsPlatform::InitGPUProcessSupport() {
- FeatureState& gpuProc = gfxConfig::GetFeature(Feature::GPU_PROCESS);
-
- if (!gpuProc.IsEnabled()) {
- return;
- }
-
- if (!gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) {
- // Don't use the GPU process if not using D3D11, unless software
- // compositor is allowed
- if (StaticPrefs::layers_gpu_process_allow_software_AtStartup()) {
- return;
- }
- gpuProc.Disable(FeatureStatus::Unavailable,
- "Not using GPU Process since D3D11 is unavailable",
- "FEATURE_FAILURE_NO_D3D11"_ns);
- }
- // If we're still enabled at this point, the user set the force-enabled pref.
-}
-
class D3DVsyncSource final : public VsyncSource {
public:
D3DVsyncSource()
diff --git a/gfx/thebes/gfxWindowsPlatform.h b/gfx/thebes/gfxWindowsPlatform.h
@@ -204,7 +204,6 @@ class gfxWindowsPlatform final : public gfxPlatform {
void InitializeD3D11();
void InitializeD2D();
bool InitDWriteSupport();
- void InitGPUProcessSupport();
void InitializeConfig();
void InitializeD3D9Config();
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
@@ -9560,11 +9560,6 @@
value: @IS_NOT_NIGHTLY_BUILD@
mirror: once
-- name: layers.gpu-process.allow-software
- type: bool
- value: true
- mirror: once
-
- name: layers.gpu-process.enabled
type: bool
#if defined(XP_WIN) || defined(MOZ_WIDGET_ANDROID)