summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2008-12-17 10:35:03 -0800
committerAaron Plattner <aplattner@nvidia.com>2008-12-17 10:38:12 -0800
commit08530f5bf23386355a19b83db88173302c7a5300 (patch)
tree33411c1f06db7f0854a8d13b24f4cf1e766842f9
parent4546234c18f5bb5e2d193d2fa8ff5c3ca78bc716 (diff)
Don't treat PIXMAN_TYPE_YUY2 and PIXMAN_TYPE_YV12 as PIXMAN_FORMAT_COLOR.
Various pieces of code expect PIXMAN_FORMAT_COLOR (and its less cool older brother, PICT_FORMAT_COLOR) formats to have ARGB bits, and the YUV formats do not.
-rw-r--r--pixman/pixman.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/pixman/pixman.h b/pixman/pixman.h
index 6c523f20..49c39d57 100644
--- a/pixman/pixman.h
+++ b/pixman/pixman.h
@@ -648,7 +648,9 @@ struct pixman_indexed
#define PIXMAN_TYPE_YUY2 6
#define PIXMAN_TYPE_YV12 7
-#define PIXMAN_FORMAT_COLOR(f) (PIXMAN_FORMAT_TYPE(f) & 2)
+#define PIXMAN_FORMAT_COLOR(f) \
+ (PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_ARGB || \
+ PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_ABGR)
/* 32bpp formats */
typedef enum {