From 766a24fa7791d115fa36aded57d7cde87b20d4da Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 31 May 2021 20:16:32 +0200 Subject: render/allocator: add wlr_allocator.buffer_caps This allows users to know the capabilities of the buffers that will be allocated. The buffer capability is important to know when negotiating buffer formats. --- include/render/allocator.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/render') diff --git a/include/render/allocator.h b/include/render/allocator.h index 4f1cbd0f..c33ab126 100644 --- a/include/render/allocator.h +++ b/include/render/allocator.h @@ -19,6 +19,9 @@ struct wlr_allocator_interface { struct wlr_allocator { const struct wlr_allocator_interface *impl; + // Capabilites of the buffers created with this allocator + uint32_t buffer_caps; + struct { struct wl_signal destroy; } events; @@ -44,7 +47,7 @@ struct wlr_buffer *wlr_allocator_create_buffer(struct wlr_allocator *alloc, // For wlr_allocator implementors void wlr_allocator_init(struct wlr_allocator *alloc, - const struct wlr_allocator_interface *impl); + const struct wlr_allocator_interface *impl, uint32_t buffer_caps); struct wlr_allocator *allocator_autocreate_with_drm_fd( struct wlr_backend *backend, struct wlr_renderer *renderer, int drm_fd); -- cgit v1.2.3