Bug 1163454 - Disable D3D11 DXVA for causing performance regressions. r=ajones
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 16 Jun 2015 18:21:12 -0400
changeset 249196 c80271e9f1c2e44905a72214800da01590f369c8
parent 249195 0e80ea29712052a89bf0296dc3bd4bdd43d1d5c6
child 249197 a53b5cee6b6f89f5c987b00060ab76f47614da08
push id61167
push usermwoodrow@mozilla.com
push dateTue, 16 Jun 2015 22:21:25 +0000
treeherdermozilla-inbound@c80271e9f1c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersajones
bugs1163454
milestone41.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 1163454 - Disable D3D11 DXVA for causing performance regressions. r=ajones
dom/media/platforms/wmf/WMFVideoMFTManager.cpp
--- a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp
+++ b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp
@@ -15,16 +15,17 @@
 #include "Layers.h"
 #include "mozilla/layers/LayersTypes.h"
 #include "MediaInfo.h"
 #include "mozilla/Logging.h"
 #include "gfx2DGlue.h"
 #include "gfxWindowsPlatform.h"
 #include "IMFYCbCrImage.h"
 #include "mozilla/WindowsVersion.h"
+#include "mozilla/Preferences.h"
 
 PRLogModuleInfo* GetDemuxerLog();
 #define LOG(...) MOZ_LOG(GetDemuxerLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
 
 using mozilla::layers::Image;
 using mozilla::layers::IMFYCbCrImage;
 using mozilla::layers::LayerManager;
 using mozilla::layers::LayersBackend;
@@ -126,16 +127,17 @@ class CreateDXVAManagerEvent : public ns
 public:
   CreateDXVAManagerEvent(LayersBackend aBackend)
     : mBackend(aBackend)
   {}
 
   NS_IMETHOD Run() {
     NS_ASSERTION(NS_IsMainThread(), "Must be on main thread.");
     if (mBackend == LayersBackend::LAYERS_D3D11 &&
+        Preference::GetBool("media.windows-media-foundation.allow-d3d11-dxva", false) &&
         IsWin8OrLater()) {
       mDXVA2Manager = DXVA2Manager::CreateD3D11DXVA();
     } else {
       mDXVA2Manager = DXVA2Manager::CreateD3D9DXVA();
     }
     return NS_OK;
   }
   nsAutoPtr<DXVA2Manager> mDXVA2Manager;