From 318e3ac92cd3a172932370a7da8b2c2d24231758 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Fri, 23 Apr 2021 17:06:21 -0400 Subject: render/allocator: introduce wlr_allocator_autocreate --- include/render/allocator.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/render/allocator.h b/include/render/allocator.h index d47184af..4d8e68f4 100644 --- a/include/render/allocator.h +++ b/include/render/allocator.h @@ -7,6 +7,8 @@ #include struct wlr_allocator; +struct wlr_backend; +struct wlr_renderer; struct wlr_allocator_interface { struct wlr_buffer *(*create_buffer)(struct wlr_allocator *alloc, @@ -22,6 +24,11 @@ struct wlr_allocator { } events; }; +/** + * Creates the adequate wlr_allocator given a backend and a renderer + */ +struct wlr_allocator *wlr_allocator_autocreate(struct wlr_backend *backend, + struct wlr_renderer *renderer); /** * Destroy the allocator. */ -- cgit v1.2.3