diff --git a/include/wlr/render/wlr_texture.h b/include/wlr/render/wlr_texture.h index c5b50658b..f438d2aaa 100644 --- a/include/wlr/render/wlr_texture.h +++ b/include/wlr/render/wlr_texture.h @@ -26,14 +26,6 @@ struct wlr_texture { struct wl_list link; }; -/** - * Create a new texture from raw pixel data. `stride` is in bytes. The returned - * texture is mutable. - */ -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); - /** * Update a texture with a struct wlr_buffer's contents. * diff --git a/render/wlr_texture.c b/render/wlr_texture.c index 6676d8f9d..e1e621d55 100644 --- a/render/wlr_texture.c +++ b/render/wlr_texture.c @@ -32,30 +32,6 @@ void wlr_texture_destroy(struct wlr_texture *texture) { } } -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) { - assert(width > 0); - assert(height > 0); - assert(stride > 0); - assert(data); - - struct wlr_readonly_data_buffer *buffer = - readonly_data_buffer_create(fmt, stride, width, height, data); - 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. - readonly_data_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) {