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 258278 e749a39aaf5c
parent 258277 30be2924717b
child 258279 2ff89ac6dc8d
push id4633
push userryanvm@gmail.com
push date2015-04-06 15:44 +0000
treeherdermozilla-beta@e749a39aaf5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas, sledru
bugs1150124
milestone38.0
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
@@ -1814,17 +1814,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()) {
@@ -1901,16 +1900,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);