From 6e03d3015e1668bd70266b0ee4b0720b86ca59c7 Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Sun, 19 Nov 2023 16:21:54 -0500 Subject: swapchain: Add wlr_swapchain_has_buffer --- include/wlr/render/swapchain.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/wlr/render/swapchain.h b/include/wlr/render/swapchain.h index 8bb8afc9..cb3aee9d 100644 --- a/include/wlr/render/swapchain.h +++ b/include/wlr/render/swapchain.h @@ -38,6 +38,12 @@ void wlr_swapchain_destroy(struct wlr_swapchain *swapchain); */ struct wlr_buffer *wlr_swapchain_acquire(struct wlr_swapchain *swapchain, int *age); +/** + * Returns true if this buffer has been created by this swapchain, and false + * otherwise. + */ +bool wlr_swapchain_has_buffer(struct wlr_swapchain *swapchain, + struct wlr_buffer *buffer); /** * Mark the buffer as submitted for presentation. This needs to be called by * swap chain users on frame boundaries. -- cgit v1.2.3