diff options
| author | Manuel Stoeckl <code@mstoeckl.com> | 2023-03-12 16:48:58 -0400 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2023-03-22 10:56:42 +0100 |
| commit | 1d3e62c67f07a180fca02a6df1cf9648f2b50349 (patch) | |
| tree | 598dd26d5a62ade9ee705073cad83c8d71b7617f /pool-buffer.c | |
| parent | ac3b49b6571ceda3f8db11a98bfe320106996280 (diff) | |
Stop pooling background surface buffers
The wl_buffers for the background surface only need to be updated
when the output dimensions change. Using the fixed pool of two
buffers to cache these buffers does not help, since if a new buffer
is needed, it will have a different size than whatever buffers were
cached. Furthermore, because the pool has fixed size, it is possible
to run out of buffers if configure events arrive faster than
pool buffers are marked not busy, which can lead to protocol errors
when the background surface is committed after acknowledging a new
size, but without attaching a buffer that matches that size.
Diffstat (limited to 'pool-buffer.c')
| -rw-r--r-- | pool-buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pool-buffer.c b/pool-buffer.c index 02884de..dfb4d0d 100644 --- a/pool-buffer.c +++ b/pool-buffer.c @@ -46,7 +46,7 @@ static const struct wl_buffer_listener buffer_listener = { .release = buffer_release }; -static struct pool_buffer *create_buffer(struct wl_shm *shm, +struct pool_buffer *create_buffer(struct wl_shm *shm, struct pool_buffer *buf, int32_t width, int32_t height, uint32_t format) { uint32_t stride = width * 4; |
