diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-21 09:05:54 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-21 09:22:21 +0000 |
commit | b9ebb016833df5b70336c66993a871e850fd0f61 (patch) | |
tree | 9af72c91f8c1088479ac480a3618c99007a6a611 /src | |
parent | f7121bf733e9b02248fa0b7bb62a902622dd8f10 (diff) |
sna: More assertions for tracking gc->pCompositeClip
Tracking down who leaves it modified...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/fb/fbpush.c | 2 | ||||
-rw-r--r-- | src/sna/sna_accel.c | 17 |
2 files changed, 13 insertions, 6 deletions
diff --git a/src/sna/fb/fbpush.c b/src/sna/fb/fbpush.c index c53f0adf..8357b5e7 100644 --- a/src/sna/fb/fbpush.c +++ b/src/sna/fb/fbpush.c @@ -144,7 +144,7 @@ fbPushImage(DrawablePtr drawable, GCPtr gc, struct fbPushImage data; BoxRec box; - DBG(("%s (%d, %d)x(%d, %d)", __FUNCTION__, x, y, width, height)); + DBG(("%s (%d, %d)x(%d, %d)\n", __FUNCTION__, x, y, width, height)); data.src = src; data.stride = stride; diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 7376d1ef..0b2b4c36 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2366,7 +2366,8 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable, priv = sna_pixmap(pixmap); if (priv == NULL) { - DBG(("%s: not attached to %p\n", __FUNCTION__, pixmap)); + DBG(("%s: not attached to pixmap %ld (depth %d)\n", + __FUNCTION__, pixmap->drawable.serialNumber, pixmap->drawable.depth)); return true; } @@ -3996,7 +3997,7 @@ static bool must_check sna_gc_move_to_cpu(GCPtr gc, struct sna_gc *sgc = sna_gc(gc); long changes = sgc->changes; - DBG(("%s, changes=%lx\n", __FUNCTION__, changes)); + DBG(("%s(%p) changes=%lx\n", __FUNCTION__, gc, changes)); assert(drawable); assert(region); @@ -4061,6 +4062,8 @@ static bool must_check sna_gc_move_to_cpu(GCPtr gc, static void sna_gc_move_to_gpu(GCPtr gc) { + DBG(("%s(%p)\n", __FUNCTION__, gc)); + assert(gc->ops == (GCOps *)&sna_gc_ops__cpu); assert(gc->funcs == (GCFuncs *)&sna_gc_funcs__cpu); @@ -6335,6 +6338,7 @@ sna_do_copy(DrawablePtr src, DrawablePtr dst, GCPtr gc, if (!box_empty(®ion.extents)) copy(src, dst, gc, ®ion, sx-dx, sy-dy, bitPlane, closure); + assert(gc->pCompsiteClip != ®ion); RegionUninit(®ion); /* Pixmap sources generate a NoExposed (we return NULL to do this) */ @@ -15704,21 +15708,24 @@ static GCOps sna_gc_ops__tmp = { static void sna_validate_gc(GCPtr gc, unsigned long changes, DrawablePtr drawable) { - DBG(("%s changes=%lx, previous serial=%lx, drawable=%lx\n", __FUNCTION__, + DBG(("%s(%p) changes=%lx, previous serial=%lx, drawable=%lx\n", __FUNCTION__, gc, changes, gc->serialNumber, drawable->serialNumber)); + assert(gc->pCompositeClip != sna_gc(gc)->priv); + if (changes & (GCClipMask|GCSubwindowMode) || drawable->serialNumber != (gc->serialNumber & DRAWABLE_SERIAL_BITS) || (gc->clientClipType != CT_NONE && (changes & (GCClipXOrigin | GCClipYOrigin)))) { DBG(("%s: recomputing clip\n", __FUNCTION__)); miComputeCompositeClip(gc, drawable); - DBG(("%s: composite clip=%ldx[(%d, %d), (%d, %d)]\n", + DBG(("%s: composite clip=%ldx[(%d, %d), (%d, %d)] [%p]\n", __FUNCTION__, (long)RegionNumRects(gc->pCompositeClip), gc->pCompositeClip->extents.x1, gc->pCompositeClip->extents.y1, gc->pCompositeClip->extents.x2, - gc->pCompositeClip->extents.y2)); + gc->pCompositeClip->extents.y2, + gc->pCompositeClip)); } assert(gc->pCompositeClip); |