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>
This commit is contained in:
parent
e8e5d83996
commit
8437955515
|
@ -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,6 +224,11 @@ glamor_composite_rectangles(CARD8 op,
|
|||
RegionExtents(®ion)->x2, RegionExtents(®ion)->y2,
|
||||
RegionNumRects(®ion));
|
||||
|
||||
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);
|
||||
|
||||
|
@ -233,10 +237,6 @@ glamor_composite_rectangles(CARD8 op,
|
|||
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;
|
||||
|
||||
if (op == PictOpClear)
|
||||
pixel = 0;
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user