Bug 1207437 (part 1) - Don't recompute Windows feature levels. r=dvander.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 24 Sep 2015 15:52:02 -0700
changeset 264260 1621dcfac7893af68a7265ce4ae53f1baa89c3f1
parent 264259 11b3778d51e06b1467f6acc130d9f471534a2c37
child 264261 9aab02e2871ff1ddf5ef854bb432f6d173ae4332
push id65585
push usernnethercote@mozilla.com
push dateThu, 24 Sep 2015 22:52:59 +0000
treeherdermozilla-inbound@6e0a245b7492 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs1207437
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1207437 (part 1) - Don't recompute Windows feature levels. r=dvander. This is valid because mFeatureLevels is set when gfxWindowsPlatform is initialized.
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -2489,39 +2489,30 @@ gfxWindowsPlatform::CreateD3D11DecoderDe
   decltype(D3D11CreateDevice)* d3d11CreateDevice = (decltype(D3D11CreateDevice)*)
     GetProcAddress(d3d11Module, "D3D11CreateDevice");
 
    if (!d3d11CreateDevice) {
     // We should just be on Windows Vista or XP in this case.
     return nullptr;
   }
 
-  nsTArray<D3D_FEATURE_LEVEL> featureLevels;
-  if (IsWin8OrLater()) {
-    featureLevels.AppendElement(D3D_FEATURE_LEVEL_11_1);
-  }
-  featureLevels.AppendElement(D3D_FEATURE_LEVEL_11_0);
-  featureLevels.AppendElement(D3D_FEATURE_LEVEL_10_1);
-  featureLevels.AppendElement(D3D_FEATURE_LEVEL_10_0);
-  featureLevels.AppendElement(D3D_FEATURE_LEVEL_9_3);
-
   RefPtr<IDXGIAdapter1> adapter = GetDXGIAdapter();
 
   if (!adapter) {
     return nullptr;
   }
 
   HRESULT hr = E_INVALIDARG;
 
   RefPtr<ID3D11Device> device;
 
   MOZ_SEH_TRY{
     hr = d3d11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr,
                            D3D11_CREATE_DEVICE_VIDEO_SUPPORT,
-                           featureLevels.Elements(), featureLevels.Length(),
+                           mFeatureLevels.Elements(), mFeatureLevels.Length(),
                            D3D11_SDK_VERSION, byRef(device), nullptr, nullptr);
   } MOZ_SEH_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
     return nullptr;
   }
 
   if (FAILED(hr) || !DoesD3D11DeviceWork()) {
     return nullptr;
   }