summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-01-20 20:47:15 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-01-20 21:36:38 +0000
commit50f6701aa5ce8be96e216a942880a8db967c7a6a (patch)
tree47e49cb3e0d83cf5c133159282c4cb416f81c4e2
parent4c7b183fd21b461f9f18662c3b9d9732b6bef13d (diff)
sna: Include serial numbers in ValidateGC DBG
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index c4314178..7376d1ef 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;
}