[PATCH 06/19] mi: Remove Windows 8-bpp colormap compatibility

Adam Jackson ajax at redhat.com
Thu Sep 25 10:37:22 PDT 2014


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

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 mi/micmap.c | 44 --------------------------------------------
 1 file changed, 44 deletions(-)

diff --git a/mi/micmap.c b/mi/micmap.c
index 4648b9a..1aeb359 100644
--- a/mi/micmap.c
+++ b/mi/micmap.c
@@ -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);
-- 
1.9.3



More information about the xorg-devel mailing list