Skip to content

Commit

Permalink
Bug 1316524 - Use 'media.wmf.skip-blacklist' to set some gfxVars - r=…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
squelart committed Nov 11, 2016
1 parent ccdf2bd commit 0fdbfe4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 2 additions & 3 deletions dom/media/platforms/wmf/WMFVideoMFTManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down
9 changes: 7 additions & 2 deletions gfx/thebes/gfxPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0fdbfe4

Please sign in to comment.