xserver/hw/kdrive/src kdrive.c,1.38,1.39
Keith Packard
xserver-commit at pdx.freedesktop.org
Thu May 20 20:32:29 PDT 2004
Committed by: keithp
Update of /cvs/xserver/xserver/hw/kdrive/src
In directory pdx:/tmp/cvs-serv18211/hw/kdrive/src
Modified Files:
kdrive.c
Log Message:
2004-05-20 Keith Packard <keithp at keithp.com>
* composite/compinit.c: (compFindVisuallessDepth),
(compAddAlternateVisuals), (compScreenInit):
* composite/compint.h:
* composite/compwindow.c: (compIsAlternateVisual),
(compImplicitRedirect):
Allow for multiple composite-based visuals, then
add an RGB24 visual in addition to the ARGB32 one. This
allows 'glitz' to run on top of any X server using mesa.
* hw/kdrive/src/kdrive.c: (KdSetPixmapFormats):
Switch to using 32bpp for depth 24 pixmaps (even when
the frame buffer is not depth 24).
Index: kdrive.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/src/kdrive.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- a/kdrive.c 4 Feb 2004 16:08:27 -0000 1.38
+++ b/kdrive.c 21 May 2004 03:32:27 -0000 1.39
@@ -43,9 +43,22 @@
#include "dpmsproc.h"
#endif
-CARD8 kdBpp[] = { 1, 4, 8, 16, 24, 32 };
+typedef struct _kdDepths {
+ CARD8 depth;
+ CARD8 bpp;
+} KdDepths;
-#define NUM_KD_BPP (sizeof (kdBpp) / sizeof (kdBpp[0]))
+KdDepths kdDepths[] = {
+ { 1, 1 },
+ { 4, 4 },
+ { 8, 8 },
+ { 15, 16 },
+ { 16, 16 },
+ { 24, 32 },
+ { 32, 32 }
+};
+
+#define NUM_KD_DEPTHS (sizeof (kdDepths) / sizeof (kdDepths[0]))
int kdScreenPrivateIndex;
unsigned long kdGeneration;
@@ -1320,9 +1333,9 @@
/*
* Fill in additional formats
*/
- for (i = 0; i < NUM_KD_BPP; i++)
- if (!depthToBpp[kdBpp[i]])
- depthToBpp[kdBpp[i]] = kdBpp[i];
+ for (i = 0; i < NUM_KD_DEPTHS; i++)
+ if (!depthToBpp[kdDepths[i].depth])
+ depthToBpp[kdDepths[i].depth] = kdDepths[i].bpp;
pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER;
pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
More information about the xserver-commit
mailing list