Additional pixel formats for wl_shm

Bill Spitzak spitzak at gmail.com
Fri Apr 26 12:29:40 PDT 2013


I would reuse PIXMAN_FORMAT for these values. No reason to come up with 
yet another enumeration. Though it means the current wl_shm values have 
to change, except it looks like 0 and 1 (and in fact any number less 
than 0x1000000) don't make any logical PIXMAN_FORMAT values so maybe 
they can be special-cased?

#define PIXMAN_FORMAT(bpp,type,a,r,g,b) (((bpp) << 24) |  \
                                          ((type) << 16) | \
                                          ((a) << 12) |    \
                                          ((r) << 8) |     \
                                          ((g) << 4) |     \
                                          ((b)))

#define PIXMAN_TYPE_OTHER       0
#define PIXMAN_TYPE_A           1
#define PIXMAN_TYPE_ARGB        2
#define PIXMAN_TYPE_ABGR        3
#define PIXMAN_TYPE_COLOR       4
#define PIXMAN_TYPE_GRAY        5
#define PIXMAN_TYPE_YUY2        6
#define PIXMAN_TYPE_YV12        7


More information about the wayland-devel mailing list