diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2016-03-17 09:53:58 +0100 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2016-04-15 16:31:36 -0400 |
commit | 8437955515ad59b0bfcd6598248e7f0ffc706370 (patch) | |
tree | ff317efd360a5b9a6533c972f84deefeb9dc0214 | |
parent | e8e5d839968e22cf42a6e1982a07b02c6f4a4562 (diff) |
glamor: fix wrong offset on composite rectangles
When using PictOpSrc, the destination is wrongly shifted back to (0, 0).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94568
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-rw-r--r-- | glamor/glamor_compositerects.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/glamor/glamor_compositerects.c b/glamor/glamor_compositerects.c index 885a6c065..199e62705 100644 --- a/glamor/glamor_compositerects.c +++ b/glamor/glamor_compositerects.c @@ -107,7 +107,6 @@ glamor_composite_rectangles(CARD8 op, struct glamor_pixmap_private *priv; pixman_region16_t region; pixman_box16_t *boxes; - int dst_x, dst_y; int num_boxes; PicturePtr source = NULL; Bool need_free_region = FALSE; @@ -225,17 +224,18 @@ glamor_composite_rectangles(CARD8 op, RegionExtents(®ion)->x2, RegionExtents(®ion)->y2, RegionNumRects(®ion)); - glamor_get_drawable_deltas(dst->pDrawable, pixmap, &dst_x, &dst_y); - pixman_region_translate(®ion, dst_x, dst_y); - - DEBUGF("%s: pixmap +(%d, %d) extents (%d, %d),(%d, %d)\n", - __FUNCTION__, dst_x, dst_y, - RegionExtents(®ion)->x1, RegionExtents(®ion)->y1, - RegionExtents(®ion)->x2, RegionExtents(®ion)->y2); - 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); + + DEBUGF("%s: pixmap +(%d, %d) extents (%d, %d),(%d, %d)\n", + __FUNCTION__, dst_x, dst_y, + RegionExtents(®ion)->x1, RegionExtents(®ion)->y1, + RegionExtents(®ion)->x2, RegionExtents(®ion)->y2); if (op == PictOpClear) pixel = 0; |