pixman: Branch 'master'
Søren Sandmann Pedersen
sandmann at kemper.freedesktop.org
Sun Sep 27 06:36:31 PDT 2009
test/composite.c | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit f135f74ff3a4f55262b611b452566daff5e936ce
Author: Andrea Canciani <ranma42 at gmail.com>
Date: Sun Sep 27 11:40:52 2009 +0200
Fix composite on big-endian systems.
Data narrower than 32bpp is padded to an unsigned long and on
big-endian systems this shifts the value by the padding bits.
diff --git a/test/composite.c b/test/composite.c
index bcd26ff..7996251 100644
--- a/test/composite.c
+++ b/test/composite.c
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <stdlib.h> /* abort() */
#include <math.h>
+#include <config.h>
#define FALSE 0
#define TRUE !FALSE
@@ -502,6 +503,9 @@ get_pixel (pixman_image_t *image,
unsigned long val;
val = *(unsigned long *) pixman_image_get_data (image);
+#ifdef WORDS_BIGENDIAN
+ val >>= 8 * sizeof(val) - PIXMAN_FORMAT_BPP (format);
+#endif
/* Number of bits in each channel */
a = PIXMAN_FORMAT_A (format);
More information about the xorg-commit
mailing list