wayland/src
Sebastian Wick 9367c4da76 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>
2025-05-20 21:50:22 +02:00
..
.gitignore ignore: Add *.dtd.embed 2016-03-10 22:24:20 -08:00
connection.c connection: Fix wrong format string 2024-11-30 16:02:55 -05:00
embed.py build: replace assembly embedding with Python script 2021-05-10 22:08:45 +00:00
event-loop.c event-loop: Use timespec utils instead of hand-rolling our own 2025-02-04 14:09:51 +00:00
meson.build build: Add -lm to pkg-config dependencies 2025-02-05 06:52:53 +00:00
scanner.c scanner: use separate guards for validator functions 2025-02-23 23:38:15 +01:00
timespec-util.h timespec: Implement saturating timespec substraction 2025-02-04 14:09:51 +00:00
wayland-client-core.h Forward declarate timespec struct 2025-02-06 10:18:17 +00:00
wayland-client.c client: document get_listener behavior for dispatchers 2025-03-15 23:07:39 +00:00
wayland-client.h doc: Formalize file comment in wayland-client.h, wayland-server.h 2016-05-11 11:03:27 -07:00
wayland-os.c build: fix build and provide compat for OpenBSD 2024-02-21 15:46:41 +00:00
wayland-os.h shm: Add mmap+memmove fallback if mremap() does not exist 2021-09-10 11:35:54 +00:00
wayland-private.h connection: Dynamically resize connection buffers 2024-04-08 14:05:32 +00:00
wayland-server-core.h shm: Add wl_shm_buffer ref and unref functions 2025-05-20 21:50:22 +02:00
wayland-server-private.h Move wl_priv_signal to wayland-server-private.h 2019-11-06 08:24:14 -06:00
wayland-server.c server: add const qualifier to function arguments where possible 2025-01-22 14:28:50 +00:00
wayland-server.h Put WL_DEPRECATED in front of the function declarations 2024-08-09 20:25:11 +00:00
wayland-shm.c shm: Add wl_shm_buffer ref and unref functions 2025-05-20 21:50:22 +02:00
wayland-util.c util: convert macros to inline functions 2024-03-28 17:56:34 +01:00
wayland-util.h Also use [[deprecated]] when compiling with at least C++14 2025-02-05 09:43:21 +01:00
wayland-version.h.in src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00