From 55c05b8a12944349b00053253d3a49b223a9f4de Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 20 Sep 2013 11:47:27 +0200 Subject: fontconfig mesa pixman git update 20 Sep 2013 pixman commit aa5c45254eb60ce4c85a25b5343474fb160ffa7c fontconfig commit 643f8088f0d51107e58d142df47124efec6afab1 mesa commit 1cc3b90d47f92aa0be2d914191fd2f46d2b127d7 --- pixman/test/blitters-test.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) (limited to 'pixman/test/blitters-test.c') diff --git a/pixman/test/blitters-test.c b/pixman/test/blitters-test.c index a2c6ff4d8..af948350b 100644 --- a/pixman/test/blitters-test.c +++ b/pixman/test/blitters-test.c @@ -57,6 +57,13 @@ create_random_image (pixman_format_code_t *allowed_formats, prng_randmemset (buf, stride * height, RANDMEMSET_MORE_00_AND_FF); } + /* test negative stride */ + if (prng_rand_n (4) == 0) + { + buf += (stride / 4) * (height - 1); + stride = - stride; + } + img = pixman_image_create_bits (fmt, width, height, buf, stride); if (PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_COLOR) @@ -89,6 +96,9 @@ free_random_image (uint32_t initcrc, if (fmt != PIXMAN_null) crc32 = compute_crc32_for_image (initcrc, img); + if (img->bits.rowstride < 0) + data += img->bits.rowstride * (img->bits.height - 1); + pixman_image_unref (img); free (data); @@ -222,7 +232,6 @@ static pixman_format_code_t mask_fmt_list[] = { uint32_t test_composite (int testnum, int verbose) { - int i; pixman_image_t *src_img = NULL; pixman_image_t *dst_img = NULL; pixman_image_t *mask_img = NULL; @@ -355,23 +364,7 @@ test_composite (int testnum, int verbose) src_x, src_y, mask_x, mask_y, dst_x, dst_y, w, h); if (verbose) - { - int j; - - printf ("---\n"); - for (i = 0; i < dst_height; i++) - { - for (j = 0; j < dst_stride; j++) - { - if (j == (dst_width * PIXMAN_FORMAT_BPP (dst_fmt) + 7) / 8) - printf ("| "); - - printf ("%02X ", *((uint8_t *)dstbuf + i * dst_stride + j)); - } - printf ("\n"); - } - printf ("---\n"); - } + print_image (dst_img); free_random_image (0, src_img, PIXMAN_null); crc32 = free_random_image (0, dst_img, dst_fmt); @@ -402,6 +395,6 @@ main (int argc, const char *argv[]) } return fuzzer_test_main("blitters", 2000000, - 0x0CF3283B, + 0xAC8FDA98, test_composite, argc, argv); } -- cgit v1.2.3