diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2022-04-16 15:47:56 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2022-04-16 15:47:56 +0000 |
| commit | abbdd3bae884a4bcea20d5059f25684f9a5a7571 (patch) | |
| tree | dec4619c556ff4b0ac785b4a240ecf50e16329aa | |
| parent | wayland: optionally disable pointer input on subsurfaces (diff) | |
shm: add shm_did_not_use_buffer()
This allows a caller to return a buffer (obtained with
shm_get_buffer()) to the pool,
The buffer must not have been used. I.e. it must not have been
attached and committed to a wayland surface.
| -rw-r--r-- | shm.c | 7 | ||||
| -rw-r--r-- | shm.h | 2 |
2 files changed, 9 insertions, 0 deletions
@@ -510,6 +510,13 @@ err: } void +shm_did_not_use_buf(struct buffer *_buf) +{ + struct buffer_private *buf = (struct buffer_private *)_buf; + buf->busy = false; +} + +void shm_get_many(struct buffer_chain *chain, size_t count, int widths[static count], int heights[static count], struct buffer *bufs[static count]) @@ -66,6 +66,8 @@ void shm_get_many( int widths[static count], int heights[static count], struct buffer *bufs[static count]); +void shm_did_not_use_buf(struct buffer *buf); + bool shm_can_scroll(const struct buffer *buf); bool shm_scroll(struct buffer *buf, int rows, int top_margin, int top_keep_rows, |
