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

--HG--
extra : rebase_source : 087230ba95927ced52d7af502b96a988b4077c31
This commit is contained in:
Gerald Squelart 2016-11-11 11:25:52 +11:00
Родитель 5b79aa5855
Коммит adda9b7a03
2 изменённых файлов: 9 добавлений и 5 удалений

Просмотреть файл

@ -18,7 +18,6 @@
#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"
@ -181,8 +180,8 @@ FindDXVABlacklistedDLL(StaticAutoPtr<D3DDLLBlacklistingCache>& aDLLBlacklistingC
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;

Просмотреть файл

@ -617,8 +617,13 @@ gfxPlatform::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