diff options
author | Søren Sandmann Pedersen <sandmann@redhat.com> | 2009-11-10 15:45:17 -0500 |
---|---|---|
committer | Søren Sandmann Pedersen <sandmann@redhat.com> | 2009-11-17 00:32:03 -0500 |
commit | 24e203a8a8394edb3a89f3d6be1bdcab41fbe7f9 (patch) | |
tree | f6d14817af938594046a0231d6a47d8d24882148 /test/scaling-test.c | |
parent | cc34554652bf9a402127fa06a03105b49a425895 (diff) |
test: Move random number generator from blitters/scaling-test to utils.[ch]
Diffstat (limited to 'test/scaling-test.c')
-rw-r--r-- | test/scaling-test.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/test/scaling-test.c b/test/scaling-test.c index 8678b29..296b986 100644 --- a/test/scaling-test.c +++ b/test/scaling-test.c @@ -23,32 +23,8 @@ #include <assert.h> #include <stdlib.h> #include <stdio.h> -#include "pixman.h" #include "utils.h" -/* A primitive pseudorandom number generator, taken from POSIX.1-2001 example */ - -static uint32_t lcg_seed; - -uint32_t -lcg_rand (void) -{ - lcg_seed = lcg_seed * 1103515245 + 12345; - return ((uint32_t)(lcg_seed / 65536) % 32768); -} - -void -lcg_srand (uint32_t seed) -{ - lcg_seed = seed; -} - -uint32_t -lcg_rand_n (int max) -{ - return lcg_rand () % max; -} - /* perform endian conversion of pixel data */ static void image_endian_swap (pixman_image_t *img, |