]> git.mdlowis.com Git - proto/labwc.git/commit
scaled-scene-buffer: allow multiple wlr_buffer_drops()
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Fri, 15 Nov 2024 06:02:52 +0000 (07:02 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Thu, 21 Nov 2024 20:31:41 +0000 (20:31 +0000)
commit71b4277852c70b213b530a73fc5a55ba7f4019d1
treea697cb97e5dcc5c87e33a63a59655be7a25e9da9
parent2df6628490e3694637f1aac59af4ddb5e6d64de3
scaled-scene-buffer: allow multiple wlr_buffer_drops()

This allows implementations of the interface to share a single
wlr_buffer for multiple wlr_scene_buffer nodes and still make
the scaled-scene-buffer handle the buffer drops.

wlr_scene_buffer holds an implicit lock while using a wlr_buffer
and scaled-scene-buffer.c holds additional locks for as long as
a buffer is within its internal cache.

This should ensure that a shared wlr_buffer never gets actually
dropped even if wlr_buffer_drop() has been called by another
scaled-scene-buffer instance using the same wlr_buffer.
src/common/scaled-scene-buffer.c