summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-11-11 11:38:46 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-11-11 11:39:34 +0000
commitaa140ef1e62c349936be5f153e4be7688e129e63 (patch)
treec33952e6862f315a8fedbbf77328f7ed66156087 /src
parent3e81a9cbd68344450a6e82130edfef21dd04ec43 (diff)
sna: Add a couple more asserts to track a potential NULL gc->pCompositeClip
References: https://bugs.freedesktop.org/show_bug.cgi?id=71415 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_accel.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index b1dc2f70..9cff1dec 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -3942,6 +3942,8 @@ static bool must_check sna_gc_move_to_cpu(GCPtr gc,
long changes = sgc->changes;
DBG(("%s, changes=%lx\n", __FUNCTION__, changes));
+ assert(drawable);
+ assert(region);
assert(gc->ops == (GCOps *)&sna_gc_ops);
gc->ops = (GCOps *)&sna_gc_ops__cpu;
@@ -3949,6 +3951,7 @@ static bool must_check sna_gc_move_to_cpu(GCPtr gc,
sgc->old_funcs = gc->funcs;
gc->funcs = (GCFuncs *)&sna_gc_funcs__cpu;
+ assert(gc->pCompositeClip);
sgc->priv = gc->pCompositeClip;
gc->pCompositeClip = region;
@@ -3983,7 +3986,6 @@ static bool must_check sna_gc_move_to_cpu(GCPtr gc,
fbValidateGC(gc, changes, drawable);
- gc->serialNumber = drawable->serialNumber;
sgc->serial = drawable->serialNumber;
}
sgc->changes = 0;
@@ -4009,6 +4011,7 @@ static void sna_gc_move_to_gpu(GCPtr gc)
gc->ops = (GCOps *)&sna_gc_ops;
gc->funcs = sna_gc(gc)->old_funcs;
gc->pCompositeClip = sna_gc(gc)->priv;
+ assert(gc->pCompositeClip);
}
static inline bool clip_box(BoxPtr box, GCPtr gc)
@@ -4016,6 +4019,7 @@ static inline bool clip_box(BoxPtr box, GCPtr gc)
const BoxRec *clip;
bool clipped;
+ assert(gc->pCompositeClip);
clip = &gc->pCompositeClip->extents;
clipped = !region_is_singular(gc->pCompositeClip);