From a12cf779e828ec70da714832e1eaa730119fe10c Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 30 Sep 2013 08:58:27 +0200 Subject: git update fontconfig mesa libXau pixman xkeyboard-config 30 Sep 2013 xkeyboard-config commit fe5c2416314fd1df423c8ce53cac2d28b00420e7 libXau commit 304a11be4727c5a7feeb2501e8e001466f8ce84e pixman commit b513b3dffe979056dbbbdc8e0659f8018c51c5f5 fontconfig commit 9161ed1e4a3f4afaee6dbcfc0b84a279ad99b397 mesa commit 868791f0baa0b51f4255c839448d3ca87ab1aa35 --- pixman/test/blitters-test.c | 3 +-- pixman/test/utils.c | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'pixman/test') diff --git a/pixman/test/blitters-test.c b/pixman/test/blitters-test.c index af948350b..920cbbbd7 100644 --- a/pixman/test/blitters-test.c +++ b/pixman/test/blitters-test.c @@ -244,7 +244,7 @@ test_composite (int testnum, int verbose) int w, h; pixman_op_t op; pixman_format_code_t src_fmt, dst_fmt, mask_fmt; - uint32_t *dstbuf, *srcbuf, *maskbuf; + uint32_t *srcbuf, *maskbuf; uint32_t crc32; int max_width, max_height, max_extra_stride; FLOAT_REGS_CORRUPTION_DETECTOR_START (); @@ -291,7 +291,6 @@ test_composite (int testnum, int verbose) dst_height = pixman_image_get_height (dst_img); dst_stride = pixman_image_get_stride (dst_img); - dstbuf = pixman_image_get_data (dst_img); srcbuf = pixman_image_get_data (src_img); src_x = prng_rand_n (src_width); diff --git a/pixman/test/utils.c b/pixman/test/utils.c index 34007476b..0cd982e73 100644 --- a/pixman/test/utils.c +++ b/pixman/test/utils.c @@ -251,6 +251,7 @@ print_image (pixman_image_t *image) int width, height, stride; pixman_format_code_t format; uint8_t *buffer; + int s; width = pixman_image_get_width (image); height = pixman_image_get_height (image); @@ -258,13 +259,12 @@ print_image (pixman_image_t *image) format = pixman_image_get_format (image); buffer = (uint8_t *)pixman_image_get_data (image); - if (stride < 0) - stride = - stride; + s = (stride >= 0)? stride : - stride; printf ("---\n"); for (i = 0; i < height; i++) { - for (j = 0; j < stride; j++) + for (j = 0; j < s; j++) { if (j == (width * PIXMAN_FORMAT_BPP (format) + 7) / 8) printf ("| "); @@ -297,11 +297,12 @@ image_endian_swap (pixman_image_t *img) for (i = 0; i < height; i++) { uint8_t *line_data = (uint8_t *)data + stride * i; - + int s = (stride >= 0)? stride : - stride; + switch (bpp) { case 1: - for (j = 0; j < stride; j++) + for (j = 0; j < s; j++) { line_data[j] = ((line_data[j] & 0x80) >> 7) | @@ -315,13 +316,13 @@ image_endian_swap (pixman_image_t *img) } break; case 4: - for (j = 0; j < stride; j++) + for (j = 0; j < s; j++) { line_data[j] = (line_data[j] >> 4) | (line_data[j] << 4); } break; case 16: - for (j = 0; j + 2 <= stride; j += 2) + for (j = 0; j + 2 <= s; j += 2) { char t1 = line_data[j + 0]; char t2 = line_data[j + 1]; @@ -331,7 +332,7 @@ image_endian_swap (pixman_image_t *img) } break; case 24: - for (j = 0; j + 3 <= stride; j += 3) + for (j = 0; j + 3 <= s; j += 3) { char t1 = line_data[j + 0]; char t2 = line_data[j + 1]; @@ -343,7 +344,7 @@ image_endian_swap (pixman_image_t *img) } break; case 32: - for (j = 0; j + 4 <= stride; j += 4) + for (j = 0; j + 4 <= s; j += 4) { char t1 = line_data[j + 0]; char t2 = line_data[j + 1]; -- cgit v1.2.3