Revert "move frame_signal emission to weston_output_repaint()"

The emission of frame_signal has to happen before a flip, otherwise
glReadPixels() could read an old frame or even worse an uninitialized buffer.
So move frame_signal emission back to renderers.

This reverts commit 2619bfe420.

Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
dev
Leandro Ribeiro 5 years ago
parent abdb0a29f2
commit 914c96c3d2
  1. 1
      libweston/compositor.c
  2. 1
      libweston/pixman-renderer.c
  3. 1
      libweston/renderer-gl/gl-renderer.c

@ -2723,7 +2723,6 @@ weston_output_repaint(struct weston_output *output, void *repaint_data)
weston_output_update_matrix(output);
r = output->repaint(output, &output_damage, repaint_data);
wl_signal_emit(&output->frame_signal, &output_damage);
pixman_region32_fini(&output_damage);

@ -580,6 +580,7 @@ pixman_renderer_repaint_output(struct weston_output *output,
pixman_region32_fini(&hw_damage);
pixman_region32_copy(&output->previous_damage, output_damage);
wl_signal_emit(&output->frame_signal, output);
/* Actual flip should be done by caller */
}

@ -1474,6 +1474,7 @@ gl_renderer_repaint_output(struct weston_output *output,
draw_output_borders(output, border_status);
pixman_region32_copy(&output->previous_damage, output_damage);
wl_signal_emit(&output->frame_signal, output);
go->end_render_sync = create_render_sync(gr);

Loading…
Cancel
Save