Bug 1207665 - Don't use Direct 2D 1.0 if Direct3D11 is using WARP. r=jmuizelaar, a=sylvestre
authorDavid Anderson <danderson@mozilla.com>
Mon, 28 Sep 2015 12:45:43 -0700
changeset 296241 b52adde0a6674da8a3b6e8c23454fec76914710f
parent 296240 bdfe683a5e01fc48879cf2ee8e7f8699cbb28024
child 296242 62a2e70914d52c8901ffb0dda6682ae5e7d2bf6c
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmuizelaar, sylvestre
bugs1207665
milestone43.0a2
Bug 1207665 - Don't use Direct 2D 1.0 if Direct3D11 is using WARP. r=jmuizelaar, a=sylvestre
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -2394,16 +2394,22 @@ gfxWindowsPlatform::CheckD2DSupport()
   }
 
   // Direct2D is only Vista or higher, but we require a D3D11 compositor to
   // use it. (This check may be implied by the fact that we do not get here
   // without a D3D11 compositor device.)
   if (!IsVistaOrLater()) {
     return FeatureStatus::Unavailable;
   }
+
+  // Normally we don't use D2D content drawing when using WARP. However if
+  // WARP is force-enabled, we will let Direct2D use WARP as well.
+  if (mIsWARP && !gfxPrefs::LayersD3D11ForceWARP()) {
+    return FeatureStatus::Blocked;
+  }
   return FeatureStatus::Available;
 }
 
 void
 gfxWindowsPlatform::InitializeD2D()
 {
   mD2DStatus = CheckD2DSupport();
   if (IsFeatureStatusFailure(mD2DStatus)) {
@@ -2447,21 +2453,16 @@ gfxWindowsPlatform::CheckD2D1Support()
   if (XRE_IsContentProcess()) {
     return GetParentDevicePrefs().useD2D1()
            ? FeatureStatus::Available
            : FeatureStatus::Blocked;
   }
   if (!gfxPrefs::Direct2DUse1_1()) {
     return FeatureStatus::Disabled;
   }
-  // Normally we don't use D2D content drawing when using WARP. However if
-  // WARP is force-enabled, we will let Direct2D use WARP as well.
-  if (mIsWARP && !gfxPrefs::LayersD3D11ForceWARP()) {
-    return FeatureStatus::Blocked;
-  }
   return FeatureStatus::Available;
 }
 
 void
 gfxWindowsPlatform::InitializeD2D1()
 {
   ScopedGfxFeatureReporter d2d1_1("D2D1.1");