mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-07 04:06:14 -05:00
Merge branch 'gbm-explicit-upgrade' into 'master'
Draft: `WLR_GBM_EXPLICIT_UPGRADE` See merge request wlroots/wlroots!5200
This commit is contained in:
commit
e03713983b
4 changed files with 21 additions and 1 deletions
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "render/allocator/gbm.h"
|
||||
#include "render/drm_format_set.h"
|
||||
#include "util/env.h"
|
||||
|
||||
static const struct wlr_buffer_impl buffer_impl;
|
||||
|
||||
|
|
@ -90,6 +91,10 @@ static struct wlr_gbm_buffer *create_buffer(struct wlr_gbm_allocator *alloc,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (!has_modifier && alloc->explicit_upgrade) {
|
||||
fallback_modifier = gbm_bo_get_modifier(bo);
|
||||
}
|
||||
|
||||
struct wlr_gbm_buffer *buffer = calloc(1, sizeof(*buffer));
|
||||
if (buffer == NULL) {
|
||||
gbm_bo_destroy(bo);
|
||||
|
|
@ -174,6 +179,7 @@ struct wlr_allocator *wlr_gbm_allocator_create(int fd) {
|
|||
return NULL;
|
||||
}
|
||||
wlr_allocator_init(&alloc->base, &allocator_impl, WLR_BUFFER_CAP_DMABUF);
|
||||
alloc->explicit_upgrade = env_parse_bool("WLR_GBM_EXPLICIT_UPGRADE");
|
||||
|
||||
alloc->fd = fd;
|
||||
wl_list_init(&alloc->buffers);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue