summaryrefslogtreecommitdiff
path: root/test/buffer-diff.h
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2006-12-12 16:37:35 -0800
committerCarl Worth <cworth@cworth.org>2006-12-14 07:57:59 -0800
commit55f776876d231a035cdc5da9bb90cbba14f19248 (patch)
tree6a1e4fe5c8fc0296e73ec43fe235280ebbb9ffa4 /test/buffer-diff.h
parent0d7870b6bf13edfe513e2de25a5814a0a1b78c79 (diff)
downloadcairo-55f776876d231a035cdc5da9bb90cbba14f19248.tar.gz
test: Rework buffer_diff interface as new compare_surfaces
This is a slightly kinder interface that accepts cairo_image_surface_t pointers rather than pointers to the raw image data and width, height, stride. This brings us closer to hooking up the pdiff code.
Diffstat (limited to 'test/buffer-diff.h')
-rw-r--r--test/buffer-diff.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/test/buffer-diff.h b/test/buffer-diff.h
index d95c213b6..cd3534508 100644
--- a/test/buffer-diff.h
+++ b/test/buffer-diff.h
@@ -36,22 +36,19 @@ typedef struct _buffer_diff_result {
unsigned int max_diff;
} buffer_diff_result_t;
-/* Compares two image buffers.
+/* Compares two image surfaces
*
* Provides number of pixels changed and maximum single-channel
* difference in result.
*
- * Also fills in a "diff" buffer intended to visually show where the
+ * Also fills in a "diff" surface intended to visually show where the
* images differ.
*/
void
-buffer_diff (unsigned char *buf_a,
- unsigned char *buf_b,
- unsigned char *buf_diff,
- int width,
- int height,
- int stride,
- buffer_diff_result_t *result);
+compare_surfaces (cairo_surface_t *surface_a,
+ cairo_surface_t *surface_b,
+ cairo_surface_t *surface_diff,
+ buffer_diff_result_t *result);
/* Compares two image buffers ignoring the alpha channel.
*