From b4f91edb5e27610b38607858f2694508a8f1950d Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 4 Dec 2020 15:36:48 +0200 Subject: [PATCH] libweston: do not damage on screenshot If full output damage is forced every time a screenshot is taken, the test suite cannot take screenshots of damage as that would depend on repainting only the damaged area. Stop damaging the output and instead just schedule a repaint so the screenshot can be taken. This is safe because: - if any views were promoted to hw planes previously, weston_output_disable_planes_incr() would force them to be demoted at assing_planes() time causing damage via weston_view_move_to_plane() - even when hardware primary plane has no damage, DRM-backend will not skip calling to the renderer after commit "drm-backend: do not skip renderer if capturing screen". Signed-off-by: Pekka Paalanen --- libweston/screenshooter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libweston/screenshooter.c b/libweston/screenshooter.c index 4ea519bd..fedc4805 100644 --- a/libweston/screenshooter.c +++ b/libweston/screenshooter.c @@ -209,7 +209,7 @@ weston_screenshooter_shoot(struct weston_output *output, l->listener.notify = screenshooter_frame_notify; wl_signal_add(&output->frame_signal, &l->listener); weston_output_disable_planes_incr(output); - weston_output_damage(output); + weston_output_schedule_repaint(output); return 0; }