Closed Bug 1509937 Opened 6 years ago Closed 6 years ago

[Wayland][OpenGL] GL subsurface is not glued perfectly to the GTK window, resize lag is visible

Categories

(Core :: Graphics, defect, P3)

Desktop
FreeBSD
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox65 --- affected

People

(Reporter: val, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When resizing a window on Wayland backend with GL accelerated compositing, the GL subsurface is not perfectly glued to the GTK parent surface, so when resizing it's easy to see a gap between the rendered Firefox content and the GTK border/shadow. It's even possible to let go of the resize at the right moment to keep the gap. (see screenshot)
Blocks: wayland
Removed the async repaint on resize patch https://bugzilla.mozilla.org/attachment.cgi?id=8963005 patch (from bug 1438144) from my build: the border is still not perfectly glued, now there's some glitches visible when resizing.
(oops, that's been software rendering mode. GL doesn't work without that patch.)
Can you please test when Bug 1511951 lands? I can't reproduce it with it.
Flags: needinfo?(greg)
I've been using that patch (and the previous suggested one too) already. I'll see if bug 1489902 instead of async repaint fixes it.
With sync repaint, it's different, but still not perfect. The gap is hidden when expanding the window (to the right), but even more visible than before when shrinking (to the left).
Flags: needinfo?(greg)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Which system do you run please?
Flags: needinfo?(greg)
(In reply to Martin Stránský [:stransky] from comment #6) > Which system do you run please? Radeon RX 480, HiDPI screen, FreeBSD 13-CURRENT / drm-4.16, Mesa 19.0.0-devel (a couple days old), Weston master, GTK 3.24.2, Firefox built on December 6 (right after bug 1511951 landed)
Flags: needinfo?(greg)
With WebRender (blank window fixed by attachment 9034351 [details] [diff] [review] from bug 1514156) it's worse than with GL compositing. The whole window content can partially go out of the visible surface vertically. Though one thing I noticed is that it's a bit better when the page is active, e.g. if it has a video playing. I recorded a video: https://unrelentingtech.s3.dualstack.eu-west-1.amazonaws.com/firefox-wl-wr-resize.webm
(In reply to greg from comment #8) > With WebRender (blank window fixed by attachment 9034351 [details] [diff] [review] > [review] from bug 1514156) it's worse than with GL compositing. The whole > window content can partially go out of the visible surface vertically. > Though one thing I noticed is that it's a bit better when the page is > active, e.g. if it has a video playing. > > I recorded a video: > https://unrelentingtech.s3.dualstack.eu-west-1.amazonaws.com/firefox-wl-wr- > resize.webm That's great - it would actually help to debug it.

Looks like this was a Mesa bug (solved by https://gitlab.freedesktop.org/mesa/mesa/merge_requests/252 "wayland/egl: Ensure EGL surface is resized on DRI update_buffers()") as suggested by ame in https://bugzilla.mozilla.org/show_bug.cgi?id=1508594#c12 — after updating mesa-git, seems like the synchronization is fine and the window never ends up in this weird offset state after letting go of resize!

What happens during resize is pretty choppy though, every frame is far from perfect™.

WebRender: https://unrelentingtech.s3.dualstack.eu-west-1.amazonaws.com/fx-newmesa-resize-wr.webm

Basic GL layers: https://unrelentingtech.s3.dualstack.eu-west-1.amazonaws.com/fx-newmesa-resize-gllayers.webm

But I guess this issue is solved.

Fixed on Ubuntu 19.04 by Mesa 19.0.2.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: