[Glamor] [PATCH] Fix RegionContainsRect test for PutImage

Zhigang Gong zhigang.gong at linux.intel.com
Tue Sep 17 19:11:24 PDT 2013


Nice catch, pushed, thanks.

On Tue, Sep 17, 2013 at 01:25:02PM +0200, Michel Dänzer wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
> 
> The return value of RegionContainsRect() is not a boolean but an enum
> indicating that the region contains the rectangle completely, partially
> or not at all. We can only take the PutImage fastpath when the region
> contatins the rectangle completely.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65964
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
>  src/glamor_putimage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/glamor_putimage.c b/src/glamor_putimage.c
> index 34e86a1..6567f14 100644
> --- a/src/glamor_putimage.c
> +++ b/src/glamor_putimage.c
> @@ -287,7 +287,7 @@ _glamor_put_image(DrawablePtr drawable, GCPtr gc, int depth, int x, int y,
>  	box.x2 = x + w + drawable->x;
>  	box.y2 = y + h + drawable->y;
>  
> -	if ((clip != NULL && !RegionContainsRect(clip, &box))
> +	if ((clip != NULL && RegionContainsRect(clip, &box) != rgnIN)
>  	     || gc->alu != GXcopy) {
>  		temp_pixmap = glamor_create_pixmap(drawable->pScreen, w, h, depth, 0);
>  		if (temp_pixmap == NULL)
> -- 
> 1.8.4.rc3
> 
> _______________________________________________
> Glamor mailing list
> Glamor at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/glamor


More information about the Glamor mailing list