backend: move the head of the damage ring after paint
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
c57f267535
commit
de30ef14ae
|
@ -229,6 +229,14 @@ void paint_all_new(session_t *ps, win *const t, bool ignore_damage) {
|
|||
pixman_region32_fini(®_bound);
|
||||
pixman_region32_fini(®_paint);
|
||||
}
|
||||
pixman_region32_fini(®_damage);
|
||||
|
||||
// Move the head of the damage ring
|
||||
ps->damage = ps->damage - 1;
|
||||
if (ps->damage < ps->damage_ring) {
|
||||
ps->damage = ps->damage_ring + ps->ndamage - 1;
|
||||
}
|
||||
pixman_region32_clear(ps->damage);
|
||||
|
||||
if (ps->backend_data->ops->present) {
|
||||
// Present the rendered scene
|
||||
|
|
Loading…
Reference in New Issue