Add CONVERT_0565_TO_8888 macro
authorAlexander Larsson <alexl@redhat.com>
Fri, 12 Mar 2010 15:23:42 +0000 (16:23 +0100)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Wed, 17 Mar 2010 15:03:05 +0000 (11:03 -0400)
This lets us simplify some fast paths since we get a consistent
naming that always has 8888 and gets some value for alpha.

pixman/pixman-private.h

index 9dcdca7..d0bec39 100644 (file)
@@ -704,6 +704,8 @@ pixman_region16_copy_from_region32 (pixman_region16_t *dst,
      ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) |                  \
      ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000)))
 
+#define CONVERT_0565_TO_8888(s) (CONVERT_0565_TO_0888(s) | 0xff000000)
+
 #define PIXMAN_FORMAT_IS_WIDE(f)                                       \
     (PIXMAN_FORMAT_A (f) > 8 ||                                                \
      PIXMAN_FORMAT_R (f) > 8 ||                                                \