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 <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 4 years ago
parent 7f1a113c89
commit b4f91edb5e
  1. 2
      libweston/screenshooter.c

@ -209,7 +209,7 @@ weston_screenshooter_shoot(struct weston_output *output,
l->listener.notify = screenshooter_frame_notify; l->listener.notify = screenshooter_frame_notify;
wl_signal_add(&output->frame_signal, &l->listener); wl_signal_add(&output->frame_signal, &l->listener);
weston_output_disable_planes_incr(output); weston_output_disable_planes_incr(output);
weston_output_damage(output); weston_output_schedule_repaint(output);
return 0; return 0;
} }

Loading…
Cancel
Save