aboutsummaryrefslogtreecommitdiff
path: root/pixman/test/blitters-test.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-11 09:01:24 +0200
committermarha <marha@users.sourceforge.net>2012-06-11 09:01:24 +0200
commita660c10f0f261b390ada5c3a5d0543088830f070 (patch)
tree522977aa2a1be8687b1399e8afa2503daa58821b /pixman/test/blitters-test.c
parent72ec0e3bb2d7fc6b77b2a75873792f781679da6a (diff)
parent080d1527a5358dd66ac927acbe0ec61cba7aa7e1 (diff)
downloadvcxsrv-a660c10f0f261b390ada5c3a5d0543088830f070.tar.gz
vcxsrv-a660c10f0f261b390ada5c3a5d0543088830f070.tar.bz2
vcxsrv-a660c10f0f261b390ada5c3a5d0543088830f070.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/glsl/glcpp/.gitignore
Diffstat (limited to 'pixman/test/blitters-test.c')
-rw-r--r--pixman/test/blitters-test.c31
1 files changed, 1 insertions, 30 deletions
diff --git a/pixman/test/blitters-test.c b/pixman/test/blitters-test.c
index feea308c2..6a3cc8649 100644
--- a/pixman/test/blitters-test.c
+++ b/pixman/test/blitters-test.c
@@ -83,39 +83,10 @@ free_random_image (uint32_t initcrc,
pixman_format_code_t fmt)
{
uint32_t crc32 = 0;
- int stride = pixman_image_get_stride (img);
uint32_t *data = pixman_image_get_data (img);
- int height = pixman_image_get_height (img);
if (fmt != PIXMAN_null)
- {
- /* mask unused 'x' part */
- if (PIXMAN_FORMAT_BPP (fmt) - PIXMAN_FORMAT_DEPTH (fmt) &&
- PIXMAN_FORMAT_DEPTH (fmt) != 0)
- {
- int i;
- uint32_t *data = pixman_image_get_data (img);
- uint32_t mask = (1 << PIXMAN_FORMAT_DEPTH (fmt)) - 1;
-
- if (PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_BGRA ||
- PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_RGBA)
- {
- mask <<= (PIXMAN_FORMAT_BPP (fmt) - PIXMAN_FORMAT_DEPTH (fmt));
- }
-
- for (i = 0; i * PIXMAN_FORMAT_BPP (fmt) < 32; i++)
- mask |= mask << (i * PIXMAN_FORMAT_BPP (fmt));
-
- for (i = 0; i < stride * height / 4; i++)
- data[i] &= mask;
- }
-
- /* swap endiannes in order to provide identical results on both big
- * and litte endian systems
- */
- image_endian_swap (img);
- crc32 = compute_crc32 (initcrc, data, stride * height);
- }
+ crc32 = compute_crc32_for_image (initcrc, img);
pixman_image_unref (img);
free (data);