Closed Bug 1587008 Opened 5 years ago Closed 5 years ago

[Wayland/GL] Visual glitches with gl compositor during window resize

Categories

(Core :: Widget: Gtk, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox70 --- wontfix
firefox71 --- fixed

People

(Reporter: stransky, Assigned: stransky)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files, 1 obsolete file)

When Gl compositor / WebRender is enabled, Firefox window resize is not very smooth, window is flickering/jumping.

Priority: -- → P2

I see the same artifacts with resizing chrome browser on XWayland, which doesn't look much as wayland/firefox specific issue.

Summary: [Wayland/GL] Window resize looks weird on Webrender/gl compositor → [Wayland/GL] Visual glitches during window resize with gl compositor
Summary: [Wayland/GL] Visual glitches during window resize with gl compositor → [Wayland/GL] Visual glitches with gl compositor during window resize

Recently we update egl_window size only in moz_container_size_allocate() which is leads
to visible visual glitches as moz_container_size_allocate() is not called during window resize but
after it.

We need to update egl_window size faster which is done in configure-event callback.

Assignee: nobody → stransky

We may need to backport this to FF 70.

The fix here is incomplete - does not work with e10s enabled.

This looks like a race condition between glSwapBuffers() and wl_egl_window_resize(). glSwapBuffers() sets wl_surface and wl_buffer position for a egl_window/GdkWindow at dri2_wl_swap_buffers_with_damage() at MESA and If we call dri2_wl_swap_buffers_with_damage()/glSwapBuffers() with old wl_egl_window_resize() values then old offset/position values are used and we see the egl_window jumping around.

Attachment #9099535 - Attachment is obsolete: true

wl_egl_window size must exactly march GL rendering pipeline setting.

Compositor and widget can have different window sizes during window resize when widget
is resized faster than layout can render. Firefox window is rendered misplaced then
and it's "jumping" as layout size is behind toolkit size.

We can't set wl_egl_window from widget code as it must match GL rendering pipeline,
so let compositor to set the egl window size.

Depends on D49136

Pushed by dluca@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/afc6499c8f1f
[Wayland] Set EGL window size at CompositorOGL::BeginFrame, r=sotaro
https://hg.mozilla.org/integration/autoland/rev/9e610c4628e1
[Wayland] Get wl_egl_window size from compositor by nsWindow::SetEGLNativeWindowSize, r=jhorak

Keywords: checkin-needed

Updated, Thanks.

Flags: needinfo?(stransky)
Keywords: checkin-needed

Pushed by rmaries@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5781505ae8f5
[Wayland] Set EGL window size at CompositorOGL::BeginFrame, r=sotaro
https://hg.mozilla.org/integration/autoland/rev/cb34ab7100d3
[Wayland] Get wl_egl_window size from compositor by nsWindow::SetEGLNativeWindowSize, r=jhorak

Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Regressions: 1589114
Regressions: 1591800
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: