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.
Switch to using 32bpp for depth 24 pixmaps (even when the frame buffer is
    not depth 24).
This commit is contained in:
Keith Packard 2004-05-21 03:32:27 +00:00
parent cde51fd05b
commit 932efe8e6d

View File

@ -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 @@ KdSetPixmapFormats (ScreenInfo *pScreenInfo)
/*
* 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;