diff options
author | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-04-23 17:06:21 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-04-28 20:55:57 +0200 |
commit | 318e3ac92cd3a172932370a7da8b2c2d24231758 (patch) | |
tree | 54d2b2bdda6bc9b5ae070a32d03fb10536a40954 /include | |
parent | 982498fab3c4d0aee9b29312559cbdd317c563a1 (diff) |
render/allocator: introduce wlr_allocator_autocreate
Diffstat (limited to 'include')
-rw-r--r-- | include/render/allocator.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 <wlr/render/drm_format_set.h> struct wlr_allocator; +struct wlr_backend; +struct wlr_renderer; struct wlr_allocator_interface { struct wlr_buffer *(*create_buffer)(struct wlr_allocator *alloc, @@ -23,6 +25,11 @@ struct wlr_allocator { }; /** + * 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. */ void wlr_allocator_destroy(struct wlr_allocator *alloc); |