mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -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
|
|
@ -7,6 +7,7 @@
|
|||
#include <wlr/util/log.h>
|
||||
#include <xf86drm.h>
|
||||
#include "render/gbm_allocator.h"
|
||||
#include "types/wlr_buffer.h"
|
||||
|
||||
static const struct wlr_buffer_impl buffer_impl;
|
||||
|
||||
|
|
@ -181,7 +182,7 @@ struct wlr_allocator *wlr_gbm_allocator_create(int drm_fd) {
|
|||
if (alloc == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
wlr_allocator_init(&alloc->base, &allocator_impl);
|
||||
wlr_allocator_init(&alloc->base, &allocator_impl, WLR_BUFFER_CAP_DMABUF);
|
||||
|
||||
alloc->fd = fd;
|
||||
wl_list_init(&alloc->buffers);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue