mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
render/allocator/gbm: insert buffer after export gbm bo
Signed-off-by: xurui <xurui@kylinos.cn>
This commit is contained in:
parent
7431d840d0
commit
b0c886ec77
1 changed files with 2 additions and 1 deletions
|
|
@ -97,7 +97,6 @@ static struct wlr_gbm_buffer *create_buffer(struct wlr_gbm_allocator *alloc,
|
||||||
}
|
}
|
||||||
wlr_buffer_init(&buffer->base, &buffer_impl, width, height);
|
wlr_buffer_init(&buffer->base, &buffer_impl, width, height);
|
||||||
buffer->gbm_bo = bo;
|
buffer->gbm_bo = bo;
|
||||||
wl_list_insert(&alloc->buffers, &buffer->link);
|
|
||||||
|
|
||||||
if (!export_gbm_bo(bo, &buffer->dmabuf)) {
|
if (!export_gbm_bo(bo, &buffer->dmabuf)) {
|
||||||
free(buffer);
|
free(buffer);
|
||||||
|
|
@ -112,6 +111,8 @@ static struct wlr_gbm_buffer *create_buffer(struct wlr_gbm_allocator *alloc,
|
||||||
buffer->dmabuf.modifier = fallback_modifier;
|
buffer->dmabuf.modifier = fallback_modifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wl_list_insert(&alloc->buffers, &buffer->link);
|
||||||
|
|
||||||
char *format_name = drmGetFormatName(buffer->dmabuf.format);
|
char *format_name = drmGetFormatName(buffer->dmabuf.format);
|
||||||
char *modifier_name = drmGetFormatModifierName(buffer->dmabuf.modifier);
|
char *modifier_name = drmGetFormatModifierName(buffer->dmabuf.modifier);
|
||||||
wlr_log(WLR_DEBUG, "Allocated %dx%d GBM buffer "
|
wlr_log(WLR_DEBUG, "Allocated %dx%d GBM buffer "
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue