mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-15 06:20:41 +00:00
Bug 785597 - Don't create a LayerManager for a content window of an invisible top-level window. r=snorp
This commit is contained in:
parent
df745970bc
commit
dc90835f04
@ -229,6 +229,10 @@ nsWindow::Create(nsIWidget *aParent,
|
||||
mParent = parent;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_ANDROID_WIDGET
|
||||
DumpWindows();
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -250,6 +254,10 @@ nsWindow::Destroy(void)
|
||||
|
||||
nsBaseWidget::OnDestroy();
|
||||
|
||||
#ifdef DEBUG_ANDROID_WIDGET
|
||||
DumpWindows();
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -677,12 +685,10 @@ nsWindow::GetLayerManager(PLayersChild*, LayersBackend, LayerManagerPersistence,
|
||||
return mLayerManager;
|
||||
}
|
||||
|
||||
nsWindow *topWindow = TopWindow();
|
||||
|
||||
if (!topWindow) {
|
||||
printf_stderr(" -- no topwindow\n");
|
||||
mLayerManager = CreateBasicLayerManager();
|
||||
return mLayerManager;
|
||||
nsWindow *topLevelWindow = FindTopLevel();
|
||||
if (!topLevelWindow || topLevelWindow->mWindowType == eWindowType_invisible) {
|
||||
// don't create a layer manager for an invisible top-level window
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
mUseLayersAcceleration = ComputeShouldAccelerate(mUseLayersAcceleration);
|
||||
|
Loading…
x
Reference in New Issue
Block a user