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

Chris Wilson ickle at kemper.freedesktop.org
Mon Jan 20 13:37:22 PST 2014


 src/sna/sna_accel.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 50f6701aa5ce8be96e216a942880a8db967c7a6a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Jan 20 20:47:15 2014 +0000

    sna: Include serial numbers in ValidateGC DBG
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index c431417..7376d1e 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -15704,7 +15704,8 @@ static GCOps sna_gc_ops__tmp = {
 static void
 sna_validate_gc(GCPtr gc, unsigned long changes, DrawablePtr drawable)
 {
-	DBG(("%s changes=%lx\n", __FUNCTION__, changes));
+	DBG(("%s changes=%lx, previous serial=%lx, drawable=%lx\n", __FUNCTION__,
+	     changes, gc->serialNumber, drawable->serialNumber));
 
 	if (changes & (GCClipMask|GCSubwindowMode) ||
 	    drawable->serialNumber != (gc->serialNumber & DRAWABLE_SERIAL_BITS) ||
@@ -15721,6 +15722,10 @@ sna_validate_gc(GCPtr gc, unsigned long changes, DrawablePtr drawable)
 	}
 
 	assert(gc->pCompositeClip);
+	assert(RegionNil(gc->pCompositeClip) || gc->pCompositeClip->extents.x1 >= drawable->x);
+	assert(RegionNil(gc->pCompositeClip) || gc->pCompositeClip->extents.y1 >= drawable->y);
+	assert(RegionNil(gc->pCompositeClip) || gc->pCompositeClip->extents.x2 - drawable->x <= drawable->width);
+	assert(RegionNil(gc->pCompositeClip) || gc->pCompositeClip->extents.y2 - drawable->y <= drawable->height);
 
 	sna_gc(gc)->changes |= changes;
 }


More information about the xorg-commit mailing list