Commit 91891b37 authored by Zhigang Gong's avatar Zhigang Gong Committed by Eric Anholt

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: default avatarZhigang Gong <zhigang.gong@linux.intel.com>
Tested-by: default avatarPeng Li <peng.li@intel.com>
parent 39d9e6c6
......@@ -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;
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment