aboutsummaryrefslogtreecommitdiff
path: root/shm.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-05-10 15:49:15 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-05-12 18:06:15 +0000
commit945a346596b163e459d7bd4896258f8546c861b2 (patch)
tree4abca593bb1e48f7452ee9439f3c0170160fc5f1 /shm.c
parentshm: set ‘age’ in newly allocated buffers to something large (diff)
shm: clear buffer’s dirty region before returning a cached buffer
A non-busy buffer should always have an empty dirty region
Diffstat (limited to 'shm.c')
-rw-r--r--shm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/shm.c b/shm.c
index 4b503d22..ed20af3a 100644
--- a/shm.c
+++ b/shm.c
@@ -250,6 +250,7 @@ shm_get_buffer(struct wl_shm *shm, int width, int height, unsigned long cookie,
cookie, (void *)&it->item);
it->item.busy = true;
it->item.purge = false;
+ pixman_region32_clear(&it->item.dirty);
free(it->item.scroll_damage);
it->item.scroll_damage = NULL;
xassert(it->item.pix_instances == pix_instances);