aboutsummaryrefslogtreecommitdiff
path: root/pixman/test/utils.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-01-19 23:10:44 +0000
committermarha <marha@users.sourceforge.net>2010-01-19 23:10:44 +0000
commita9768b035f2c47be0908520474073cc68d225d8a (patch)
treef9894781b3f1d5b36d5a5fa284c82ad36c9cf917 /pixman/test/utils.c
parentb152ebf4b66368e1cbfda1ae81cef29bf9c00bb7 (diff)
downloadvcxsrv-a9768b035f2c47be0908520474073cc68d225d8a.tar.gz
vcxsrv-a9768b035f2c47be0908520474073cc68d225d8a.tar.bz2
vcxsrv-a9768b035f2c47be0908520474073cc68d225d8a.zip
Updated to:
libX11-1.3.3 pixman-0.17.4
Diffstat (limited to 'pixman/test/utils.c')
-rw-r--r--pixman/test/utils.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/pixman/test/utils.c b/pixman/test/utils.c
index 1e42d89d8..58cd100e2 100644
--- a/pixman/test/utils.c
+++ b/pixman/test/utils.c
@@ -192,3 +192,17 @@ image_endian_swap (pixman_image_t *img, int bpp)
}
}
+uint8_t *
+make_random_bytes (int n_bytes)
+{
+ uint8_t *bytes = malloc (n_bytes);
+ int i;
+
+ if (!bytes)
+ return NULL;
+
+ for (i = 0; i < n_bytes; ++i)
+ bytes[i] = lcg_rand () & 0xff;
+
+ return bytes;
+}