mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 07:45:30 +00:00
Bug 1638413 - Allow WebRender compositor to be used without DirectComposition on non-Windows. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D75638
This commit is contained in:
parent
b042e254ba
commit
bc973c5022
@ -59,6 +59,7 @@ void gfxConfigManager::Init() {
|
||||
DeviceManagerDx::Get()->CheckHardwareStretchingSupport();
|
||||
mScaledResolution = HasScaledResolution();
|
||||
mIsWin10OrLater = IsWin10OrLater();
|
||||
mWrCompositorDCompRequired = true;
|
||||
#else
|
||||
mHwStretchingSupport = true;
|
||||
#endif
|
||||
@ -327,7 +328,7 @@ void gfxConfigManager::ConfigureWebRender() {
|
||||
NS_LITERAL_CSTRING("FEATURE_FAILURE_PICTURE_CACHING_DISABLED"));
|
||||
}
|
||||
|
||||
if (!mFeatureWrDComp->IsEnabled()) {
|
||||
if (!mFeatureWrDComp->IsEnabled() && mWrCompositorDCompRequired) {
|
||||
mFeatureWrCompositor->ForceDisable(
|
||||
FeatureStatus::Unavailable, "No DirectComposition usage",
|
||||
NS_LITERAL_CSTRING("FEATURE_FAILURE_NO_DIRECTCOMPOSITION"));
|
||||
|
@ -30,6 +30,7 @@ class gfxConfigManager {
|
||||
mWrForceAngle(false),
|
||||
mWrForceAngleNoGPUProcess(false),
|
||||
mWrDCompWinEnabled(false),
|
||||
mWrCompositorDCompRequired(false),
|
||||
mWrPictureCaching(false),
|
||||
mWrPartialPresent(false),
|
||||
mGPUProcessAllowSoftware(false),
|
||||
@ -76,6 +77,7 @@ class gfxConfigManager {
|
||||
bool mWrForceAngle;
|
||||
bool mWrForceAngleNoGPUProcess;
|
||||
bool mWrDCompWinEnabled;
|
||||
bool mWrCompositorDCompRequired;
|
||||
bool mWrPictureCaching;
|
||||
bool mWrPartialPresent;
|
||||
bool mGPUProcessAllowSoftware;
|
||||
|
@ -248,6 +248,7 @@ class GfxConfigManager : public ::testing::Test, public gfxConfigManager {
|
||||
mWrPartialPresent = true;
|
||||
mWrForceAngle = true;
|
||||
mWrDCompWinEnabled = true;
|
||||
mWrCompositorDCompRequired = true;
|
||||
mHwStretchingSupport = true;
|
||||
mIsWin10OrLater = true;
|
||||
mIsNightly = true;
|
||||
@ -466,6 +467,22 @@ TEST_F(GfxConfigManager, WebRenderDCompDisabled) {
|
||||
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
|
||||
}
|
||||
|
||||
TEST_F(GfxConfigManager, WebRenderDCompNotRequired) {
|
||||
mWrDCompWinEnabled = false;
|
||||
mWrCompositorDCompRequired = false;
|
||||
ConfigureWebRender();
|
||||
|
||||
EXPECT_TRUE(mFeatures.mWrQualified.IsEnabled());
|
||||
EXPECT_TRUE(mFeatures.mWr.IsEnabled());
|
||||
EXPECT_TRUE(mFeatures.mWrCompositor.IsEnabled());
|
||||
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
|
||||
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
|
||||
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
|
||||
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
|
||||
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
|
||||
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
|
||||
}
|
||||
|
||||
TEST_F(GfxConfigManager, WebRenderForceAngleDisabled) {
|
||||
mWrForceAngle = false;
|
||||
ConfigureWebRender();
|
||||
|
Loading…
Reference in New Issue
Block a user