summaryrefslogtreecommitdiff
path: root/test/affine-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/affine-test.c')
-rw-r--r--test/affine-test.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/test/affine-test.c b/test/affine-test.c
index 03d296f..8e19023 100644
--- a/test/affine-test.c
+++ b/test/affine-test.c
@@ -80,6 +80,18 @@ test_composite (int testnum,
prng_randmemset (srcbuf, src_stride * src_height, 0);
prng_randmemset (dstbuf, dst_stride * dst_height, 0);
+ if (prng_rand_n (2) == 0)
+ {
+ srcbuf += (src_stride / 4) * (src_height - 1);
+ src_stride = - src_stride;
+ }
+
+ if (prng_rand_n (2) == 0)
+ {
+ dstbuf += (dst_stride / 4) * (dst_height - 1);
+ dst_stride = - dst_stride;
+ }
+
src_fmt = src_bpp == 4 ? (prng_rand_n (2) == 0 ?
PIXMAN_a8r8g8b8 : PIXMAN_x8r8g8b8) : PIXMAN_r5g6b5;
@@ -281,6 +293,12 @@ test_composite (int testnum,
pixman_image_unref (src_img);
pixman_image_unref (dst_img);
+ if (src_stride < 0)
+ srcbuf += (src_stride / 4) * (src_height - 1);
+
+ if (dst_stride < 0)
+ dstbuf += (dst_stride / 4) * (dst_height - 1);
+
free (srcbuf);
free (dstbuf);
@@ -289,9 +307,9 @@ test_composite (int testnum,
}
#if BILINEAR_INTERPOLATION_BITS == 7
-#define CHECKSUM 0xBC00B1DF
+#define CHECKSUM 0xBE724CFE
#elif BILINEAR_INTERPOLATION_BITS == 4
-#define CHECKSUM 0xA227306B
+#define CHECKSUM 0x79BBE501
#else
#define CHECKSUM 0x00000000
#endif