diff options
| author | Derek Foreman <derekf@osg.samsung.com> | 2015-10-19 20:54:49 -0500 |
|---|---|---|
| committer | Derek Foreman <derekf@osg.samsung.com> | 2015-10-21 16:31:51 -0500 |
| commit | eba83cd5e1645986768fcd918c2f5cd76ba54f01 (patch) | |
| tree | 62b2f0855e168c1fd8334a7a14f1926a2aec04f6 /tests/cpp-compile-test.cpp | |
| parent | Remove protocol/wayland.dtd (diff) | |
| download | wayland-eba83cd5e1645986768fcd918c2f5cd76ba54f01.tar wayland-eba83cd5e1645986768fcd918c2f5cd76ba54f01.tar.gz wayland-eba83cd5e1645986768fcd918c2f5cd76ba54f01.tar.bz2 wayland-eba83cd5e1645986768fcd918c2f5cd76ba54f01.tar.lz wayland-eba83cd5e1645986768fcd918c2f5cd76ba54f01.tar.xz wayland-eba83cd5e1645986768fcd918c2f5cd76ba54f01.tar.zst wayland-eba83cd5e1645986768fcd918c2f5cd76ba54f01.zip | |
shm: Add shm_buffer ref and shm_pool unref functions
Sometimes the compositor wants to make sure a shm pool doesn't disappear
out from under it.
For example, in Enlightenment, rendering happens in a separate thread
while the main thread can still dispatch events. If a client is destroyed
during rendering, all its resources are cleaned up and its shm pools are
unmapped. This causes the rendering thread to segfault.
This patch adds a way for the compositor to increment the refcount of the
shm pool so it can't disappear, and decrement it when it's finished.
The ref/unref are asymmetrical (ref returns the pool) because it's
possible the buffer itself will be gone when you need to unref the pool.
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Diffstat (limited to 'tests/cpp-compile-test.cpp')
0 files changed, 0 insertions, 0 deletions
