mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1645223 - Disable WebRender if XRender is enabled. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D83655
This commit is contained in:
parent
4e0216d1bd
commit
e503589521
@ -66,6 +66,7 @@ void gfxConfigManager::Init() {
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
mDisableHwCompositingNoWr = true;
|
||||
mXRenderEnabled = mozilla::Preferences::GetBool("gfx.xrender.enabled");
|
||||
#endif
|
||||
|
||||
#ifdef NIGHTLY_BUILD
|
||||
@ -267,6 +268,13 @@ void gfxConfigManager::ConfigureWebRender() {
|
||||
"FEATURE_FAILURE_SAFE_MODE"_ns);
|
||||
}
|
||||
|
||||
if (mXRenderEnabled) {
|
||||
// XRender and WebRender don't play well together. XRender is disabled by
|
||||
// default. If the user opts into it don't enable webrender.
|
||||
mFeatureWr->ForceDisable(FeatureStatus::Blocked,"XRender is enabled",
|
||||
"FEATURE_FAILURE_XRENDER"_ns);
|
||||
}
|
||||
|
||||
mFeatureWrAngle->DisableByDefault(FeatureStatus::OptIn,
|
||||
"WebRender ANGLE is an opt-in feature",
|
||||
"FEATURE_FAILURE_DEFAULT_OFF"_ns);
|
||||
|
@ -34,6 +34,7 @@ class gfxConfigManager {
|
||||
mWrPictureCaching(false),
|
||||
mWrPartialPresent(false),
|
||||
mGPUProcessAllowSoftware(false),
|
||||
mXRenderEnabled(false),
|
||||
mWrEnvForceEnabled(false),
|
||||
mWrEnvForceDisabled(false),
|
||||
mHwStretchingSupport(false),
|
||||
@ -81,6 +82,7 @@ class gfxConfigManager {
|
||||
bool mWrPictureCaching;
|
||||
bool mWrPartialPresent;
|
||||
bool mGPUProcessAllowSoftware;
|
||||
bool mXRenderEnabled;
|
||||
|
||||
/**
|
||||
* Environment variables
|
||||
|
@ -696,3 +696,19 @@ TEST_F(GfxConfigManager, WebRenderAtRefreshRateThreshold) {
|
||||
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
|
||||
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
|
||||
}
|
||||
|
||||
TEST_F(GfxConfigManager, WebRenderWhenXRenderEnabled) {
|
||||
mXRenderEnabled = true;
|
||||
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_TRUE(mFeatures.mHwCompositing.IsEnabled());
|
||||
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
|
||||
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user