diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-07-16 14:47:57 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-07-17 17:14:42 +0000 |
| commit | 232fb20269b68157874f57d676c1b0b95c2386aa (patch) | |
| tree | ca4de1f2c6dc21a8d0261c55e97b4ac8358be122 /scripts | |
| parent | shm: we may exit with busy buffers remaining (seen on KDE) (diff) | |
shm: replace 'locked' attribute with a ref-counter
The initial ref-count is either 1 or 0, depending on whether the
buffer is supposed to be released "immeidately" (meaning, as soon as
the compositor releases it).
Two new user facing functions have been added: shm_addref() and
shm_unref().
Our renderer now uses these two functions instead of manually setting
and clearing the 'locked' attribute.
shm_unref() will decrement the ref-counter, and destroy the buffer
when the counter reaches zero. Except if the buffer is currently
"busy" (compositor owned), in which case destruction is deferred to
the release event. The buffer is still removed from the list though.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
