mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-17 06:46:39 -04:00
render/swapchain: Add-on to get swapchain from buffer
This can be used to cache things shared between render buffers (e.g., blending buffers) on the swapchain instance itself.
This commit is contained in:
parent
5432108846
commit
827ea06c44
2 changed files with 50 additions and 0 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/render/drm_format_set.h>
|
||||
#include <wlr/util/addon.h>
|
||||
|
||||
#define WLR_SWAPCHAIN_CAP 4
|
||||
|
||||
|
|
@ -23,6 +24,8 @@ struct wlr_swapchain {
|
|||
struct wlr_swapchain_slot slots[WLR_SWAPCHAIN_CAP];
|
||||
|
||||
struct wl_listener allocator_destroy;
|
||||
|
||||
struct wlr_addon_set addons;
|
||||
};
|
||||
|
||||
struct wlr_swapchain *wlr_swapchain_create(
|
||||
|
|
@ -43,4 +46,7 @@ struct wlr_buffer *wlr_swapchain_acquire(struct wlr_swapchain *swapchain);
|
|||
bool wlr_swapchain_has_buffer(struct wlr_swapchain *swapchain,
|
||||
struct wlr_buffer *buffer);
|
||||
|
||||
struct wlr_swapchain *wlr_swapchain_try_from_wlr_buffer(
|
||||
struct wlr_buffer *buffer);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue