diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2025-12-16 13:56:42 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2025-12-17 07:09:23 +0000 |
| commit | 4e96780eef048baa7370499c64a33210b4e0406d (patch) | |
| tree | 852b86319a2412e35fa956aad31a7123c9c0a497 /themes/apprentice | |
| parent | Fix discarded const qualifiers from string functions (diff) | |
shm: revert part of 299186a6547f6e038ee6f3822caf9a0fdfabceef
299186a6547f6e038ee6f3822caf9a0fdfabceef introduced a regression,
where we don't handle SHM buffer "hiccups" correctly.
If foot, for some reason is forced to render a frame "too soon", we
might end up having multiple buffers "in flight" (i.e. committed to
the compositor). This could happen if the compositor pushes multiple
configure events rapidly, for example. Or anything else that forces
foot to render something "immediately", without waiting for a frame
callback.
The compositor typically releases both buffers at the same time (or
close to it), so the _next_ time we want to render a frame, we
have *two* buffers to pick between. The problem here is that after
299186a6547f6e038ee6f3822caf9a0fdfabceef, foot no longer purges the
additional buffer(s), but keeps all of them around. This messes up
foot's age tracking, and the _next_ time we're forced to pull two
buffers (without the compositor releasing the first one in between),
we try to apply damage tracking that is no longer valid. This results
in visual glitches. This never self-repairs, and we're stuck with
visual glitches until the window is resized, and we're forced to
allocate completely new buffers.
It is unclear why 299186a6547f6e038ee6f3822caf9a0fdfabceef stopped
removing the buffers. It was likely done early in the development, and
is no longer needed. So far, I haven't noticed any bugs by
re-introducing the buffer purging, but further testing is needed.
Diffstat (limited to 'themes/apprentice')
0 files changed, 0 insertions, 0 deletions
