diff --git a/glamor/glamor_compositerects.c b/glamor/glamor_compositerects.c index 199e62705..0796fed41 100644 --- a/glamor/glamor_compositerects.c +++ b/glamor/glamor_compositerects.c @@ -227,12 +227,10 @@ glamor_composite_rectangles(CARD8 op, boxes = pixman_region_rectangles(®ion, &num_boxes); if (op == PictOpSrc || op == PictOpClear) { CARD32 pixel; - int dst_x, dst_y; - glamor_get_drawable_deltas(dst->pDrawable, pixmap, &dst_x, &dst_y); - pixman_region_translate(®ion, dst_x, dst_y); + pixman_region_translate(®ion, -dst->pDrawable->x, -dst->pDrawable->y); - DEBUGF("%s: pixmap +(%d, %d) extents (%d, %d),(%d, %d)\n", + DEBUGF("%s: drawable extents (%d, %d),(%d, %d)\n", __FUNCTION__, dst_x, dst_y, RegionExtents(®ion)->x1, RegionExtents(®ion)->y1, RegionExtents(®ion)->x2, RegionExtents(®ion)->y2); @@ -241,7 +239,7 @@ glamor_composite_rectangles(CARD8 op, pixel = 0; else miRenderColorToPixel(dst->pFormat, color, &pixel); - glamor_solid_boxes(pixmap, boxes, num_boxes, pixel); + glamor_solid_boxes(dst->pDrawable, boxes, num_boxes, pixel); goto done; } diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index 2f787015d..898380d82 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -895,7 +895,7 @@ glamor_solid(PixmapPtr pixmap, int x, int y, int width, int height, unsigned long fg_pixel); void -glamor_solid_boxes(PixmapPtr pixmap, +glamor_solid_boxes(DrawablePtr drawable, BoxPtr box, int nbox, unsigned long fg_pixel); diff --git a/glamor/glamor_text.c b/glamor/glamor_text.c index a559aea8a..5343cc93b 100644 --- a/glamor/glamor_text.c +++ b/glamor/glamor_text.c @@ -432,7 +432,6 @@ glamor_image_text(DrawablePtr drawable, GCPtr gc, int c; RegionRec region; BoxRec box; - int off_x, off_y; /* Check planemask before drawing background to * bail early if it's not OK @@ -443,8 +442,6 @@ glamor_image_text(DrawablePtr drawable, GCPtr gc, if (charinfo[c]) width += charinfo[c]->metrics.characterWidth; - glamor_get_drawable_deltas(drawable, pixmap, &off_x, &off_y); - if (width >= 0) { box.x1 = drawable->x + x; box.x2 = drawable->x + x + width; @@ -456,8 +453,8 @@ glamor_image_text(DrawablePtr drawable, GCPtr gc, box.y2 = drawable->y + y + gc->font->info.fontDescent; RegionInit(®ion, &box, 1); RegionIntersect(®ion, ®ion, gc->pCompositeClip); - RegionTranslate(®ion, off_x, off_y); - glamor_solid_boxes(pixmap, RegionRects(®ion), RegionNumRects(®ion), gc->bgPixel); + RegionTranslate(®ion, -drawable->x, -drawable->y); + glamor_solid_boxes(drawable, RegionRects(®ion), RegionNumRects(®ion), gc->bgPixel); RegionUninit(®ion); } diff --git a/glamor/glamor_utils.c b/glamor/glamor_utils.c index d3e6fd3ff..8f085da3f 100644 --- a/glamor/glamor_utils.c +++ b/glamor/glamor_utils.c @@ -23,10 +23,9 @@ #include "glamor_priv.h" void -glamor_solid_boxes(PixmapPtr pixmap, +glamor_solid_boxes(DrawablePtr drawable, BoxPtr box, int nbox, unsigned long fg_pixel) { - DrawablePtr drawable = &pixmap->drawable; GCPtr gc; xRectangle *rect; int n;