зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1603927 - Do not try to pause compositor when nsWindow is destroyed r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D57197 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
4daf948695
Коммит
f03139d167
|
@ -4436,23 +4436,25 @@ void nsWindow::HideWaylandWindow() {
|
|||
g_list_delete_link(gVisibleWaylandPopupWindows, foundWindow);
|
||||
}
|
||||
}
|
||||
if (mContainer && moz_container_has_wl_egl_window(mContainer)) {
|
||||
// Because wl_egl_window is destroyed on moz_container_unmap(),
|
||||
// the current compositor cannot use it anymore. To avoid crash,
|
||||
// pause the compositor and destroy EGLSurface & resume the compositor
|
||||
// and re-create EGLSurface on next expose event.
|
||||
MOZ_ASSERT(GetRemoteRenderer());
|
||||
if (CompositorBridgeChild* remoteRenderer = GetRemoteRenderer()) {
|
||||
// XXX slow sync IPC
|
||||
remoteRenderer->SendPause();
|
||||
// Re-request initial draw callback
|
||||
RefPtr<nsWindow> self(this);
|
||||
moz_container_add_initial_draw_callback(mContainer, [self]() -> void {
|
||||
self->mNeedsCompositorResume = true;
|
||||
self->MaybeResumeCompositor();
|
||||
});
|
||||
} else {
|
||||
DestroyLayerManager();
|
||||
if (!mIsDestroyed) {
|
||||
if (mContainer && moz_container_has_wl_egl_window(mContainer)) {
|
||||
// Because wl_egl_window is destroyed on moz_container_unmap(),
|
||||
// the current compositor cannot use it anymore. To avoid crash,
|
||||
// pause the compositor and destroy EGLSurface & resume the compositor
|
||||
// and re-create EGLSurface on next expose event.
|
||||
MOZ_ASSERT(GetRemoteRenderer());
|
||||
if (CompositorBridgeChild* remoteRenderer = GetRemoteRenderer()) {
|
||||
// XXX slow sync IPC
|
||||
remoteRenderer->SendPause();
|
||||
// Re-request initial draw callback
|
||||
RefPtr<nsWindow> self(this);
|
||||
moz_container_add_initial_draw_callback(mContainer, [self]() -> void {
|
||||
self->mNeedsCompositorResume = true;
|
||||
self->MaybeResumeCompositor();
|
||||
});
|
||||
} else {
|
||||
DestroyLayerManager();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче