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 0f7a4e903d
commit f8dbec9152
3 changed files with 7 additions and 4 deletions

View File

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

View File

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

View File

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