From dae7bd1413181580c1ac0c1bbc7d8e8a9f1982a2 Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Mon, 20 Jun 2022 11:11:23 -0400 Subject: [PATCH] wlr_texture: Drop wlr_texture_from_dmabuf Compositors should first create a valid dmabuf first, then use normal apis to use that buffer where needed. --- include/wlr/render/wlr_texture.h | 7 ------- render/wlr_texture.c | 17 ----------------- 2 files changed, 24 deletions(-) diff --git a/include/wlr/render/wlr_texture.h b/include/wlr/render/wlr_texture.h index b5060d3c4..c5b50658b 100644 --- a/include/wlr/render/wlr_texture.h +++ b/include/wlr/render/wlr_texture.h @@ -12,7 +12,6 @@ #include #include #include -#include #include struct wlr_buffer; @@ -35,12 +34,6 @@ struct wlr_texture *wlr_texture_from_pixels(struct wlr_renderer *renderer, uint32_t fmt, uint32_t stride, uint32_t width, uint32_t height, const void *data); -/** - * Create a new texture from a DMA-BUF. The returned texture is immutable. - */ -struct wlr_texture *wlr_texture_from_dmabuf(struct wlr_renderer *renderer, - struct wlr_dmabuf_attributes *attribs); - /** * Update a texture with a struct wlr_buffer's contents. * diff --git a/render/wlr_texture.c b/render/wlr_texture.c index 162656c16..6676d8f9d 100644 --- a/render/wlr_texture.c +++ b/render/wlr_texture.c @@ -56,23 +56,6 @@ struct wlr_texture *wlr_texture_from_pixels(struct wlr_renderer *renderer, return texture; } -struct wlr_texture *wlr_texture_from_dmabuf(struct wlr_renderer *renderer, - struct wlr_dmabuf_attributes *attribs) { - struct wlr_dmabuf_buffer *buffer = dmabuf_buffer_create(attribs); - if (buffer == NULL) { - return NULL; - } - - struct wlr_texture *texture = - wlr_texture_from_buffer(renderer, &buffer->base); - - // By this point, the renderer should have locked the buffer if it still - // needs to access it in the future. - dmabuf_buffer_drop(buffer); - - return texture; -} - struct wlr_texture *wlr_texture_from_buffer(struct wlr_renderer *renderer, struct wlr_buffer *buffer) { if (!renderer->impl->texture_from_buffer) {