Bug 1386182 - Set FeatureState after EnableByDefault() in gfxWindowsPlatform::InitializeD3D11Config; r?jerry
MozReview-Commit-ID: G0Ozjq0bFRt
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -1329,16 +1329,18 @@ gfxWindowsPlatform::InitializeD3D11Confi
FeatureState& d3d11 = gfxConfig::GetFeature(Feature::D3D11_COMPOSITING);
if (!gfxConfig::IsEnabled(Feature::HW_COMPOSITING)) {
d3d11.DisableByDefault(FeatureStatus::Unavailable, "Hardware compositing is disabled",
NS_LITERAL_CSTRING("FEATURE_FAILURE_D3D11_NEED_HWCOMP"));
return;
}
+ d3d11.EnableByDefault();
+
if (!IsWin8OrLater() &&
!DeviceManagerDx::Get()->CheckRemotePresentSupport()) {
nsCOMPtr<nsIGfxInfo> gfxInfo;
gfxInfo = services::GetGfxInfo();
nsAutoString adaptorId;
gfxInfo->GetAdapterDeviceID(adaptorId);
// Blacklist Intel HD Graphics 510/520/530 on Windows 7 without platform
// update due to the crashes in Bug 1351349.
@@ -1348,18 +1350,16 @@ gfxWindowsPlatform::InitializeD3D11Confi
d3d11.Disable(FeatureStatus::Blacklisted, "Blacklisted, see bug 1351349",
NS_LITERAL_CSTRING("FEATURE_FAILURE_BUG_1351349"));
#else
gfxPrefs::SetCompositorClearState(true);
#endif
}
}
- d3d11.EnableByDefault();
-
nsCString message;
nsCString failureId;
if (!gfxPlatform::IsGfxInfoStatusOkay(nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS, &message, failureId)) {
d3d11.Disable(FeatureStatus::Blacklisted, message.get(), failureId);
}
// Check if the user really, really wants WARP.
if (gfxPrefs::LayersD3D11ForceWARP()) {