xf86-video-intel: src/sna/sna_composite.c

Chris Wilson ickle at kemper.freedesktop.org
Thu Oct 24 07:45:38 PDT 2013


 src/sna/sna_composite.c |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 2b6cb1cf45cff2bb4383bd6bf50aec0af8895079
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Oct 24 15:42:12 2013 +0100

    sna: Do not apply drawable offsets to DamageRegionAppend
    
    DamageRegionAppend() will itself apply the drawable offsets, so we need
    to pass it the untransformed region. This also fixes an issue where we
    might fallback without applying any Damage.
    
    Reported-by: Christian Nassau <nassau at nullhomotopie.de>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32734
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index 200a207..3174639 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -906,9 +906,16 @@ sna_composite_rectangles(CARD8		 op,
 	     (long)RegionNumRects(&region)));
 
 	pixmap = get_drawable_pixmap(dst->pDrawable);
-	if (get_drawable_deltas(dst->pDrawable, pixmap, &dst_x, &dst_y)) {
+
+	/* XXX xserver-1.8: CompositeRects is not tracked by Damage, so we must
+	 * manually append the damaged regions ourselves.
+	 *
+	 * Note that DamageRegionAppend() will apply the drawable-deltas itself.
+	 */
+	DamageRegionAppend(&pixmap->drawable, &region);
+
+	if (get_drawable_deltas(dst->pDrawable, pixmap, &dst_x, &dst_y))
 		pixman_region_translate(&region, dst_x, dst_y);
-	}
 
 	DBG(("%s: pixmap +(%d, %d) extents (%d, %d),(%d, %d)\n",
 	     __FUNCTION__, dst_x, dst_y,
@@ -934,11 +941,6 @@ sna_composite_rectangles(CARD8		 op,
 		goto fallback;
 	}
 
-	/* XXX xserver-1.8: CompositeRects is not tracked by Damage, so we must
-	 * manually append the damaged regions ourselves.
-	 */
-	DamageRegionAppend(&pixmap->drawable, &region);
-
 	/* If we going to be overwriting any CPU damage with a subsequent
 	 * operation, then we may as well delete it without moving it
 	 * first to the GPU.


More information about the xorg-commit mailing list