From cd7801aa958342e26d2ed39f6271583220b6ba27 Mon Sep 17 00:00:00 2001 From: Maciej Pijanowski Date: Mon, 19 Oct 2020 18:58:35 +0200 Subject: [PATCH] screen-share: use compositor->read_format with renderer->read_pixels() The pixel format was hardcoded to PIXMAN_a8r8g8b8. All other renderer->read_pixels() calls in weston use dynamic format selection via the compositor->read_format instead. The problem was spotted on the ARM devices with Mali-400 GPU. The visual effect of the problem was black screen on the remote display, when using screen-share with the VNC or RDP backends. Related wayland-devel thread: https://lists.freedesktop.org/archives/wayland-devel/2020-September/041624.html Signed-off-by: Maciej Pijanowski --- compositor/screen-share.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compositor/screen-share.c b/compositor/screen-share.c index 10173b92..0c2f413d 100644 --- a/compositor/screen-share.c +++ b/compositor/screen-share.c @@ -882,8 +882,8 @@ shared_output_repainted(struct wl_listener *listener, void *data) y_orig = y; so->output->compositor->renderer->read_pixels( - so->output, PIXMAN_a8r8g8b8, so->tmp_data, - x, y_orig, width, height); + so->output, so->output->compositor->read_format, + so->tmp_data, x, y_orig, width, height); damaged_image = pixman_image_create_bits(PIXMAN_a8r8g8b8, width, height,