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>
This commit is contained in:
Leandro Ribeiro 2019-12-03 12:22:11 -03:00
parent abdb0a29f2
commit 914c96c3d2
3 changed files with 2 additions and 1 deletions

View File

@ -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);

View File

@ -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 */
}

View File

@ -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);