Bug 1584511 - Handle Compositor session recreation when egl_window is re-created r=stransky

Differential Revision: https://phabricator.services.mozilla.com/D49380

--HG--
extra : moz-landing-system : lando
This commit is contained in:
sotaro 2019-10-18 08:20:30 +00:00
Родитель b47aa06ec3
Коммит 26e474c3f9
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -4378,9 +4378,10 @@ void nsWindow::HideWaylandWindow() {
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,
// destroy the compositor & recreate a new compositor on next
// expose event.
DestroyLayerManager();
// destroy the compositor & recreate a new compositor with paused state.
// Compositor restart composite on next initial_draw_callback.
mCompositorInitiallyPaused = true;
GPUProcessManager::Get()->ResetCompositors();
}
#endif
gtk_widget_hide(mShell);