From 996dd5caa5b73154375679147dcc4d8523b999bf Mon Sep 17 00:00:00 2001 From: Nikita Tokarchuk Date: Sat, 20 Jul 2024 21:35:30 +0200 Subject: [PATCH] Revert "backend-wayland: fix pixman buffer size" This reverts commit d4eafbaa980a7698e4c0c8170ab29f9fd929754c. --- libweston/backend-wayland/wayland.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/libweston/backend-wayland/wayland.c b/libweston/backend-wayland/wayland.c index bb5648d5..4da52e62 100644 --- a/libweston/backend-wayland/wayland.c +++ b/libweston/backend-wayland/wayland.c @@ -301,7 +301,7 @@ wayland_output_get_shm_buffer(struct wayland_output *output) struct wl_shm_pool *pool; int width, height, stride; - struct weston_geometry area; + int32_t fx, fy; int fd; unsigned char *data; @@ -377,20 +377,13 @@ wayland_output_get_shm_buffer(struct wayland_output *output) cairo_image_surface_create_for_data(data, CAIRO_FORMAT_ARGB32, width, height, stride); - if (output->frame) { - frame_interior(output->frame, &area.x, &area.y, - &area.width, &area.height); - } else { - area.x = 0; - area.y = 0; - area.width = output->base.current_mode->width; - area.height = output->base.current_mode->height; - } - - /* Address only the interior, excluding output decorations */ + fx = 0; + fy = 0; + if (output->frame) + frame_interior(output->frame, &fx, &fy, 0, 0); sb->pm_image = - pixman_image_create_bits(PIXMAN_a8r8g8b8, area.width, area.height, - (uint32_t *)(data + area.y * stride) + area.x, + pixman_image_create_bits(PIXMAN_a8r8g8b8, width, height, + (uint32_t *)(data + fy * stride) + fx, stride); return sb;