From 61fca4342a65be2dbc7f890f2e67da56a50db978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 17 Sep 2013 13:25:02 +0200 Subject: [PATCH] Fix RegionContainsRect test for PutImage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Zhigang Gong --- glamor/glamor_putimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glamor/glamor_putimage.c b/glamor/glamor_putimage.c index 34e86a147..6567f1406 100644 --- a/glamor/glamor_putimage.c +++ b/glamor/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)