mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-22 05:33:45 -04:00
render: fix application of old scroll damage when double buffering
On compositors that forces us to double buffer, we need to re-apply
the last frame’s damage to the current frame (which uses the buffer
from the next-to-last frame).
General cell updates are handled by simply copying from the last
frame’s pixman buffer to the current frame’s.
In an attempt to improve performance, scroll damage were up until now
handled by re-playing the last frame’s scroll damage (on the current
frame’s buffer). This does not work, and resulted in glitches when
scrolling in the scrollback.
This patch does the following:
* grid_render_scroll{,_reverse}() now update the buffer’s "dirty"
region. This means the generic copy-old-frames-buffer handles the
scroll damage (albeit in, potentially, a less efficient way).
* Tracking of, and re-applying old scroll damage is completely
removed.
Closes #1173
This commit is contained in:
parent
50ae277d90
commit
4340f8a3b4
4 changed files with 74 additions and 68 deletions
3
shm.c
3
shm.c
|
|
@ -151,7 +151,6 @@ buffer_destroy(struct buffer_private *buf)
|
|||
pool_unref(buf->pool);
|
||||
buf->pool = NULL;
|
||||
|
||||
free(buf->public.scroll_damage);
|
||||
pixman_region32_fini(&buf->public.dirty);
|
||||
free(buf);
|
||||
}
|
||||
|
|
@ -581,8 +580,6 @@ shm_get_buffer(struct buffer_chain *chain, int width, int height)
|
|||
LOG_DBG("re-using buffer %p from cache", (void *)cached);
|
||||
cached->busy = true;
|
||||
pixman_region32_clear(&cached->public.dirty);
|
||||
free(cached->public.scroll_damage);
|
||||
cached->public.scroll_damage = NULL;
|
||||
xassert(cached->public.pix_instances == chain->pix_instances);
|
||||
return &cached->public;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue