mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
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.
This commit is contained in:
parent
5c30cf3d94
commit
766a24fa77
5 changed files with 33 additions and 10 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue