forked from mirrors/gecko-dev
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:
parent
b163c31113
commit
d4d76448d2
1 changed files with 7 additions and 1 deletions
|
|
@ -6580,8 +6580,8 @@ void nsWindow::PauseCompositorFlickering() {
|
||||||
|
|
||||||
CompositorBridgeChild* remoteRenderer = GetRemoteRenderer();
|
CompositorBridgeChild* remoteRenderer = GetRemoteRenderer();
|
||||||
if (remoteRenderer) {
|
if (remoteRenderer) {
|
||||||
remoteRenderer->SendPause();
|
|
||||||
mCompositorState = COMPOSITOR_PAUSED_FLICKERING;
|
mCompositorState = COMPOSITOR_PAUSED_FLICKERING;
|
||||||
|
remoteRenderer->SendPause();
|
||||||
mCompositorPauseTimeoutID = (int)g_timeout_add(
|
mCompositorPauseTimeoutID = (int)g_timeout_add(
|
||||||
COMPOSITOR_PAUSE_TIMEOUT,
|
COMPOSITOR_PAUSE_TIMEOUT,
|
||||||
[](void* data) -> gint {
|
[](void* data) -> gint {
|
||||||
|
|
@ -9970,6 +9970,12 @@ bool nsWindow::SetEGLNativeWindowSize(
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mCompositorState == COMPOSITOR_PAUSED_FLICKERING) {
|
||||||
|
LOG("nsWindow::SetEGLNativeWindowSize() return, "
|
||||||
|
"COMPOSITOR_PAUSED_FLICKERING is set");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
gint scale = GdkCeiledScaleFactor();
|
gint scale = GdkCeiledScaleFactor();
|
||||||
# ifdef MOZ_LOGGING
|
# ifdef MOZ_LOGGING
|
||||||
if (LOG_ENABLED()) {
|
if (LOG_ENABLED()) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue