Bug 1316524 - Use 'media.wmf.skip-blacklist' to set some gfxVars - r?mattwoodrow
Reversing
bug 1313343, as MediaPrefs are not available from the UI process.
Instead media.wmf.skip-blacklist is used when setting D3D-blacklisting gfxVars,
leaving them empty if we want to skip these blacklists.
MozReview-Commit-ID: JYED4ovC0jq
--- a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp
+++ b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp
@@ -13,17 +13,16 @@
#include "ImageContainer.h"
#include "VideoUtils.h"
#include "DXVA2Manager.h"
#include "nsThreadUtils.h"
#include "Layers.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/layers/LayersTypes.h"
#include "MediaInfo.h"
-#include "MediaPrefs.h"
#include "mozilla/Logging.h"
#include "nsWindowsHelpers.h"
#include "gfx2DGlue.h"
#include "gfxWindowsPlatform.h"
#include "IMFYCbCrImage.h"
#include "mozilla/WindowsVersion.h"
#include "mozilla/Telemetry.h"
#include "nsPrintfCString.h"
@@ -176,18 +175,18 @@ FindDXVABlacklistedDLL(StaticAutoPtr<D3D
if (!aDLLBlacklistingCache) {
// First time here, create persistent data that will be reused in all
// D3D11-blacklisting checks.
aDLLBlacklistingCache = new D3DDLLBlacklistingCache();
ClearOnShutdown(&aDLLBlacklistingCache);
}
- if (aBlacklist.IsEmpty() || MediaPrefs::PDMWMFSkipBlacklist()) {
- // Empty blacklist, or "media.wmf.skip-blacklist"=true -> No blacklisting.
+ if (aBlacklist.IsEmpty()) {
+ // Empty blacklist -> No blacklisting.
aDLLBlacklistingCache->mBlacklistPref.SetLength(0);
aDLLBlacklistingCache->mBlacklistedDLL.SetLength(0);
return aDLLBlacklistingCache->mBlacklistedDLL;
}
// Detect changes in pref.
if (aDLLBlacklistingCache->mBlacklistPref.Equals(aBlacklist)) {
// Same blacklist -> Return same result (i.e., don't check DLLs again).
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -612,18 +612,23 @@ gfxPlatform::Init()
MediaPrefs::GetSingleton();
gfxVars::Initialize();
gfxConfig::Init();
if (XRE_IsParentProcess()) {
GPUProcessManager::Initialize();
- gfxVars::SetPDMWMFDisableD3D11Dlls(Preferences::GetCString("media.wmf.disable-d3d11-for-dlls"));
- gfxVars::SetPDMWMFDisableD3D9Dlls(Preferences::GetCString("media.wmf.disable-d3d9-for-dlls"));
+ if (Preferences::GetBool("media.wmf.skip-blacklist")) {
+ gfxVars::SetPDMWMFDisableD3D11Dlls(nsCString());
+ gfxVars::SetPDMWMFDisableD3D9Dlls(nsCString());
+ } else {
+ gfxVars::SetPDMWMFDisableD3D11Dlls(Preferences::GetCString("media.wmf.disable-d3d11-for-dlls"));
+ gfxVars::SetPDMWMFDisableD3D9Dlls(Preferences::GetCString("media.wmf.disable-d3d9-for-dlls"));
+ }
}
// Drop a note in the crash report if we end up forcing an option that could
// destabilize things. New items should be appended at the end (of an existing
// or in a new section), so that we don't have to know the version to interpret
// these cryptic strings.
{
nsAutoCString forcedPrefs;