-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Wayland] Buffer resize occurs one frame after acknowledged resize #1119
Copy link
Copy link
Closed
Labels
B - bugDang, that shouldn't have happenedDang, that shouldn't have happenedDS - waylandAffects the Wayland backend, or generally free Unix platformsAffects the Wayland backend, or generally free Unix platformsH - help wantedSomeone please save usSomeone please save usP - highVital to haveVital to have
Description
During testing of Alacritty, it was observed that one could often provoke "resize glitches" when testing with Sway, where Alacritty would appear at 800x600 for what appeared to be a single frame, then resize to the appropriate size the next frame.
Running Alacritty under WAYLAND_DEBUG=1, one can observe the following behavior:
- An xdg_surface is created, configured and acked, with no buffer yet available.
- After initializing zwp_linux_dmabuf_v1, an 800x600 buffer is created, attached and committed.
- A configure event is received for the xdg_surface, which results in:
- set_window_geometry is called with the new size
- A frame callback is registered
- A new buffer is created, with the old size (800x600)
- The buffer is attached and the surface is committed.
- Then, on the next frame, a new buffer is created yet again, this time with the new size, which is attached and committed.
Even though we clearly acknowledge the changed size, and go through the effort of creating a new buffer, we spend time rendering an additional frame at the wrong resolution.
The issue exists with glutin_examples as well if one observes WAYLAND_DEBUG, but it does not cause the visible glitch.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
B - bugDang, that shouldn't have happenedDang, that shouldn't have happenedDS - waylandAffects the Wayland backend, or generally free Unix platformsAffects the Wayland backend, or generally free Unix platformsH - help wantedSomeone please save usSomeone please save usP - highVital to haveVital to have