mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Move more compositor backend checks into gfxPlatform. (bug 1179051 part 4, r=mattwoodrow)
This commit is contained in:
parent
a95f1bd843
commit
2d6d81d452
@ -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.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user