[Glamor] [PATCH] Fix translation of clip region for composite fallback.

Zhigang Gong zhigang.gong at linux.intel.com
Wed Jul 11 00:28:07 PDT 2012


> -----Original Message-----
> From:
> glamor-bounces+zhigang.gong=linux.intel.com at lists.freedesktop.org
> [mailto:glamor-bounces+zhigang.gong=linux.intel.com at lists.freedesktop.o
> rg] On Behalf Of Michel D?nzer
> Sent: Tuesday, July 10, 2012 11:57 PM
> To: glamor at lists.freedesktop.org
> Subject: [Glamor] [PATCH] Fix translation of clip region for composite
> fallback.
> 
> From: Michel Dänzer <michel.daenzer at amd.com>
> 
> Fixes incorrectly clipped rendering. E.g. the cursor in Evolution composer
> windows became invisible.
> 
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
>  src/glamor_render.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/glamor_render.c b/src/glamor_render.c index
> b33d969..f71ec55 100644
> --- a/src/glamor_render.c
> +++ b/src/glamor_render.c
> @@ -1822,13 +1822,13 @@ fail:
>  					      width, height, access);			\
>  	if (sub_ ##p ##_pixmap != NULL) {						\
>  		saved_ ##p ##_drawable = p->pDrawable;
> 	\
> -		p->pDrawable = &sub_ ##p ##_pixmap->drawable;
> 	\
>  		saved_ ##p ##_x = x_ ##p;						\
>  		saved_ ##p ##_y = y_ ##p;						\
>  		if (p->pCompositeClip)							\
>  			pixman_region_translate (p->pCompositeClip,			\
>  						 -p->pDrawable->x - x_ ##p,		\
>  						 -p->pDrawable->y - y_ ##p);		\
> +		p->pDrawable = &sub_ ##p ##_pixmap->drawable;
> 	\
>  		x_ ##p = 0;								\
>  		y_ ##p = 0;								\
>  	} } while(0)
> @@ -1863,11 +1863,11 @@ full_fallback:
>  	if (sub_ ##p ##_pixmap != NULL) {					\
>  		x_ ##p = saved_ ##p ##_x;					\
>  		y_ ##p = saved_ ##p ##_y;					\
> +		p->pDrawable = saved_ ##p ##_drawable;				\
>  		if (p->pCompositeClip)						\
>  			pixman_region_translate (p->pCompositeClip,		\
>  						 p->pDrawable->x + x_ ##p,	\
>  						 p->pDrawable->y + y_ ##p);	\
> -		p->pDrawable = saved_ ##p ##_drawable;				\
>  		glamor_put_sub_pixmap(sub_ ##p ##_pixmap, p ##_pixmap,
> 	\
>  				      x_ ##p + p ##_x_off + p->pDrawable->x,	\
>  				      y_ ##p + p ##_y_off + p->pDrawable->y,	\
> --
> 1.7.10.4
> 
> 
> _______________________________________________
> Glamor mailing list
> Glamor at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/glamor

Thanks for the patch, merged.  But I'm a little interested in how it hit the fallback path,
could you let me know detail? Thx.



More information about the Glamor mailing list