Fix wide alpha fetch macro.
authorAaron Plattner <aplattner@nvidia.com>
Sat, 3 May 2008 00:33:17 +0000 (17:33 -0700)
committerSoren Sandmann Pedersen <sandmann@redhat.com>
Tue, 27 May 2008 17:07:55 +0000 (13:07 -0400)
Signed-off-by: Soren Sandmann Pedersen <sandmann@redhat.com>
pixman/combine.inc
pixman/pixman-access.c
pixman/pixman-image.c
pixman/pixman-private.h
pixman/pixman-transformed.c

index c3a57eb..63a3fe1 100644 (file)
@@ -6,6 +6,8 @@
 
 #include "pixman-private.h"
 
+#define Alpha(x) ((x) >> A_SHIFT)
+
 /*
  * Helper macros.
  */
index 4a11bc0..29b846c 100644 (file)
 
 #include "pixman-private.h"
 
+#define Red(x) (((x) >> 16) & 0xff)
+#define Green(x) (((x) >> 8) & 0xff)
+#define Blue(x) ((x) & 0xff)
+
 /*
  * YV12 setup and access macros
  */
index 30c294b..f34053c 100644 (file)
@@ -30,6 +30,8 @@
 
 #include "pixman-private.h"
 
+#define Alpha(x) ((x) >> 24)
+
 static void
 init_source_image (source_image_t *image)
 {
@@ -800,4 +802,4 @@ pixman_image_is_opaque(pixman_image_t *image)
     }
 
      return TRUE;
-}
\ No newline at end of file
+}
index 8792027..4a6e045 100644 (file)
@@ -419,11 +419,6 @@ union pixman_image
      WRITE(img, (a)+2, (uint8_t) ((v) >> 16))))
 #endif
 
-#define Alpha(x) ((x) >> 24)
-#define Red(x) (((x) >> 16) & 0xff)
-#define Green(x) (((x) >> 8) & 0xff)
-#define Blue(x) ((x) & 0xff)
-
 #define CvtR8G8B8toY15(s)       (((((s) >> 16) & 0xff) * 153 + \
                                   (((s) >>  8) & 0xff) * 301 +         \
                                   (((s)      ) & 0xff) * 58) >> 2)
index 3f176d6..569fcae 100644 (file)
 
 #include "pixman-private.h"
 
+#define Alpha(x) ((x) >> 24)
+#define Red(x) (((x) >> 16) & 0xff)
+#define Green(x) (((x) >> 8) & 0xff)
+#define Blue(x) ((x) & 0xff)
+
 /*
  * Fetch from region strategies
  */