Bug 1885831 [Wayland] Skip EGL window size changes and disable rendering of it if compositor is paused after scale change r=emilio

Skip rendering of EGL window right after scale changes. MESA backend contains old back / front buffers and we need to recreate them for new scale at ResumeCompositorFlickering().

Differential Revision: https://phabricator.services.mozilla.com/D206757
This commit is contained in:
stransky 2024-04-08 09:16:40 +00:00
parent b163c31113
commit d4d76448d2

View file

@ -6580,8 +6580,8 @@ void nsWindow::PauseCompositorFlickering() {
CompositorBridgeChild* remoteRenderer = GetRemoteRenderer();
if (remoteRenderer) {
remoteRenderer->SendPause();
mCompositorState = COMPOSITOR_PAUSED_FLICKERING;
remoteRenderer->SendPause();
mCompositorPauseTimeoutID = (int)g_timeout_add(
COMPOSITOR_PAUSE_TIMEOUT,
[](void* data) -> gint {
@ -9970,6 +9970,12 @@ bool nsWindow::SetEGLNativeWindowSize(
return true;
}
if (mCompositorState == COMPOSITOR_PAUSED_FLICKERING) {
LOG("nsWindow::SetEGLNativeWindowSize() return, "
"COMPOSITOR_PAUSED_FLICKERING is set");
return false;
}
gint scale = GdkCeiledScaleFactor();
# ifdef MOZ_LOGGING
if (LOG_ENABLED()) {