xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Fri Apr 15 20:35:36 UTC 2016


 glamor/glamor_compositerects.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 8437955515ad59b0bfcd6598248e7f0ffc706370
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Thu Mar 17 09:53:58 2016 +0100

    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 at redhat.com>
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>

diff --git a/glamor/glamor_compositerects.c b/glamor/glamor_compositerects.c
index 885a6c0..199e627 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(&region)->x2, RegionExtents(&region)->y2,
            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,
-           RegionExtents(&region)->x1, RegionExtents(&region)->y1,
-           RegionExtents(&region)->x2, RegionExtents(&region)->y2);
-
     boxes = pixman_region_rectangles(&region, &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(&region, dst_x, dst_y);
+
+        DEBUGF("%s: pixmap +(%d, %d) extents (%d, %d),(%d, %d)\n",
+               __FUNCTION__, dst_x, dst_y,
+               RegionExtents(&region)->x1, RegionExtents(&region)->y1,
+               RegionExtents(&region)->x2, RegionExtents(&region)->y2);
 
         if (op == PictOpClear)
             pixel = 0;


More information about the xorg-commit mailing list