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 <maciej.pijanowski@3mdeb.com>
dev
Maciej Pijanowski 4 years ago committed by Daniel Stone
parent f2d6d21eec
commit cd7801aa95
  1. 4
      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,

Loading…
Cancel
Save