Merge branch 'export-dmabuf-release' into 'master'

export-dmabuf: Implement release semantics

See merge request wlroots/wlroots!5030
This commit is contained in:
Andri Yngvason 2026-05-11 17:37:53 +00:00
commit d1cd5f9251
5 changed files with 33 additions and 5 deletions

View file

@ -120,3 +120,12 @@ bool wlr_swapchain_has_buffer(struct wlr_swapchain *swapchain,
}
return false;
}
int wlr_swapchain_count_free_slots(const struct wlr_swapchain *swapchain)
{
int count = 0;
for (size_t i = 0; i < WLR_SWAPCHAIN_CAP; i++) {
count += !swapchain->slots[i].acquired;
}
return count;
}