shm: add shm_purge()

Destroys *all* buffers associated with the specified cookie.
This commit is contained in:
Daniel Eklöf 2019-11-02 00:49:00 +01:00
parent 4d3251a93b
commit 8e5d386afc
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 19 additions and 0 deletions

2
shm.h
View file

@ -24,3 +24,5 @@ struct buffer {
struct buffer *shm_get_buffer(
struct wl_shm *shm, int width, int height, unsigned long cookie);
void shm_fini(void);
void shm_purge(struct wl_shm *shm, unsigned long cookie);