Closed Bug 1574036 Opened 6 years ago Closed 6 years ago

[Wayland] Entire window flickers when resizing, showing underlying desktop

Categories

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

71 Branch
Desktop
Linux
defect

Tracking

()

VERIFIED FIXED
mozilla70
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox68 --- unaffected
firefox69 --- wontfix
firefox70 --- verified

People

(Reporter: nagisa, Assigned: stransky)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression, reproducible)

Attachments

(4 files, 1 obsolete file)

Attached video Recording of flickering

Resizing a Firefox window running in Wayland mode (under sway) makes the window flicker as Firefox redraws the window for the new size.

Blocks: wayland

It seems that I’m bad at encoding videos for browsers to use. Please download the video and use a more featured player than Firefox to watch it.

Easier to reproduce with the Basic compositor but it can still happen with OpenGL/WebRender (tested with Ubuntu 19.04).

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=9c8180108cfa432f24743410e25d3b35d07b8584&tochange=82dedcf5872c0df663393a190c1179f1346d2e23

Regressed by Bug 1555899.

Has Regression Range: --- → yes
Component: Graphics → Widget: Gtk
Regressed by: 1555899
Summary: Resizing a window in Wayland flickers → [Wayland] Entire window flickers when resizing, showing underlying desktop

Hi Martin, is this something we need to fix for Fx69? We're building the RC next week.

Flags: needinfo?(stransky)

(In reply to Ryan VanderMeulen [:RyanVM] from comment #3)

Hi Martin, is this something we need to fix for Fx69? We're building the RC next week.

Hi Ryan, I don't have a fix for that right now.
Thanks.

Flags: needinfo?(stransky)

Simonas, can you please try to upload the video again? Thanks.

Flags: needinfo?(simonas+bugzilla.mozilla.org)

I think I can reproduce it now, Thanks.

Flags: needinfo?(simonas+bugzilla.mozilla.org)
Assignee: nobody → stransky
Priority: -- → P2

If that happens with WebRender/GL compositor it's completely different bug - Bug 1555899 was in basic compositor only.

Looks like the bug happens when window is shrunk and e10s content is rendered. It's less visible/frequent on in-content pages like about:config.

Martin, to see the video please watch it locally on a player like mpv.

Recently window resize on Wayland produces flickering/rendering artifacts because
window background is randomly cleared due to actual window size changes.
We recently query widget size and do clear/fullscreen update when the size changes.

To avoid that, get widget size once at WindowSurfaceWayland::Lock() and use it
until next WindowSurfaceWayland::Lock(). Also don't to switch wayland back buffers
until there's really fullscreen update from compositor.

This patch:

  • Use mLockedScreenRect to store window size at WindowSurfaceWayland::Lock(). It's used
    to detect widget resize, when it happens throw away all cached painting and wait for
    full screen update.

  • Use mBufferScreenRect to store size of wayland back buffer and pass it
    instead of actual widget size we used before this patch. This ensures all our
    drawing matches the buffer size.

  • Rename aFullScreenUpdate to aCanSwitchBuffer at LockWaylandBuffer() to stress
    actual meaning - we can/can't switch back buffers for partial drawing and we need to
    wait until recent back buffer is released by compositor.

Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e351a8f6c71e
[Wayland] Fix flickering during window resize, r=jhorak

Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70

I can still manage to reproduce this issue in Firefox 71. I've attached a video showing the behaviour I am seeing

Attached video Flickering when resizing (obsolete) —

Still reproducible indeed. Attaching a video where this is significantly more prominent.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Version: 70 Branch → 71 Branch
Attachment #9097250 - Attachment is obsolete: true

This patch fixed it for me on Ubuntu 19.04 and it is still fixed. Please file a new bug if you are still seeing it on Sway.

Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Regressions: 1589611
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: