From 19278569a3243cf91596155b73eac29692868fc6 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sat, 25 Jun 2022 16:37:30 +0100 Subject: [PATCH] noop-renderer: weston_buffer properties are set by the core ca9bb01fe6f6 made it so that we already set shm_buffer, width, height, etc, in the core. There's no need for the renderer to do this. Signed-off-by: Daniel Stone --- libweston/noop-renderer.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libweston/noop-renderer.c b/libweston/noop-renderer.c index e89200b3..e6ab8ee4 100644 --- a/libweston/noop-renderer.c +++ b/libweston/noop-renderer.c @@ -57,7 +57,7 @@ noop_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer) { struct wl_shm_buffer *shm_buffer; uint8_t *data; - uint32_t size, i, width, height, stride; + uint32_t size, i, height, stride; __attribute__((unused)) int unused = 0; if (!buffer) @@ -78,8 +78,7 @@ noop_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer) shm_buffer = buffer->shm_buffer; data = wl_shm_buffer_get_data(shm_buffer); stride = wl_shm_buffer_get_stride(shm_buffer); - width = wl_shm_buffer_get_width(shm_buffer); - height = wl_shm_buffer_get_height(shm_buffer); + height = buffer->height; size = stride * height; /* Access the buffer data to make sure the buffer's client gets killed @@ -91,9 +90,6 @@ noop_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer) unused ^= data[i]; wl_shm_buffer_end_access(shm_buffer); - buffer->shm_buffer = shm_buffer; - buffer->width = width; - buffer->height = height; } static void