diff options
author | marha <marha@users.sourceforge.net> | 2013-09-20 11:47:27 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-09-20 11:47:27 +0200 |
commit | 55c05b8a12944349b00053253d3a49b223a9f4de (patch) | |
tree | ffa9a1d19efffd67daca5f1568fc2394fdbe0534 /pixman/test/blitters-test.c | |
parent | 7f669a708bd35bdf8e842f762ec68f9ad0ec0486 (diff) | |
download | vcxsrv-55c05b8a12944349b00053253d3a49b223a9f4de.tar.gz vcxsrv-55c05b8a12944349b00053253d3a49b223a9f4de.tar.bz2 vcxsrv-55c05b8a12944349b00053253d3a49b223a9f4de.zip |
fontconfig mesa pixman git update 20 Sep 2013
pixman commit aa5c45254eb60ce4c85a25b5343474fb160ffa7c
fontconfig commit 643f8088f0d51107e58d142df47124efec6afab1
mesa commit 1cc3b90d47f92aa0be2d914191fd2f46d2b127d7
Diffstat (limited to 'pixman/test/blitters-test.c')
-rw-r--r-- | pixman/test/blitters-test.c | 31 |
1 files changed, 12 insertions, 19 deletions
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); } |