Bug 1150376: Do not try to use D3D11 for popup windows. r=jrmuizel

This commit is contained in:
Bas Schouten 2015-04-08 15:08:34 +02:00
parent 1e6cdad33c
commit b1178313ff
2 changed files with 12 additions and 1 deletions

View File

@ -6553,6 +6553,12 @@ nsWindow::ClearCompositor(nsWindow* aWindow)
aWindow->DestroyLayerManager();
}
bool
nsWindow::IsPopup()
{
return mWindowType == eWindowType_popup;
}
bool
nsWindow::ShouldUseOffMainThreadCompositing()
{
@ -6576,7 +6582,11 @@ nsWindow::GetPreferredCompositorBackends(nsTArray<LayersBackend>& aHints)
// transparent windows so don't even try. I'm also not sure if we even
// want to support this case. See bug 593471
if (!(prefs.mDisableAcceleration ||
mTransparencyMode == eTransparencyTransparent)) {
mTransparencyMode == eTransparencyTransparent ||
IsPopup())) {
// See bug 1150376, D3D11 composition can cause issues on some devices
// on windows 7 where presentation fails randomly for windows with drop
// shadows.
if (prefs.mPreferOpenGL) {
aHints.AppendElement(LayersBackend::LAYERS_OPENGL);
}

View File

@ -280,6 +280,7 @@ public:
virtual void GetPreferredCompositorBackends(nsTArray<mozilla::layers::LayersBackend>& aHints);
bool IsPopup();
virtual bool ShouldUseOffMainThreadCompositing();
protected: