When an XWayland view is fullscreen, rapid video changes produce visual glitches / artifacts.
I first discovered this behavior on firefox playing a fullscreen youtube video, but I was able to reproduce with mpv (meaning this issue is not exclusive to Firefox) with the following command:
$ mpv --vo=xv <video_file>
The result can be seen here (uploaded as a zip because mp4 isn't allowed, and recorded with a camera because grim didn't capture the glitch effect):
Running a session with that command gave me the following log:
sway_log.txt
The glitch does not happen when the view is not fullscreen, or when using an mpv video output that does not use XWayland.
Ouptut of swaymsg -t get_version:
sway version 1.2-a4e4e21e (Jan 14 2020, branch 'master')
Please let me know if any more info is needed.
Does this same issue happen on Weston, or any other (non-wlroots) wayland compositor? Does this issue happen when running on X11 itself?
My hunch is that this issue is not related to something that sway/wlroots is doing. I'd expect any of our rendering code breakages to be much more severe.
The issue doesn't happen running on X11 (i3 without compton) but does happen with weston, so you're right, it's not a sway/wlroots issue.
This should be fixed on xwayland master, the buffer raced between xwayland and the compositor, which is more obvious in fullscreens, since the compositor is bypassed and the buffer is directly shown on the screen.
Most helpful comment
This should be fixed on xwayland master, the buffer raced between xwayland and the compositor, which is more obvious in fullscreens, since the compositor is bypassed and the buffer is directly shown on the screen.