[PATCH weston 8/8] simple-touch: use proper damage in touch_paint()

Kristian Høgsberg hoegsberg at gmail.com
Tue Jul 31 19:22:48 PDT 2012


On Tue, Jul 31, 2012 at 01:21:13PM +0300, Pekka Paalanen wrote:
> Should reduce update overhead.

Nice.

Kristian

> Signed-off-by: Pekka Paalanen <ppaalanen at gmail.com>
> ---
>  clients/simple-touch.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/clients/simple-touch.c b/clients/simple-touch.c
> index f8afbb0..6087fe4 100644
> --- a/clients/simple-touch.c
> +++ b/clients/simple-touch.c
> @@ -141,7 +141,7 @@ touch_paint(struct touch *touch, int32_t x, int32_t y, int32_t id)
>  	p += touch->width;
>  	p[2] = c;
>  
> -	wl_surface_damage(touch->surface, 0, 0, touch->width, touch->height);
> +	wl_surface_damage(touch->surface, x - 2, y - 2, 5, 5);
>  }
>  
>  static void
> -- 
> 1.7.8.6
> 


More information about the wayland-devel mailing list