Bug 1386182 - Set FeatureState after EnableByDefault() in gfxWindowsPlatform::InitializeD3D11Config; r?jerry draft
authorKevin Chen <kechen@mozilla.com>
Tue, 01 Aug 2017 17:19:17 +0800
changeset 618934 d7c85a8a38e0746b7ce411c3347600e37e75aeba
parent 618757 44121dbcac6a9d3ff18ed087a09b3205e5a04db1
child 640237 c604876c16b87f320cc4a1404fcac7cc4f819823
push id71511
push userbmo:kechen@mozilla.com
push dateTue, 01 Aug 2017 09:19:57 +0000
reviewersjerry
bugs1386182
milestone56.0a1
Bug 1386182 - Set FeatureState after EnableByDefault() in gfxWindowsPlatform::InitializeD3D11Config; r?jerry MozReview-Commit-ID: G0Ozjq0bFRt
gfx/thebes/gfxWindowsPlatform.cpp
--- 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()) {