[Glamor] [PATCH 2/3] glamor_fill/tile: Fixed a tileX/tileY calculation bug.
zhigang.gong at linux.intel.com
zhigang.gong at linux.intel.com
Thu Feb 2 20:00:17 PST 2012
From: Zhigang Gong <zhigang.gong at linux.intel.com>
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 <zhigang.gong at linux.intel.com>
---
src/glamor_fill.c | 5 ++---
src/glamor_tile.c | 7 -------
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/glamor_fill.c b/src/glamor_fill.c
index df97ad0..b462f59 100644
--- a/src/glamor_fill.c
+++ b/src/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/src/glamor_tile.c b/src/glamor_tile.c
index 4ff4fa1..3087bea 100644
--- a/src/glamor_tile.c
+++ b/src/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;
--
1.7.4.4
More information about the Glamor
mailing list