summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2006-04-19 21:56:13 +0000
committerKeith Packard <keithp@keithp.com>2006-04-19 21:56:13 +0000
commitb37c515320dc8df2b1d160cc3f37d6bfac109b91 (patch)
tree471b25cabb328d43fcf313702d2f688d273b4d18 /render
parentc947d796aad0b81d661a10b787deed967376da79 (diff)
Add support for x4a4 format (depth 4 at 8bpp). Bug #6325.
Diffstat (limited to 'render')
-rw-r--r--render/picture.c8
-rw-r--r--render/picture.h9
2 files changed, 15 insertions, 2 deletions
diff --git a/render/picture.c b/render/picture.c
index 8d4d77e36..ee385e56b 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -234,10 +234,14 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp)
formats[nformats].format = PICT_a1;
formats[nformats].depth = 1;
nformats++;
- formats[nformats].format = PICT_a8;
+ formats[nformats].format = PICT_FORMAT(BitsPerPixel(8),
+ PICT_TYPE_A,
+ 8, 0, 0, 0);
formats[nformats].depth = 8;
nformats++;
- formats[nformats].format = PICT_a4;
+ formats[nformats].format = PICT_FORMAT(BitsPerPixel(4),
+ PICT_TYPE_A,
+ 4, 0, 0, 0);
formats[nformats].depth = 4;
nformats++;
formats[nformats].format = PICT_a8r8g8b8;
diff --git a/render/picture.h b/render/picture.h
index b09d9aac2..778eb5c4c 100644
--- a/render/picture.h
+++ b/render/picture.h
@@ -100,6 +100,15 @@ typedef struct _Picture *PicturePtr;
#define PICT_c8 PICT_FORMAT(8,PICT_TYPE_COLOR,0,0,0,0)
#define PICT_g8 PICT_FORMAT(8,PICT_TYPE_GRAY,0,0,0,0)
+#define PICT_x4a4 PICT_FORMAT(8,PICT_TYPE_A,4,0,0,0)
+#define PICT_x4r1g2b1 PICT_FORMAT(8,PICT_TYPE_ARGB,0,1,2,1)
+#define PICT_x4b1g2r1 PICT_FORMAT(8,PICT_TYPE_ABGR,0,1,2,1)
+#define PICT_x4a1r1g1b1 PICT_FORMAT(8,PICT_TYPE_ARGB,1,1,1,1)
+#define PICT_x4a1b1g1r1 PICT_FORMAT(8,PICT_TYPE_ABGR,1,1,1,1)
+
+#define PICT_x4c4 PICT_FORMAT(8,PICT_TYPE_COLOR,0,0,0,0)
+#define PICT_x4g4 PICT_FORMAT(8,PICT_TYPE_GRAY,0,0,0,0)
+
/* 4bpp formats */
#define PICT_a4 PICT_FORMAT(4,PICT_TYPE_A,4,0,0,0)
#define PICT_r1g2b1 PICT_FORMAT(4,PICT_TYPE_ARGB,0,1,2,1)