aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/gles2/renderer.c1
-rw-r--r--render/gles2/texture.c3
-rw-r--r--render/pixman/renderer.c35
-rw-r--r--render/wlr_renderer.c1
4 files changed, 2 insertions, 38 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
index 9bfaebd7..8f1bf883 100644
--- a/render/gles2/renderer.c
+++ b/render/gles2/renderer.c
@@ -592,7 +592,6 @@ static const struct wlr_renderer_impl renderer_impl = {
.get_render_formats = gles2_get_render_formats,
.preferred_read_format = gles2_preferred_read_format,
.read_pixels = gles2_read_pixels,
- .texture_from_pixels = gles2_texture_from_pixels,
.texture_from_wl_drm = gles2_texture_from_wl_drm,
.texture_from_dmabuf = gles2_texture_from_dmabuf,
.init_wl_display = gles2_init_wl_display,
diff --git a/render/gles2/texture.c b/render/gles2/texture.c
index 303ac411..87710a18 100644
--- a/render/gles2/texture.c
+++ b/render/gles2/texture.c
@@ -179,7 +179,8 @@ static struct wlr_gles2_texture *gles2_texture_create(
return texture;
}
-struct wlr_texture *gles2_texture_from_pixels(struct wlr_renderer *wlr_renderer,
+static struct wlr_texture *gles2_texture_from_pixels(
+ struct wlr_renderer *wlr_renderer,
uint32_t drm_format, uint32_t stride, uint32_t width,
uint32_t height, const void *data) {
struct wlr_gles2_renderer *renderer = gles2_get_renderer(wlr_renderer);
diff --git a/render/pixman/renderer.c b/render/pixman/renderer.c
index f1c1a3d5..71af1939 100644
--- a/render/pixman/renderer.c
+++ b/render/pixman/renderer.c
@@ -368,40 +368,6 @@ static struct wlr_pixman_texture *pixman_texture_create(
return texture;
}
-static struct wlr_texture *pixman_texture_from_pixels(
- struct wlr_renderer *wlr_renderer, uint32_t drm_format,
- uint32_t stride, uint32_t width, uint32_t height, const void *data) {
- struct wlr_pixman_renderer *renderer = get_renderer(wlr_renderer);
-
- struct wlr_pixman_texture *texture =
- pixman_texture_create(renderer, drm_format, width, height);
- if (texture == NULL) {
- return NULL;
- }
-
- // TODO: avoid this copy
- texture->data = malloc(stride * height);
- if (texture->data == NULL) {
- wlr_log_errno(WLR_ERROR, "Allocation failed");
- wl_list_remove(&texture->link);
- free(texture);
- return NULL;
- }
- memcpy(texture->data, data, stride * height);
-
- texture->image = pixman_image_create_bits_no_clear(texture->format,
- width, height, texture->data, stride);
- if (!texture->image) {
- wlr_log(WLR_ERROR, "Failed to create pixman image");
- wl_list_remove(&texture->link);
- free(texture->data);
- free(texture);
- return NULL;
- }
-
- return &texture->wlr_texture;
-}
-
static struct wlr_texture *pixman_texture_from_buffer(
struct wlr_renderer *wlr_renderer, struct wlr_buffer *buffer) {
struct wlr_pixman_renderer *renderer = get_renderer(wlr_renderer);
@@ -531,7 +497,6 @@ static const struct wlr_renderer_impl renderer_impl = {
.render_quad_with_matrix = pixman_render_quad_with_matrix,
.get_shm_texture_formats = pixman_get_shm_texture_formats,
.get_render_formats = pixman_get_render_formats,
- .texture_from_pixels = pixman_texture_from_pixels,
.texture_from_buffer = pixman_texture_from_buffer,
.bind_buffer = pixman_bind_buffer,
.destroy = pixman_destroy,
diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c
index f661d8d0..dc9c3a99 100644
--- a/render/wlr_renderer.c
+++ b/render/wlr_renderer.c
@@ -26,7 +26,6 @@ void wlr_renderer_init(struct wlr_renderer *renderer,
assert(impl->render_subtexture_with_matrix);
assert(impl->render_quad_with_matrix);
assert(impl->get_shm_texture_formats);
- assert(impl->texture_from_pixels);
assert(impl->get_render_buffer_caps);
renderer->impl = impl;