diff --git a/gfx/config/gfxConfigManager.cpp b/gfx/config/gfxConfigManager.cpp index c00c6d5f4577..21660cbc46a5 100644 --- a/gfx/config/gfxConfigManager.cpp +++ b/gfx/config/gfxConfigManager.cpp @@ -140,39 +140,6 @@ void gfxConfigManager::ConfigureWebRenderSoftware() { } else if (gfxPlatform::DoesFissionForceWebRender()) { mFeatureWrSoftware->UserForceEnable("Force enabled by fission"); } - - if (!mHasWrSoftwareBlocklist) { - return; - } - - nsCString failureId; - int32_t status; - if (NS_FAILED(mGfxInfo->GetFeatureStatus( - nsIGfxInfo::FEATURE_WEBRENDER_SOFTWARE, failureId, &status))) { - mFeatureWrSoftware->Disable(FeatureStatus::BlockedNoGfxInfo, - "gfxInfo is broken", - "FEATURE_FAILURE_WR_NO_GFX_INFO"_ns); - return; - } - - switch (status) { - case nsIGfxInfo::FEATURE_ALLOW_ALWAYS: - case nsIGfxInfo::FEATURE_ALLOW_QUALIFIED: - break; - case nsIGfxInfo::FEATURE_DENIED: - mFeatureWrSoftware->Disable(FeatureStatus::Denied, "Not on allowlist", - failureId); - break; - default: - mFeatureWrSoftware->Disable(FeatureStatus::Blocklisted, - "No qualified hardware", failureId); - break; - case nsIGfxInfo::FEATURE_STATUS_OK: - MOZ_ASSERT_UNREACHABLE("We should still be rolling out WebRender!"); - mFeatureWrSoftware->Disable(FeatureStatus::Blocked, - "Not controlled by rollout", failureId); - break; - } } void gfxConfigManager::ConfigureWebRenderQualified() { diff --git a/gfx/config/gfxConfigManager.h b/gfx/config/gfxConfigManager.h index 7085775e0a77..16e4ce420da7 100644 --- a/gfx/config/gfxConfigManager.h +++ b/gfx/config/gfxConfigManager.h @@ -49,8 +49,7 @@ class gfxConfigManager { mIsNightly(false), mIsEarlyBetaOrEarlier(false), mSafeMode(false), - mIsWin10OrLater(false), - mHasWrSoftwareBlocklist(false) {} + mIsWin10OrLater(false) {} void Init(); @@ -112,7 +111,6 @@ class gfxConfigManager { bool mIsEarlyBetaOrEarlier; bool mSafeMode; bool mIsWin10OrLater; - bool mHasWrSoftwareBlocklist; }; } // namespace gfx diff --git a/gfx/tests/gtest/TestConfigManager.cpp b/gfx/tests/gtest/TestConfigManager.cpp index c6831268f3d5..8e0ce5c94b5f 100644 --- a/gfx/tests/gtest/TestConfigManager.cpp +++ b/gfx/tests/gtest/TestConfigManager.cpp @@ -21,7 +21,6 @@ class MockGfxInfo final : public nsIGfxInfo { int32_t mStatusWr; int32_t mStatusWrCompositor; - int32_t mStatusWrSoftware; int32_t mStatusWrShaderCache; int32_t mStatusWrOptimizedShaders; int32_t mMaxRefreshRate; @@ -34,7 +33,6 @@ class MockGfxInfo final : public nsIGfxInfo { MockGfxInfo() : mStatusWr(nsIGfxInfo::FEATURE_ALLOW_ALWAYS), mStatusWrCompositor(nsIGfxInfo::FEATURE_STATUS_OK), - mStatusWrSoftware(nsIGfxInfo::FEATURE_DENIED), mStatusWrShaderCache(nsIGfxInfo::FEATURE_STATUS_OK), mStatusWrOptimizedShaders(nsIGfxInfo::FEATURE_STATUS_OK), mMaxRefreshRate(-1), @@ -52,9 +50,6 @@ class MockGfxInfo final : public nsIGfxInfo { case nsIGfxInfo::FEATURE_WEBRENDER_COMPOSITOR: *_retval = mStatusWrCompositor; break; - case nsIGfxInfo::FEATURE_WEBRENDER_SOFTWARE: - *_retval = mStatusWrSoftware; - break; case nsIGfxInfo::FEATURE_WEBRENDER_SHADER_CACHE: *_retval = mStatusWrShaderCache; break; @@ -308,7 +303,6 @@ class GfxConfigManager : public ::testing::Test, public gfxConfigManager { mIsWin10OrLater = true; mIsNightly = true; mIsEarlyBetaOrEarlier = true; - mHasWrSoftwareBlocklist = true; } void TearDown() override { @@ -363,7 +357,7 @@ TEST_F(GfxConfigManager, WebRenderDefault) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderNoPartialPresent) { @@ -381,7 +375,7 @@ TEST_F(GfxConfigManager, WebRenderNoPartialPresent) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderPartialPresentMali) { @@ -407,7 +401,7 @@ TEST_F(GfxConfigManager, WebRenderScaledResolutionWithHwStretching) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderScaledResolutionNoHwStretching) { @@ -426,7 +420,7 @@ TEST_F(GfxConfigManager, WebRenderScaledResolutionNoHwStretching) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderEnabledWithDisableHwCompositingNoWr) { @@ -444,7 +438,7 @@ TEST_F(GfxConfigManager, WebRenderEnabledWithDisableHwCompositingNoWr) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderDisabledWithDisableHwCompositingNoWr) { @@ -455,15 +449,15 @@ TEST_F(GfxConfigManager, WebRenderDisabledWithDisableHwCompositingNoWr) { EXPECT_FALSE(mFeatures.mWrQualified.IsEnabled()); EXPECT_FALSE(mFeatures.mWr.IsEnabled()); EXPECT_FALSE(mFeatures.mWrCompositor.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrAngle.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled()); EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrPartial.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled()); EXPECT_FALSE(mFeatures.mWrShaderCache.IsEnabled()); EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled()); EXPECT_FALSE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_FALSE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderDisabledWithAllowSoftwareGPUProcess) { @@ -475,20 +469,19 @@ TEST_F(GfxConfigManager, WebRenderDisabledWithAllowSoftwareGPUProcess) { EXPECT_FALSE(mFeatures.mWrQualified.IsEnabled()); EXPECT_FALSE(mFeatures.mWr.IsEnabled()); EXPECT_FALSE(mFeatures.mWrCompositor.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrAngle.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled()); EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrPartial.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled()); EXPECT_FALSE(mFeatures.mWrShaderCache.IsEnabled()); EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled()); EXPECT_FALSE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderSafeMode) { mSafeMode = true; - mMockGfxInfo->mStatusWrSoftware = nsIGfxInfo::FEATURE_ALLOW_ALWAYS; ConfigureWebRender(); EXPECT_TRUE(mFeatures.mWrQualified.IsEnabled()); @@ -520,7 +513,7 @@ TEST_F(GfxConfigManager, WebRenderEarlierThanWindows10) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderDCompDisabled) { @@ -538,7 +531,7 @@ TEST_F(GfxConfigManager, WebRenderDCompDisabled) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderDCompNotRequired) { @@ -557,7 +550,7 @@ TEST_F(GfxConfigManager, WebRenderDCompNotRequired) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderForceAngleDisabled) { @@ -575,7 +568,7 @@ TEST_F(GfxConfigManager, WebRenderForceAngleDisabled) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderD3D11HwAngleDisabled) { @@ -587,13 +580,13 @@ TEST_F(GfxConfigManager, WebRenderD3D11HwAngleDisabled) { EXPECT_FALSE(mFeatures.mWrCompositor.IsEnabled()); EXPECT_FALSE(mFeatures.mWrAngle.IsEnabled()); EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrPartial.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled()); EXPECT_FALSE(mFeatures.mWrShaderCache.IsEnabled()); EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled()); EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_FALSE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderD3D11HwAngleAndForceAngleDisabled) { @@ -612,7 +605,7 @@ TEST_F(GfxConfigManager, WebRenderD3D11HwAngleAndForceAngleDisabled) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_FALSE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderGPUProcessDisabled) { @@ -624,13 +617,13 @@ TEST_F(GfxConfigManager, WebRenderGPUProcessDisabled) { EXPECT_FALSE(mFeatures.mWrCompositor.IsEnabled()); EXPECT_FALSE(mFeatures.mWrAngle.IsEnabled()); EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrPartial.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled()); EXPECT_FALSE(mFeatures.mWrShaderCache.IsEnabled()); EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled()); EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_FALSE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderQualifiedAndBlocklistAllowQualified) { @@ -648,7 +641,7 @@ TEST_F(GfxConfigManager, WebRenderQualifiedAndBlocklistAllowQualified) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderQualifiedAndBlocklistAllowAlways) { @@ -667,7 +660,7 @@ TEST_F(GfxConfigManager, WebRenderQualifiedAndBlocklistAllowAlways) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderIntelBatteryNoHwStretchingNotNightly) { @@ -689,7 +682,7 @@ TEST_F(GfxConfigManager, WebRenderIntelBatteryNoHwStretchingNotNightly) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderNvidiaHighMixedRefreshRateNightly) { @@ -709,7 +702,7 @@ TEST_F(GfxConfigManager, WebRenderNvidiaHighMixedRefreshRateNightly) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderNvidiaHighMixedRefreshRateNotNightly) { @@ -729,7 +722,7 @@ TEST_F(GfxConfigManager, WebRenderNvidiaHighMixedRefreshRateNotNightly) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderNvidiaHighRefreshRateNotNightly) { @@ -747,7 +740,7 @@ TEST_F(GfxConfigManager, WebRenderNvidiaHighRefreshRateNotNightly) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderNvidiaLowMixedRefreshRateNotNightly) { @@ -755,27 +748,6 @@ TEST_F(GfxConfigManager, WebRenderNvidiaLowMixedRefreshRateNotNightly) { mMockGfxInfo->mHasMixedRefreshRate = true; ConfigureWebRender(); - EXPECT_TRUE(mFeatures.mWrQualified.IsEnabled()); - EXPECT_TRUE(mFeatures.mWr.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrCompositor.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrShaderCache.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled()); - EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); - EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); - EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); -} - -TEST_F(GfxConfigManager, WebRenderSofwareAndQualified) { - // Enabling software in gfxInfo gives the same results - // as the default configuration, since qualified hardware - // takes precedence, but we still enable the software feature. - mMockGfxInfo->mStatusWrSoftware = nsIGfxInfo::FEATURE_ALLOW_ALWAYS; - ConfigureWebRender(); - EXPECT_TRUE(mFeatures.mWrQualified.IsEnabled()); EXPECT_TRUE(mFeatures.mWr.IsEnabled()); EXPECT_TRUE(mFeatures.mWrCompositor.IsEnabled()); @@ -791,10 +763,7 @@ TEST_F(GfxConfigManager, WebRenderSofwareAndQualified) { } TEST_F(GfxConfigManager, WebRenderSofwareAndNotQualified) { - // Enabling software in gfxInfo when we're not qualified - // results in WR software being enabled instead. mMockGfxInfo->mStatusWr = nsIGfxInfo::FEATURE_DENIED; - mMockGfxInfo->mStatusWrSoftware = nsIGfxInfo::FEATURE_ALLOW_ALWAYS; ConfigureWebRender(); EXPECT_FALSE(mFeatures.mWrQualified.IsEnabled()); @@ -829,28 +798,8 @@ TEST_F(GfxConfigManager, WebRenderForceDisabledEnvvar) { EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); } -TEST_F(GfxConfigManager, WebRenderSoftwareAllowedForceDisabledEnvvar) { - mWrEnvForceDisabled = true; - mMockGfxInfo->mStatusWrSoftware = nsIGfxInfo::FEATURE_ALLOW_ALWAYS; - ConfigureWebRender(); - - EXPECT_TRUE(mFeatures.mWrQualified.IsEnabled()); - EXPECT_FALSE(mFeatures.mWr.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrCompositor.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrPartial.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrShaderCache.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled()); - EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); - EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); - EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); -} - TEST_F(GfxConfigManager, WebRenderSoftwareAllowedForceDisabledPref) { mWrForceDisabled = true; - mMockGfxInfo->mStatusWrSoftware = nsIGfxInfo::FEATURE_ALLOW_ALWAYS; ConfigureWebRender(); EXPECT_TRUE(mFeatures.mWrQualified.IsEnabled()); @@ -891,26 +840,6 @@ TEST_F(GfxConfigManager, WebRenderForceEnabledEnvvar) { mMockGfxInfo->mStatusWr = nsIGfxInfo::FEATURE_DENIED; ConfigureWebRender(); - EXPECT_FALSE(mFeatures.mWrQualified.IsEnabled()); - EXPECT_TRUE(mFeatures.mWr.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrCompositor.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrShaderCache.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled()); - EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); - EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); - EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); -} - -TEST_F(GfxConfigManager, WebRenderSoftwareAllowedForceEnabledEnvvar) { - mWrEnvForceEnabled = true; - mMockGfxInfo->mStatusWr = nsIGfxInfo::FEATURE_DENIED; - mMockGfxInfo->mStatusWrSoftware = nsIGfxInfo::FEATURE_ALLOW_ALWAYS; - ConfigureWebRender(); - EXPECT_FALSE(mFeatures.mWrQualified.IsEnabled()); EXPECT_TRUE(mFeatures.mWr.IsEnabled()); EXPECT_TRUE(mFeatures.mWrCompositor.IsEnabled()); @@ -928,7 +857,6 @@ TEST_F(GfxConfigManager, WebRenderSoftwareAllowedForceEnabledEnvvar) { TEST_F(GfxConfigManager, WebRenderSoftwareAllowedForceEnabledPref) { mWrForceEnabled = true; mMockGfxInfo->mStatusWr = nsIGfxInfo::FEATURE_DENIED; - mMockGfxInfo->mStatusWrSoftware = nsIGfxInfo::FEATURE_ALLOW_ALWAYS; ConfigureWebRender(); EXPECT_FALSE(mFeatures.mWrQualified.IsEnabled()); @@ -968,7 +896,6 @@ TEST_F(GfxConfigManager, WebRenderForceSoftwareForceEnabledEnvvar) { TEST_F(GfxConfigManager, WebRenderSoftwareReleaseWindowsGPUProcessDisabled) { mIsNightly = mIsEarlyBetaOrEarlier = false; mMockGfxInfo->mStatusWr = nsIGfxInfo::FEATURE_DENIED; - mMockGfxInfo->mStatusWrSoftware = nsIGfxInfo::FEATURE_ALLOW_ALWAYS; mFeatures.mGPUProcess.UserDisable("", ""_ns); ConfigureWebRender(); @@ -991,7 +918,6 @@ TEST_F(GfxConfigManager, WebRenderSoftwareReleaseGPUProcessDisabled) { mIsWin10OrLater = false; mFeatureD3D11Compositing = nullptr; mMockGfxInfo->mStatusWr = nsIGfxInfo::FEATURE_DENIED; - mMockGfxInfo->mStatusWrSoftware = nsIGfxInfo::FEATURE_ALLOW_ALWAYS; mFeatures.mGPUProcess.UserDisable("", ""_ns); ConfigureWebRender(); @@ -1024,7 +950,7 @@ TEST_F(GfxConfigManager, WebRenderShaderCacheDisabled) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); + EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } TEST_F(GfxConfigManager, WebRenderShaderCacheBlocked) { @@ -1042,23 +968,5 @@ TEST_F(GfxConfigManager, WebRenderShaderCacheBlocked) { EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); - EXPECT_FALSE(mFeatures.mWrSoftware.IsEnabled()); -} - -TEST_F(GfxConfigManager, WebRenderNoSoftwareBlocklist) { - mHasWrSoftwareBlocklist = false; - ConfigureWebRender(); - - EXPECT_TRUE(mFeatures.mWrQualified.IsEnabled()); - EXPECT_TRUE(mFeatures.mWr.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrCompositor.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrShaderCache.IsEnabled()); - EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled()); - EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled()); - EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); - EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); EXPECT_TRUE(mFeatures.mWrSoftware.IsEnabled()); } diff --git a/widget/GfxInfoBase.cpp b/widget/GfxInfoBase.cpp index a4a606a6a486..0e71f2198620 100644 --- a/widget/GfxInfoBase.cpp +++ b/widget/GfxInfoBase.cpp @@ -226,9 +226,6 @@ static const char* GetPrefNameForFeature(int32_t aFeature) { case nsIGfxInfo::FEATURE_THREADSAFE_GL: name = BLOCKLIST_PREF_BRANCH "gl.threadsafe"; break; - case nsIGfxInfo::FEATURE_WEBRENDER_SOFTWARE: - name = BLOCKLIST_PREF_BRANCH "webrender.software"; - break; case nsIGfxInfo::FEATURE_WEBRENDER_OPTIMIZED_SHADERS: name = BLOCKLIST_PREF_BRANCH "webrender.optimized-shaders"; break; @@ -481,9 +478,6 @@ static int32_t BlocklistFeatureToGfxFeature(const nsAString& aFeature) { if (aFeature.EqualsLiteral("THREADSAFE_GL")) { return nsIGfxInfo::FEATURE_THREADSAFE_GL; } - if (aFeature.EqualsLiteral("WEBRENDER_SOFTWARE")) { - return nsIGfxInfo::FEATURE_WEBRENDER_SOFTWARE; - } if (aFeature.EqualsLiteral("X11_EGL")) { return nsIGfxInfo::FEATURE_X11_EGL; } @@ -1133,8 +1127,7 @@ int32_t GfxInfoBase::FindBlocklistedDeviceInList( #endif if (match || info[i].mDriverVersion == GfxDriverInfo::allDriverVersions) { - if ((info[i].mFeature == GfxDriverInfo::allFeatures && - aFeature != nsIGfxInfo::FEATURE_WEBRENDER_SOFTWARE) || + if (info[i].mFeature == GfxDriverInfo::allFeatures || info[i].mFeature == aFeature) { status = info[i].mFeatureStatus; if (!info[i].mRuleId.IsEmpty()) { @@ -1232,8 +1225,7 @@ bool GfxInfoBase::DoesDriverVendorMatch(const nsAString& aBlocklistVendor, } bool GfxInfoBase::IsFeatureAllowlisted(int32_t aFeature) const { - return aFeature == nsIGfxInfo::FEATURE_WEBRENDER || - aFeature == nsIGfxInfo::FEATURE_WEBRENDER_SOFTWARE; + return aFeature == nsIGfxInfo::FEATURE_WEBRENDER; } nsresult GfxInfoBase::GetFeatureStatusImpl( @@ -1366,7 +1358,6 @@ void GfxInfoBase::EvaluateDownloadedBlocklist( nsIGfxInfo::FEATURE_D3D11_KEYED_MUTEX, nsIGfxInfo::FEATURE_WEBRENDER, nsIGfxInfo::FEATURE_WEBRENDER_COMPOSITOR, - nsIGfxInfo::FEATURE_WEBRENDER_SOFTWARE, nsIGfxInfo::FEATURE_DX_NV12, nsIGfxInfo::FEATURE_DX_P010, nsIGfxInfo::FEATURE_DX_P016, diff --git a/widget/android/GfxInfo.cpp b/widget/android/GfxInfo.cpp index 2df2fc38eb2e..95770276b28a 100644 --- a/widget/android/GfxInfo.cpp +++ b/widget/android/GfxInfo.cpp @@ -652,11 +652,6 @@ nsresult GfxInfo::GetFeatureStatusImpl( } return NS_OK; } - - if (aFeature == FEATURE_WEBRENDER_SOFTWARE) { - *aStatus = nsIGfxInfo::FEATURE_ALLOW_ALWAYS; - return NS_OK; - } } if (aFeature == FEATURE_GL_SWIZZLE) { diff --git a/widget/cocoa/GfxInfo.mm b/widget/cocoa/GfxInfo.mm index fe91b3d881d5..a69ec8167658 100644 --- a/widget/cocoa/GfxInfo.mm +++ b/widget/cocoa/GfxInfo.mm @@ -457,11 +457,6 @@ const nsTArray& GfxInfo::GetGfxDriverInfo() { IMPLEMENT_MAC_DRIVER_BLOCKLIST(OperatingSystem::OSX, DeviceFamily::AppleAll, nsIGfxInfo::FEATURE_WEBRENDER, nsIGfxInfo::FEATURE_ALLOW_ALWAYS, "FEATURE_ROLLOUT_APPLE_SILICON_MAC"); - - // FEATURE_WEBRENDER_SOFTWARE - ALLOWLIST - IMPLEMENT_MAC_DRIVER_BLOCKLIST(OperatingSystem::OSX, DeviceFamily::All, - nsIGfxInfo::FEATURE_WEBRENDER_SOFTWARE, - nsIGfxInfo::FEATURE_ALLOW_ALWAYS, "FEATURE_ROLLOUT_SOFTWARE_WR"); } return *sDriverInfo; } diff --git a/widget/gtk/GfxInfo.cpp b/widget/gtk/GfxInfo.cpp index 73d6a6472c21..9b7f814415b3 100644 --- a/widget/gtk/GfxInfo.cpp +++ b/widget/gtk/GfxInfo.cpp @@ -658,7 +658,7 @@ const nsTArray& GfxInfo::GetGfxDriverInfo() { //////////////////////////////////// // FEATURE_WEBRENDER - // All Mesa software drivers, see FEATURE_WEBRENDER_SOFTWARE + // All Mesa software drivers, they should get Software WebRender instead. APPEND_TO_DRIVER_BLOCKLIST_EXT( OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All, DesktopEnvironment::All, WindowProtocol::All, @@ -788,16 +788,6 @@ const nsTArray& GfxInfo::GetGfxDriverInfo() { nsIGfxInfo::FEATURE_ALLOW_ALWAYS, DRIVER_GREATER_THAN_OR_EQUAL, V(17, 0, 0, 0), "FEATURE_ROLLOUT_ATI_MESA", "Mesa 17.0.0.0"); - //////////////////////////////////// - // FEATURE_WEBRENDER_SOFTWARE - ALLOWLIST -#if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || \ - defined(__i386) || defined(__amd64__) || EARLY_BETA_OR_EARLIER - APPEND_TO_DRIVER_BLOCKLIST(OperatingSystem::Linux, DeviceFamily::All, - nsIGfxInfo::FEATURE_WEBRENDER_SOFTWARE, - nsIGfxInfo::FEATURE_ALLOW_ALWAYS, - DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0), - "FEATURE_ROLLOUT_SOFTWARE_WR", ""); -#endif //////////////////////////////////// // FEATURE_WEBRENDER_COMPOSITOR APPEND_TO_DRIVER_BLOCKLIST( diff --git a/widget/nsIGfxInfo.idl b/widget/nsIGfxInfo.idl index 84d085ce67d3..759204e4b026 100644 --- a/widget/nsIGfxInfo.idl +++ b/widget/nsIGfxInfo.idl @@ -171,16 +171,14 @@ interface nsIGfxInfo : nsISupports const long FEATURE_ALLOW_WEBGL_OUT_OF_PROCESS = 30; /* Is OpenGL threadsafe (starting in 83) */ const long FEATURE_THREADSAFE_GL = 31; - /* Support running WebRender using the software backend, starting in 84. */ - const long FEATURE_WEBRENDER_SOFTWARE = 32; /* Whether webrender uses pre-optimized shaders, starting in 87. */ - const long FEATURE_WEBRENDER_OPTIMIZED_SHADERS = 33; + const long FEATURE_WEBRENDER_OPTIMIZED_SHADERS = 32; /* Whether we prefer EGL over GLX with X11, starting in 88. */ - const long FEATURE_X11_EGL = 34; + const long FEATURE_X11_EGL = 33; /* Whether DMABUF is supported, starting in 88. */ - const long FEATURE_DMABUF = 35; + const long FEATURE_DMABUF = 34; /* Whether webrender caches shader program binaries to disk, starting in 89. */ - const long FEATURE_WEBRENDER_SHADER_CACHE = 36; + const long FEATURE_WEBRENDER_SHADER_CACHE = 35; /* the maximum feature value. */ const long FEATURE_MAX_VALUE = FEATURE_WEBRENDER_SHADER_CACHE; diff --git a/widget/windows/GfxInfo.cpp b/widget/windows/GfxInfo.cpp index 4cd9d35d0c27..c805e01d31a3 100644 --- a/widget/windows/GfxInfo.cpp +++ b/widget/windows/GfxInfo.cpp @@ -1281,9 +1281,6 @@ static bool OnlyAllowFeatureOnWhitelistedVendor(int32_t aFeature) { case nsIGfxInfo::FEATURE_GPU_PROCESS: // We can mostly assume that ANGLE will work case nsIGfxInfo::FEATURE_DIRECT3D_11_ANGLE: - // Software WebRender is our Basic compositor replacement. It needs to - // always work. - case nsIGfxInfo::FEATURE_WEBRENDER_SOFTWARE: return false; default: return true; @@ -1893,25 +1890,6 @@ const nsTArray& GfxInfo::GetGfxDriverInfo() { nsIGfxInfo::FEATURE_WEBRENDER_SCISSORED_CACHE_CLEARS, nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0), "FEATURE_FAILURE_BUG_1603515"); - - //////////////////////////////////// - // FEATURE_WEBRENDER_SOFTWARE - - // TODO(aosmond): Bug 1678044 - wdspec tests ignore enable/disable-webrender - // Once the test infrastructure is fixed, we can remove this blocklist rule - APPEND_TO_DRIVER_BLOCKLIST2( - OperatingSystem::Windows, DeviceFamily::AmazonAll, - nsIGfxInfo::FEATURE_WEBRENDER_SOFTWARE, - nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED, - V(0, 0, 0, 0), "FEATURE_FAILURE_BUG_1678044"); - - //////////////////////////////////// - // FEATURE_WEBRENDER_SOFTWARE - ALLOWLIST - APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Windows, DeviceFamily::All, - nsIGfxInfo::FEATURE_WEBRENDER_SOFTWARE, - nsIGfxInfo::FEATURE_ALLOW_ALWAYS, - DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0), - "FEATURE_ROLLOUT_SOFTWARE_WR"); } return *sDriverInfo; }