summaryrefslogtreecommitdiff
path: root/test/imagediff.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-08-18 12:53:43 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-08-18 16:18:52 +0100
commit17fbb652b1c74ba0ccced48c14c63a4d24bb3891 (patch)
treed8204d532d21318140eb266c0a7a728e05b6b918 /test/imagediff.c
parent9b0b55cea724f91eb2835294f929c49224bd0bac (diff)
downloadcairo-17fbb652b1c74ba0ccced48c14c63a4d24bb3891.tar.gz
[test] Avoid redundant writes/reads of test surfaces via png.
As Behdad suggested, we can dramatically speed up the test suite by short-circuiting the write to a png file, only to then immediately read it back in. So for the raster based surfaces, we avoid the round-trip through libpng by implementing a new boilerplate method to directly extract the image buffer from the test result. A secondary speedup is achieved by caching the most recent reference image.
Diffstat (limited to 'test/imagediff.c')
-rw-r--r--test/imagediff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/imagediff.c b/test/imagediff.c
index c170c8e5b..640424265 100644
--- a/test/imagediff.c
+++ b/test/imagediff.c
@@ -54,7 +54,7 @@ main (int argc, char *argv[])
ax = ay = bx = by = 0;
}
- status = image_diff (NULL, argv[1], argv[2], NULL, ax, ay, bx, by, &result);
+ status = png_diff (NULL, argv[1], argv[2], NULL, ax, ay, bx, by, &result);
if (status) {
fprintf (stderr, "Error comparing images: %s\n",