From 6f7c25cafdfb2827a1ab363180892c8ed31dcf38 Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Thu, 15 Sep 2016 16:34:14 +0200 Subject: [PATCH] Backed out changeset 36f0861336b6 (bug 1288618) --- dom/media/platforms/wmf/DXVA2Manager.cpp | 14 ++------------ dom/media/platforms/wmf/WMFDecoderModule.cpp | 5 +---- dom/media/platforms/wmf/WMFVideoMFTManager.cpp | 15 ++------------- 3 files changed, 5 insertions(+), 29 deletions(-) diff --git a/dom/media/platforms/wmf/DXVA2Manager.cpp b/dom/media/platforms/wmf/DXVA2Manager.cpp index ea51eeb862ed..7fb37690d256 100644 --- a/dom/media/platforms/wmf/DXVA2Manager.cpp +++ b/dom/media/platforms/wmf/DXVA2Manager.cpp @@ -494,12 +494,7 @@ DXVA2Manager::CreateD3D9DXVA(nsACString& aFailureReason) // DXVA processing takes up a lot of GPU resources, so limit the number of // videos we use DXVA with at any one time. - uint32_t dxvaLimit = 4; - // TODO: Sync this value across to the GPU process. - if (XRE_GetProcessType() != GeckoProcessType_GPU) { - dxvaLimit = MediaPrefs::PDMWMFMaxDXVAVideos(); - } - + const uint32_t dxvaLimit = MediaPrefs::PDMWMFMaxDXVAVideos(); if (sDXVAVideosCount == dxvaLimit) { aFailureReason.AssignLiteral("Too many DXVA videos playing"); return nullptr; @@ -907,12 +902,7 @@ DXVA2Manager::CreateD3D11DXVA(nsACString& aFailureReason) { // DXVA processing takes up a lot of GPU resources, so limit the number of // videos we use DXVA with at any one time. - uint32_t dxvaLimit = 4; - // TODO: Sync this value across to the GPU process. - if (XRE_GetProcessType() != GeckoProcessType_GPU) { - dxvaLimit = MediaPrefs::PDMWMFMaxDXVAVideos(); - } - + const uint32_t dxvaLimit = MediaPrefs::PDMWMFMaxDXVAVideos(); if (sDXVAVideosCount == dxvaLimit) { aFailureReason.AssignLiteral("Too many DXVA videos playing"); return nullptr; diff --git a/dom/media/platforms/wmf/WMFDecoderModule.cpp b/dom/media/platforms/wmf/WMFDecoderModule.cpp index 7cf787f4cf3a..61296fd18ff4 100644 --- a/dom/media/platforms/wmf/WMFDecoderModule.cpp +++ b/dom/media/platforms/wmf/WMFDecoderModule.cpp @@ -61,10 +61,7 @@ WMFDecoderModule::GetNumDecoderThreads() // If we have more than 4 cores, let the decoder decide how many threads. // On an 8 core machine, WMF chooses 4 decoder threads const int WMF_DECODER_DEFAULT = -1; - int32_t prefThreadCount = WMF_DECODER_DEFAULT; - if (XRE_GetProcessType() != GeckoProcessType_GPU) { - prefThreadCount = MediaPrefs::PDMWMFThreadCount(); - } + int32_t prefThreadCount = MediaPrefs::PDMWMFThreadCount(); if (prefThreadCount != WMF_DECODER_DEFAULT) { return std::max(prefThreadCount, 1); } else if (numCores > 4) { diff --git a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp index 202068655236..0e2a9b5a19f9 100644 --- a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp +++ b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp @@ -180,14 +180,6 @@ FindDXVABlacklistedDLL(StaticAutoPtr& aDLLBlacklistingC ClearOnShutdown(&aDLLBlacklistingCache); } - if (XRE_GetProcessType() == GeckoProcessType_GPU) { - // The blacklist code doesn't support running in - // the GPU process yet. - aDLLBlacklistingCache->mBlacklistPref.SetLength(0); - aDLLBlacklistingCache->mBlacklistedDLL.SetLength(0); - return aDLLBlacklistingCache->mBlacklistedDLL; - } - nsAdoptingCString blacklist = Preferences::GetCString(aDLLBlacklistPrefName); if (blacklist.IsEmpty()) { // Empty blacklist -> No blacklisting. @@ -312,10 +304,8 @@ public: NS_ASSERTION(NS_IsMainThread(), "Must be on main thread."); nsACString* failureReason = &mFailureReason; nsCString secondFailureReason; - bool allowD3D11 = (XRE_GetProcessType() == GeckoProcessType_GPU) || - MediaPrefs::PDMWMFAllowD3D11(); if (mBackend == LayersBackend::LAYERS_D3D11 && - allowD3D11 && IsWin8OrLater()) { + MediaPrefs::PDMWMFAllowD3D11() && IsWin8OrLater()) { const nsCString& blacklistedDLL = FindD3D11BlacklistedDLL(); if (!blacklistedDLL.IsEmpty()) { failureReason->AppendPrintf("D3D11 blacklisted with DLL %s", @@ -441,8 +431,7 @@ WMFVideoMFTManager::InitInternal(bool aForceD3D9) attr->GetUINT32(MF_SA_D3D_AWARE, &aware); attr->SetUINT32(CODECAPI_AVDecNumWorkerThreads, WMFDecoderModule::GetNumDecoderThreads()); - if ((XRE_GetProcessType() != GeckoProcessType_GPU) && - MediaPrefs::PDMWMFLowLatencyEnabled()) { + if (MediaPrefs::PDMWMFLowLatencyEnabled()) { hr = attr->SetUINT32(CODECAPI_AVLowLatencyMode, TRUE); if (SUCCEEDED(hr)) { LOG("Enabling Low Latency Mode");