summaryrefslogtreecommitdiff
path: root/src/sna/sna_damage.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-01 01:33:52 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-01 09:19:03 +0000
commit55c7088f54655609fbb00106679a566b46ee8dba (patch)
tree1701c531b069b3e3fcfe6c7894b4e9b87e2f13f1 /src/sna/sna_damage.c
parentc8fc2cde53ef7aa011ec7c47e7fc5486de0651f5 (diff)
sna: Add debugging code to verify damage extents of fallback paths
After using the CPU, upload the damage and read back the pixels from the GPU bo and verify that the two are equivalent. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_damage.c')
-rw-r--r--src/sna/sna_damage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sna/sna_damage.c b/src/sna/sna_damage.c
index ab825aa5..f52ecace 100644
--- a/src/sna/sna_damage.c
+++ b/src/sna/sna_damage.c
@@ -514,8 +514,7 @@ static void __sna_damage_reduce(struct sna_damage *damage)
damage->extents = region->extents;
}
- if (free_boxes)
- free(boxes);
+ free(free_boxes);
done:
damage->mode = DAMAGE_ADD;
@@ -1048,6 +1047,7 @@ static struct sna_damage *__sna_damage_subtract(struct sna_damage *damage,
&damage->region,
region);
damage->extents = damage->region.extents;
+ assert(pixman_region_not_empty(&damage->region));
return damage;
}