diff options
| author | Sebastian Wick <sebastian.wick@redhat.com> | 2025-03-21 19:42:52 +0100 |
|---|---|---|
| committer | Sebastian Wick <sebastian.wick@redhat.com> | 2025-05-20 21:50:22 +0200 |
| commit | 9367c4da76c9fd118d505e40ad5d554e8fe249a1 (patch) | |
| tree | 6e70e13380a1117d401c9e04fefb9dfdab8c7c16 /src/wayland-server.c | |
| parent | shm: Remove refcount check which cannot be triggered (diff) | |
| download | wayland-9367c4da76c9fd118d505e40ad5d554e8fe249a1.tar wayland-9367c4da76c9fd118d505e40ad5d554e8fe249a1.tar.gz wayland-9367c4da76c9fd118d505e40ad5d554e8fe249a1.tar.bz2 wayland-9367c4da76c9fd118d505e40ad5d554e8fe249a1.tar.lz wayland-9367c4da76c9fd118d505e40ad5d554e8fe249a1.tar.xz wayland-9367c4da76c9fd118d505e40ad5d554e8fe249a1.tar.zst wayland-9367c4da76c9fd118d505e40ad5d554e8fe249a1.zip | |
shm: Add wl_shm_buffer ref and unref functions
Shared memory buffers are currently tied to the lifetime of their
underlying wl_buffer resource. This becomes problematic when the client
destroys the resource after committing new state which references the
wl_buffer because a compositor might have to defer applying the commit.
This commit adds methods to keep the wl_shm_buffer alive longer than the
underlying resource. This implicitly also keeps the buffer pool alive
and because the wl_shm_buffer uses offsets into the pool, it even works
when the underlying storage gets remapped somewhere else, which can
happen when the client resizes the pool.
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
Diffstat (limited to 'src/wayland-server.c')
0 files changed, 0 insertions, 0 deletions
