Bug 1150124 - Move WARP reporter closer to actually testing WARP. r=Bas, a=sledru
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Wed, 01 Apr 2015 16:44:13 -0400
changeset 265397 93e4e1b3ebad833c7bf28dacd39181da4eed068e
parent 265396 7a07477574926045dfe793b920b36b43b9ceb8d9
child 265398 5cfe67ea5f53afc75c1ea71b7991037176901131
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas, sledru
bugs1150124
milestone39.0a2
Bug 1150124 - Move WARP reporter closer to actually testing WARP. r=Bas, a=sledru
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -1880,17 +1880,16 @@ gfxWindowsPlatform::InitD3D11Devices()
     xr->GetInSafeMode(&safeMode);
   }
 
   if (safeMode) {
     return;
   }
 
   bool useWARP = false;
-  ScopedGfxFeatureReporter reporterWARP("D3D11-WARP", gfxPrefs::LayersD3D11ForceWARP());
 
   nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
   if (gfxInfo) {
     int32_t status;
     if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS, &status))) {
       if (status != nsIGfxInfo::FEATURE_STATUS_OK) {
 
         if (gfxPrefs::LayersD3D11DisableWARP()) {
@@ -1967,16 +1966,17 @@ gfxWindowsPlatform::InitD3D11Devices()
     }
   }
 
   if (useWARP) {
     MOZ_ASSERT(!gfxPrefs::LayersD3D11DisableWARP());
     MOZ_ASSERT(!mD3D11Device);
     MOZ_ASSERT(!adapter);
 
+    ScopedGfxFeatureReporter reporterWARP("D3D11-WARP", gfxPrefs::LayersD3D11ForceWARP());
     hr = d3d11CreateDevice(nullptr, D3D_DRIVER_TYPE_WARP, nullptr,
                            // Use
                            // D3D11_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS
                            // to prevent bug 1092260. IE 11 also uses this flag.
                            D3D11_CREATE_DEVICE_BGRA_SUPPORT,
                            featureLevels.Elements(), featureLevels.Length(),
                            D3D11_SDK_VERSION, byRef(mD3D11Device), nullptr, nullptr);