backend: move the head of the damage ring after paint

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-03-05 20:27:01 +00:00
parent c57f267535
commit de30ef14ae
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 8 additions and 0 deletions

View File

@ -229,6 +229,14 @@ void paint_all_new(session_t *ps, win *const t, bool ignore_damage) {
pixman_region32_fini(&reg_bound); pixman_region32_fini(&reg_bound);
pixman_region32_fini(&reg_paint); pixman_region32_fini(&reg_paint);
} }
pixman_region32_fini(&reg_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) { if (ps->backend_data->ops->present) {
// Present the rendered scene // Present the rendered scene