diff options
author | marha <marha@users.sourceforge.net> | 2011-02-12 15:47:35 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-02-12 15:47:35 +0000 |
commit | 026b85e62b3d8812afb5f04df29aeac28c52b331 (patch) | |
tree | 04f14c936311a1852769eb5005dbaa25bb2dc244 /pixman/test/affine-test.c | |
parent | 183968dd18dc91f73325980bd511ed6bdb38b432 (diff) | |
download | vcxsrv-026b85e62b3d8812afb5f04df29aeac28c52b331.tar.gz vcxsrv-026b85e62b3d8812afb5f04df29aeac28c52b331.tar.bz2 vcxsrv-026b85e62b3d8812afb5f04df29aeac28c52b331.zip |
xkeyboard-config pixman xkbcompt mesa git update 12 Feb 2011
Diffstat (limited to 'pixman/test/affine-test.c')
-rw-r--r-- | pixman/test/affine-test.c | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/pixman/test/affine-test.c b/pixman/test/affine-test.c index fbb35caa9..3c224d220 100644 --- a/pixman/test/affine-test.c +++ b/pixman/test/affine-test.c @@ -112,10 +112,36 @@ test_composite (int testnum, if (lcg_rand_n (4) > 0)
{
- int c = lcg_rand_N (2 * 65536) - 65536;
- int s = lcg_rand_N (2 * 65536) - 65536;
-
+ int c, s, tx = 0, ty = 0;
+ switch (lcg_rand_n (4))
+ {
+ case 0:
+ /* 90 degrees */
+ c = 0;
+ s = pixman_fixed_1;
+ tx = pixman_int_to_fixed (MAX_SRC_HEIGHT);
+ break;
+ case 1:
+ /* 180 degrees */
+ c = -pixman_fixed_1;
+ s = 0;
+ tx = pixman_int_to_fixed (MAX_SRC_WIDTH);
+ ty = pixman_int_to_fixed (MAX_SRC_HEIGHT);
+ break;
+ case 2:
+ /* 270 degrees */
+ c = 0;
+ s = -pixman_fixed_1;
+ ty = pixman_int_to_fixed (MAX_SRC_WIDTH);
+ break;
+ default:
+ /* arbitrary rotation */
+ c = lcg_rand_N (2 * 65536) - 65536;
+ s = lcg_rand_N (2 * 65536) - 65536;
+ break;
+ }
pixman_transform_rotate (&transform, NULL, c, s);
+ pixman_transform_translate (&transform, NULL, tx, ty);
}
pixman_image_set_transform (src_img, &transform);
@@ -256,6 +282,6 @@ main (int argc, const char *argv[]) {
pixman_disable_out_of_bounds_workaround ();
- return fuzzer_test_main ("affine", 8000000, 0x46EC3C6A,
+ return fuzzer_test_main ("affine", 8000000, 0x4B5D1852,
test_composite, argc, argv);
}
|