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)) { if (mContainer && moz_container_has_wl_egl_window(mContainer)) {
// Because wl_egl_window is destroyed on moz_container_unmap(), // Because wl_egl_window is destroyed on moz_container_unmap(),
// the current compositor cannot use it anymore. To avoid crash, // the current compositor cannot use it anymore. To avoid crash,
// destroy the compositor & recreate a new compositor on next // destroy the compositor & recreate a new compositor with paused state.
// expose event. // Compositor restart composite on next initial_draw_callback.
DestroyLayerManager(); mCompositorInitiallyPaused = true;
GPUProcessManager::Get()->ResetCompositors();
} }
#endif #endif
gtk_widget_hide(mShell); gtk_widget_hide(mShell);