From 14503fbb819d07fa2b58d9bb741b55f93aff2cf6 Mon Sep 17 00:00:00 2001 From: Zhigang Gong Date: Thu, 30 Jun 2011 16:38:43 +0800 Subject: [PATCH] glamor: Fix the coords calculation in glamor_fill. glamor_fill is only called from internal functions glamor_fillspancs and glamor_polyfillrect. And both functions already add the offset to the coords, so the coords are already relative value, we can't add the offset once again. Signed-off-by: Zhigang Gong --- glamor/glamor_fill.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/glamor/glamor_fill.c b/glamor/glamor_fill.c index 48f85ce38..a41837b3a 100644 --- a/glamor/glamor_fill.c +++ b/glamor/glamor_fill.c @@ -41,14 +41,12 @@ glamor_fill(DrawablePtr drawable, int height) { PixmapPtr dst_pixmap = glamor_get_drawable_pixmap(drawable); - int x_off, y_off; - glamor_get_drawable_deltas(drawable, dst_pixmap, &x_off, &y_off); switch (gc->fillStyle) { case FillSolid: if (!glamor_solid(dst_pixmap, - x + x_off, - y + y_off, + x, + y, width, height, gc->alu, @@ -60,24 +58,24 @@ glamor_fill(DrawablePtr drawable, case FillOpaqueStippled: if (!glamor_stipple(dst_pixmap, gc->stipple, - x+ x_off, - y + y_off, + x, + y, width, height, gc->alu, gc->planemask, gc->fgPixel, gc->bgPixel, - gc->patOrg.x + x_off, - gc->patOrg.y + y_off)) + gc->patOrg.x, + gc->patOrg.y)) goto fail; return; break; case FillTiled: if (!glamor_tile(dst_pixmap, gc->tile.pixmap, - x + x_off, - y + y_off, + x, + y, width, height, gc->alu,