mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 1107299: Only block shared surface usage when that is broken. r=jrmuizel
Currently when the usage of surface sharing is broken on certain drivers, be block D3D11 entirely and fall back to Basic composition. There's no real benefit in this case from disabling D3D11 entirely, and we might as well just use it with software composition like we do when we don't have Direct2D, and in addition to that disable texture sharing for webGL, falling back to slow WebGL which again is no worse than the situation when using Basic or D3D9 composition.
This commit is contained in:
parent
184e84297b
commit
76753982e0
@ -21,6 +21,7 @@
|
||||
|
||||
#ifdef XP_WIN
|
||||
#include "SharedSurfaceANGLE.h" // for SurfaceFactory_ANGLEShareHandle
|
||||
#include "gfxWindowsPlatform.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
@ -110,7 +111,7 @@ ClientCanvasLayer::Initialize(const Data& aData)
|
||||
case mozilla::layers::LayersBackend::LAYERS_D3D10:
|
||||
case mozilla::layers::LayersBackend::LAYERS_D3D11: {
|
||||
#ifdef XP_WIN
|
||||
if (mGLContext->IsANGLE()) {
|
||||
if (mGLContext->IsANGLE() && DoesD3D11DeviceWork(gfxWindowsPlatform::GetPlatform()->GetD3D11Device())) {
|
||||
factory = SurfaceFactory_ANGLEShareHandle::Create(mGLContext, caps);
|
||||
}
|
||||
#endif
|
||||
|
@ -6773,20 +6773,11 @@ nsWindow::GetPreferredCompositorBackends(nsTArray<LayersBackend>& aHints)
|
||||
}
|
||||
|
||||
ID3D11Device* device = gfxWindowsPlatform::GetPlatform()->GetD3D11Device();
|
||||
if (device &&
|
||||
device->GetFeatureLevel() >= D3D_FEATURE_LEVEL_10_0 &&
|
||||
!DoesD3D11DeviceWork(device)) {
|
||||
// bug 1083071 - bad things - fall back to basic layers
|
||||
// This should not happen aside from driver bugs, and in particular
|
||||
// should not happen on our test machines, so let's NS_ERROR to ensure
|
||||
// that we would catch it as a test failure.
|
||||
NS_ERROR("Can't use Direct3D 11 because of a driver bug");
|
||||
} else {
|
||||
if (!prefs.mPreferD3D9) {
|
||||
aHints.AppendElement(LayersBackend::LAYERS_D3D11);
|
||||
}
|
||||
aHints.AppendElement(LayersBackend::LAYERS_D3D9);
|
||||
|
||||
if (!prefs.mPreferD3D9) {
|
||||
aHints.AppendElement(LayersBackend::LAYERS_D3D11);
|
||||
}
|
||||
aHints.AppendElement(LayersBackend::LAYERS_D3D9);
|
||||
}
|
||||
aHints.AppendElement(LayersBackend::LAYERS_BASIC);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user