зеркало из https://github.com/mozilla/gecko-dev.git
Move more compositor backend checks into gfxPlatform. (bug 1179051 part 4, r=mattwoodrow)
--HG-- extra : rebase_source : 887ed513fc50f2c1ee560ffa4a795b5c847154fe
This commit is contained in:
Родитель
65475c97d0
Коммит
ba1e3c52d9
|
@ -135,10 +135,7 @@ CompositorD3D11::Initialize()
|
|||
|
||||
ScopedGfxFeatureReporter reporter("D3D11 Layers", force);
|
||||
|
||||
if (!gfxPlatform::CanUseDirect3D11()) {
|
||||
NS_WARNING("Direct3D 11-accelerated layers are not supported on this system.");
|
||||
return false;
|
||||
}
|
||||
MOZ_ASSERT(gfxPlatform::CanUseDirect3D11());
|
||||
|
||||
HRESULT hr;
|
||||
|
||||
|
|
|
@ -45,10 +45,7 @@ CompositorD3D9::Initialize()
|
|||
|
||||
ScopedGfxFeatureReporter reporter("D3D9 Layers", force);
|
||||
|
||||
if (!gfxPlatform::CanUseDirect3D9()) {
|
||||
NS_WARNING("Direct3D 9-accelerated layers are not supported on this system.");
|
||||
return false;
|
||||
}
|
||||
MOZ_ASSERT(gfxPlatform::CanUseDirect3D9());
|
||||
|
||||
mDeviceManager = gfxWindowsPlatform::GetPlatform()->GetD3D9DeviceManager();
|
||||
if (!mDeviceManager) {
|
||||
|
|
|
@ -2393,11 +2393,19 @@ gfxWindowsPlatform::GetAcceleratedCompositorBackends(nsTArray<LayersBackend>& aB
|
|||
}
|
||||
|
||||
if (!gfxPrefs::LayersPreferD3D9()) {
|
||||
aBackends.AppendElement(LayersBackend::LAYERS_D3D11);
|
||||
if (gfxPlatform::CanUseDirect3D11() && GetD3D11Device()) {
|
||||
aBackends.AppendElement(LayersBackend::LAYERS_D3D11);
|
||||
} else {
|
||||
NS_WARNING("Direct3D 11-accelerated layers are not supported on this system.");
|
||||
}
|
||||
}
|
||||
|
||||
if (gfxPrefs::LayersPreferD3D9() || !IsVistaOrLater()) {
|
||||
// We don't want D3D9 except on Windows XP
|
||||
aBackends.AppendElement(LayersBackend::LAYERS_D3D9);
|
||||
if (gfxPlatform::CanUseDirect3D9()) {
|
||||
aBackends.AppendElement(LayersBackend::LAYERS_D3D9);
|
||||
} else {
|
||||
NS_WARNING("Direct3D 9-accelerated layers are not supported on this system.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче