[PATCH] gl-renderer: emit frame_signal after eglSwapBuffers

Pekka Paalanen ppaalanen at gmail.com
Tue Aug 16 08:18:18 UTC 2016


On Fri, 12 Aug 2016 14:11:40 +0200
Fabien Dessenne <fabien.dessenne at st.com> wrote:

> Emit frame_signal at the end of the GL renderer processing, so the
> frame_signal clients are informed after the buffer is actually updated.
> 
> Signed-off-by: Fabien Dessenne <fabien.dessenne at st.com>
> ---
>  libweston/gl-renderer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
> index d624453..f4d4a5e 100644
> --- a/libweston/gl-renderer.c
> +++ b/libweston/gl-renderer.c
> @@ -1138,7 +1138,6 @@ gl_renderer_repaint_output(struct weston_output *output,
>  	draw_output_borders(output, border_damage);
>  
>  	pixman_region32_copy(&output->previous_damage, output_damage);
> -	wl_signal_emit(&output->frame_signal, output);
>  
>  	if (gr->swap_buffers_with_damage) {
>  		pixman_region32_init(&buffer_damage);
> @@ -1185,6 +1184,7 @@ gl_renderer_repaint_output(struct weston_output *output,
>  	}
>  
>  	go->border_status = BORDER_STATUS_CLEAN;
> +	wl_signal_emit(&output->frame_signal, output);
>  }
>  
>  static int

Hi,

I think this will break screenshooting.

Screenshooter relies on glReadPixels, but if you issue eglSwapBuffers
first, you no longer know what glReadPixels will return. Therefore the
signal must be emitted before the swapbuffers.

You forgot to explain what problem this change solves, too. I only see
it breaking things.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160816/8462c4dc/attachment-0001.sig>


More information about the wayland-devel mailing list