diff options
author | Simon Ser <contact@emersion.fr> | 2021-05-31 20:16:32 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-05-31 15:50:13 -0400 |
commit | 766a24fa7791d115fa36aded57d7cde87b20d4da (patch) | |
tree | a6d86ae0bf50772ed03746fcd6b90c97947d8807 /include | |
parent | 5c30cf3d9441f7121acadd834ac610bff610eca1 (diff) |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/render/allocator.h | 5 |
1 files changed, 4 insertions, 1 deletions
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); |