aboutsummaryrefslogtreecommitdiff
path: root/pixman/test/rotate-test.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-09-20 11:47:27 +0200
committermarha <marha@users.sourceforge.net>2013-09-20 11:47:27 +0200
commit55c05b8a12944349b00053253d3a49b223a9f4de (patch)
treeffa9a1d19efffd67daca5f1568fc2394fdbe0534 /pixman/test/rotate-test.c
parent7f669a708bd35bdf8e842f762ec68f9ad0ec0486 (diff)
downloadvcxsrv-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/rotate-test.c')
-rw-r--r--pixman/test/rotate-test.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/pixman/test/rotate-test.c b/pixman/test/rotate-test.c
index 9d2a620cb..18ca60d9b 100644
--- a/pixman/test/rotate-test.c
+++ b/pixman/test/rotate-test.c
@@ -61,16 +61,25 @@ static pixman_image_t *
make_image (void)
{
pixman_format_code_t format = RANDOM_FORMAT();
- uint32_t *bytes = malloc (WIDTH * HEIGHT * 4);
+ uint32_t *bytes, *orig;
pixman_image_t *image;
+ int stride;
+ orig = bytes = malloc (WIDTH * HEIGHT * 4);
prng_randmemset (bytes, WIDTH * HEIGHT * 4, 0);
+ stride = WIDTH * 4;
+ if (prng_rand_n (2) == 0)
+ {
+ bytes += (stride / 4) * (HEIGHT - 1);
+ stride = - stride;
+ }
+
image = pixman_image_create_bits (
- format, WIDTH, HEIGHT, bytes, WIDTH * 4);
+ format, WIDTH, HEIGHT, bytes, stride);
pixman_image_set_transform (image, RANDOM_TRANSFORM());
- pixman_image_set_destroy_function (image, on_destroy, bytes);
+ pixman_image_set_destroy_function (image, on_destroy, orig);
pixman_image_set_repeat (image, PIXMAN_REPEAT_NORMAL);
image_endian_swap (image);
@@ -106,6 +115,6 @@ int
main (int argc, const char *argv[])
{
return fuzzer_test_main ("rotate", 15000,
- 0xECF5E426,
+ 0x81E9EC2F,
test_transform, argc, argv);
}