[PATCH xserver] glamor: fix wrong offset on composite rectangles

Olivier Fourdan ofourdan at redhat.com
Thu Mar 17 08:44:17 UTC 2016


When using PictOpSrc, the destination is wrongly shifted back to (0, 0).

Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
---
 glamor/glamor_compositerects.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/glamor/glamor_compositerects.c b/glamor/glamor_compositerects.c
index 885a6c0..ff8dce4 100644
--- a/glamor/glamor_compositerects.c
+++ b/glamor/glamor_compositerects.c
@@ -226,7 +226,6 @@ glamor_composite_rectangles(CARD8 op,
            RegionNumRects(&region));
 
     glamor_get_drawable_deltas(dst->pDrawable, pixmap, &dst_x, &dst_y);
-    pixman_region_translate(&region, dst_x, dst_y);
 
     DEBUGF("%s: pixmap +(%d, %d) extents (%d, %d),(%d, %d)\n",
            __FUNCTION__, dst_x, dst_y,
@@ -237,6 +236,7 @@ glamor_composite_rectangles(CARD8 op,
     if (op == PictOpSrc || op == PictOpClear) {
         CARD32 pixel;
 
+        pixman_region_translate(&region, dst_x, dst_y);
         if (op == PictOpClear)
             pixel = 0;
         else
-- 
2.5.0



More information about the xorg-devel mailing list