[PATCH weston 2/2] compositor: Skip repaint delay for nested compositors

Bryce Harrington bryce at osg.samsung.com
Thu Apr 2 00:19:02 PDT 2015


On Wed, Apr 01, 2015 at 12:37:34PM -0500, Derek Foreman wrote:
> The repaint delay becomes cumulative if it's used in both a parent
> compositor and a nested compositor.  This can lead to dropped frames
> and visible latency.
> 
> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
> ---
>  src/compositor.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/src/compositor.c b/src/compositor.c
> index 4de8fbf..433f6d2 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -2412,6 +2412,14 @@ weston_output_finish_frame(struct weston_output *output,
>  	msec = (refresh_nsec - timespec_to_nsec(&gone)) / 1000000; /* floor */
>  	msec -= compositor->repaint_msec;
>  
> +	/* If nested outputs try to use a repaint window the delay sums
> +	 * with the parent's delay and we start dropping frames...

Grammar seems off perhaps a semicolon is needed?

> +	 */
> +	if (compositor->nested) {
> +		output_repaint_timer_handler(output);
> +		return;
> +	}
> +
>  	if (msec < -1000 || msec > 1000) {
>  		static bool warned;

Otherwise, LGTM:

Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>

> -- 
> 2.1.4
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list