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 2025-12-23 18:38:48 +00:00
commit 2298bbec92
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;
}