From 91891b3711b1fe1402bb7742c20e976fab63c6fe Mon Sep 17 00:00:00 2001 From: Zhigang Gong Date: Fri, 3 Feb 2012 11:44:51 +0800 Subject: [PATCH] glamor_fill/tile: Fixed a tileX/tileY calculation bug. The previous's calculation is incorrect, now fix it and then we don't need to fallback at glamor_tile. Signed-off-by: Zhigang Gong Tested-by: Peng Li --- glamor/glamor_fill.c | 5 ++--- glamor/glamor_tile.c | 7 ------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/glamor/glamor_fill.c b/glamor/glamor_fill.c index df97ad018b..b462f59223 100644 --- a/glamor/glamor_fill.c +++ b/glamor/glamor_fill.c @@ -31,7 +31,6 @@ * * GC fill implementation, based loosely on fb_fill.c */ - Bool glamor_fill(DrawablePtr drawable, GCPtr gc, int x, int y, int width, int height, Bool fallback) @@ -74,8 +73,8 @@ glamor_fill(DrawablePtr drawable, height, gc->alu, gc->planemask, - drawable->x + x + off_x - gc->patOrg.x, - drawable->y + y + off_y - gc->patOrg.y)) + x - drawable->x - gc->patOrg.x, + y - drawable->y - gc->patOrg.y)) goto fail; break; } diff --git a/glamor/glamor_tile.c b/glamor/glamor_tile.c index 4ff4fa15f2..3087bea6ed 100644 --- a/glamor/glamor_tile.c +++ b/glamor/glamor_tile.c @@ -124,13 +124,6 @@ glamor_tile(PixmapPtr pixmap, PixmapPtr tile, if (src_pixmap_priv == NULL || dst_pixmap_priv == NULL) goto fail; - if (((tile_x != 0) && (tile_x + width > tile->drawable.width)) - || ((tile_y != 0) - && (tile_y + height > tile->drawable.height))) { - /* XXX We can recreate a new pixmap here to avoid partial tiling. */ - goto fail; - } - if (glamor_priv->tile_prog == 0) { glamor_fallback("Tiling unsupported\n"); goto fail;