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:
@@ -2723,7 +2723,6 @@ weston_output_repaint(struct weston_output *output, void *repaint_data)
|
|||||||
weston_output_update_matrix(output);
|
weston_output_update_matrix(output);
|
||||||
|
|
||||||
r = output->repaint(output, &output_damage, repaint_data);
|
r = output->repaint(output, &output_damage, repaint_data);
|
||||||
wl_signal_emit(&output->frame_signal, &output_damage);
|
|
||||||
|
|
||||||
pixman_region32_fini(&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_fini(&hw_damage);
|
||||||
|
|
||||||
pixman_region32_copy(&output->previous_damage, output_damage);
|
pixman_region32_copy(&output->previous_damage, output_damage);
|
||||||
|
wl_signal_emit(&output->frame_signal, output);
|
||||||
|
|
||||||
/* Actual flip should be done by caller */
|
/* 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);
|
draw_output_borders(output, border_status);
|
||||||
|
|
||||||
pixman_region32_copy(&output->previous_damage, output_damage);
|
pixman_region32_copy(&output->previous_damage, output_damage);
|
||||||
|
wl_signal_emit(&output->frame_signal, output);
|
||||||
|
|
||||||
go->end_render_sync = create_render_sync(gr);
|
go->end_render_sync = create_render_sync(gr);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user