Add multiple buffering to xwl_window
Xwayland takes care of not attaching a new buffer if a frame callback is pending.
Yet, the existing buffer (which was previously attached) may still be updated from the X11 side, causing unexpected visual glitches to the buffer.
Add multiple buffering to the xwl_window and alternate between buffers, to leave the Wayland buffer untouched between frame callbacks and avoid stuttering or tearing issues.
Closes: #835 (closed) Signed-off-by: Olivier Fourdan ofourdan@redhat.com
Merge request reports
Activity
added Xwayland label
mentioned in commit ofourdan/xserver@a710a79b
added 1 commit
- a710a79b - xwayland: Add its own buffer pixmap to xwl_window
- Resolved by Michel Dänzer
It would be better to alternate between two different buffers for sending to the Wayland server. Otherwise there can still be artifacts, in particular if the Wayland server uses direct scanout of the Xwayland buffer.
mentioned in commit ofourdan/xserver@1c61c929
added 2 commits
mentioned in commit ofourdan/xserver@a1e5c3fd
added 1 commit
- a1e5c3fd - xwayland: Add double buffering to xwl_window
mentioned in commit ofourdan/xserver@ce4465a8
- Resolved by Olivier Fourdan
Ah crap, no... it works but it's using the same pixmap's bo so the buffer is still subject to change from the X11 side.
I think this is where I fail to understand, because there seems to be a 1:1 relationship between the
Pixmap
and itswl_buffer
, trying to have multiplewl_buffer
s is like duplicating most of thexwl_pixmap
, so using different backing pixmaps as initially made sense to me...Edited by Olivier Fourdan