Backed out changeset 36f0861336b6 (bug 1288618)

This commit is contained in:
Carsten "Tomcat" Book 2016-09-15 16:34:14 +02:00
Родитель 7c52462ae3
Коммит 6f7c25cafd
3 изменённых файлов: 5 добавлений и 29 удалений

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

@ -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;

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

@ -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) {

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

@ -180,14 +180,6 @@ FindDXVABlacklistedDLL(StaticAutoPtr<D3DDLLBlacklistingCache>& 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");