mi: Remove Windows 8-bpp colormap compatibility

Nice, but not something our Windows servers build, and not something
that belongs in mi anyway.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2014-01-23 10:27:58 -05:00
parent 7cd192edc1
commit e89ccacea9

View File

@ -235,42 +235,7 @@ miExpandDirectColors(ColormapPtr pmap, int ndef, xColorItem * indefs,
Bool
miCreateDefColormap(ScreenPtr pScreen)
{
/*
* In the following sources PC X server vendors may want to delete
* "_not_tog" from "#ifdef WIN32_not_tog"
*/
#ifdef WIN32_not_tog
/*
* these are the MS-Windows desktop colors, adjusted for X's 16-bit
* color specifications.
*/
static xColorItem citems[] = {
{0, 0, 0, 0, 0, 0},
{1, 0x8000, 0, 0, 0, 0},
{2, 0, 0x8000, 0, 0, 0},
{3, 0x8000, 0x8000, 0, 0, 0},
{4, 0, 0, 0x8000, 0, 0},
{5, 0x8000, 0, 0x8000, 0, 0},
{6, 0, 0x8000, 0x8000, 0, 0},
{7, 0xc000, 0xc000, 0xc000, 0, 0},
{8, 0xc000, 0xdc00, 0xc000, 0, 0},
{9, 0xa600, 0xca00, 0xf000, 0, 0},
{246, 0xff00, 0xfb00, 0xf000, 0, 0},
{247, 0xa000, 0xa000, 0xa400, 0, 0},
{248, 0x8000, 0x8000, 0x8000, 0, 0},
{249, 0xff00, 0, 0, 0, 0},
{250, 0, 0xff00, 0, 0, 0},
{251, 0xff00, 0xff00, 0, 0, 0},
{252, 0, 0, 0xff00, 0, 0},
{253, 0xff00, 0, 0xff00, 0, 0},
{254, 0, 0xff00, 0xff00, 0, 0},
{255, 0xff00, 0xff00, 0xff00, 0, 0}
};
#define NUM_DESKTOP_COLORS sizeof citems / sizeof citems[0]
int i;
#else
unsigned short zero = 0, ones = 0xFFFF;
#endif
Pixel wp, bp;
VisualPtr pVisual;
ColormapPtr cmap;
@ -294,21 +259,12 @@ miCreateDefColormap(ScreenPtr pScreen)
if (pScreen->rootDepth > 1) {
wp = pScreen->whitePixel;
bp = pScreen->blackPixel;
#ifdef WIN32_not_tog
for (i = 0; i < NUM_DESKTOP_COLORS; i++) {
if (AllocColor(cmap,
&citems[i].red, &citems[i].green, &citems[i].blue,
&citems[i].pixel, 0) != Success)
return FALSE;
}
#else
if ((AllocColor(cmap, &ones, &ones, &ones, &wp, 0) !=
Success) ||
(AllocColor(cmap, &zero, &zero, &zero, &bp, 0) != Success))
return FALSE;
pScreen->whitePixel = wp;
pScreen->blackPixel = bp;
#endif
}
(*pScreen->InstallColormap) (cmap);