Bug 904890 - Part 4: Enable hardware accelerated video decoding for OMTC+D3D9/11. r=cpearce

This commit is contained in:
Matt Woodrow 2014-04-07 15:17:41 +12:00
parent e205c4c136
commit 1decbcaebc
3 changed files with 7 additions and 4 deletions

View File

@ -145,7 +145,7 @@ MP4Reader::InitLayersBackendType()
nsContentUtils::LayerManagerForDocument(element->OwnerDoc()); nsContentUtils::LayerManagerForDocument(element->OwnerDoc());
NS_ENSURE_TRUE_VOID(layerManager); NS_ENSURE_TRUE_VOID(layerManager);
mLayersBackendType = layerManager->GetBackendType(); mLayersBackendType = layerManager->GetCompositorBackendType();
} }
nsresult nsresult

View File

@ -69,7 +69,8 @@ WMFVideoOutputSource::InitializeDXVA()
// to a halt, and makes playback performance *worse*. // to a halt, and makes playback performance *worse*.
if (!mDXVAEnabled || if (!mDXVAEnabled ||
(mLayersBackend != LayersBackend::LAYERS_D3D9 && (mLayersBackend != LayersBackend::LAYERS_D3D9 &&
mLayersBackend != LayersBackend::LAYERS_D3D10)) { mLayersBackend != LayersBackend::LAYERS_D3D10 &&
mLayersBackend != LayersBackend::LAYERS_D3D11)) {
return false; return false;
} }

View File

@ -103,8 +103,10 @@ WMFReader::InitializeDXVA()
nsContentUtils::LayerManagerForDocument(element->OwnerDoc()); nsContentUtils::LayerManagerForDocument(element->OwnerDoc());
NS_ENSURE_TRUE(layerManager, false); NS_ENSURE_TRUE(layerManager, false);
if (layerManager->GetBackendType() != LayersBackend::LAYERS_D3D9 && LayersBackend backend = layerManager->GetCompositorBackendType();
layerManager->GetBackendType() != LayersBackend::LAYERS_D3D10) { if (backend != LayersBackend::LAYERS_D3D9 &&
backend != LayersBackend::LAYERS_D3D10 &&
backend != LayersBackend::LAYERS_D3D11) {
return false; return false;
} }