xserver: Branch 'xorg-server-1.6-apple' - 5 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Fri Jul 31 15:34:22 PDT 2009
hw/xquartz/GL/visualConfigs.c | 32 --
hw/xquartz/Makefile.am | 2
hw/xquartz/darwin.c | 54 ----
hw/xquartz/darwin.h | 17 -
hw/xquartz/darwinClut8.h | 531 ------------------------------------------
hw/xquartz/darwinfb.h | 56 ++++
hw/xquartz/quartzAudio.c | 10
hw/xquartz/xpr/xprScreen.c | 29 --
8 files changed, 84 insertions(+), 647 deletions(-)
New commits:
commit 869e60d2ce4fd67887f6a8aab438c825f7a07208
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Fri Jul 31 15:32:07 2009 -0700
XQuartz: Unify how we set our bitmasks for visuals
(cherry picked from commit c230b52c27ce50ac6c27011ec8e88f1b263b25f9)
diff --git a/hw/xquartz/GL/visualConfigs.c b/hw/xquartz/GL/visualConfigs.c
index 46addaf..fee665d 100644
--- a/hw/xquartz/GL/visualConfigs.c
+++ b/hw/xquartz/GL/visualConfigs.c
@@ -55,8 +55,7 @@
#include "capabilities.h"
#include "visualConfigs.h"
-
-#define MASK(l,h) (((1 << (1 + h - l)) - 1) << l)
+#include "darwinfb.h"
/* Based originally on code from indirect.c which was based on code from i830_dri.c. */
__GLXconfig *__glXAquaCreateVisualConfigs(int *numConfigsPtr, int screenNumber) {
@@ -182,29 +181,22 @@ __GLXconfig *__glXAquaCreateVisualConfigs(int *numConfigsPtr, int screenNumber)
}
// Color
- c->rgbBits = 0;
-
- c->blueBits = conf->color_buffers[color].b;
- c->blueMask = MASK(c->rgbBits, c->rgbBits + c->blueBits - 1);
- c->rgbBits += c->blueBits;
-
- c->greenBits = conf->color_buffers[color].g;
- c->greenMask = MASK(c->rgbBits, c->rgbBits + c->greenBits - 1);
- c->rgbBits += c->greenBits;
-
- c->redBits = conf->color_buffers[color].r;
- c->redMask = MASK(c->rgbBits, c->rgbBits + c->redBits - 1);
- c->rgbBits += c->redBits;
-
if(GLCAPS_COLOR_BUF_INVALID_VALUE != conf->color_buffers[color].a) {
c->alphaBits = conf->color_buffers[color].a;
- c->alphaMask = MASK(c->rgbBits, c->rgbBits + c->alphaBits - 1);
- c->rgbBits += c->alphaBits;
} else {
c->alphaBits = 0;
- c->alphaMask = 0;
}
+ c->redBits = conf->color_buffers[color].r;
+ c->greenBits = conf->color_buffers[color].g;
+ c->blueBits = conf->color_buffers[color].b;
+ c->rgbBits = c->alphaBits + c->redBits + c->greenBits + c->blueBits;
+
+ c->alphaMask = AM_ARGB(c->alphaBits, c->redBits, c->greenBits, c->blueBits);
+ c->redMask = RM_ARGB(c->alphaBits, c->redBits, c->greenBits, c->blueBits);
+ c->greenMask = GM_ARGB(c->alphaBits, c->redBits, c->greenBits, c->blueBits);
+ c->blueMask = BM_ARGB(c->alphaBits, c->redBits, c->greenBits, c->blueBits);
+
// Accumulation Buffers
if(conf->total_accum_buffers > 0) {
c->accumRedBits = conf->accum_buffers[accum].r;
diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index 653ae13..ae8aa7f 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -42,6 +42,7 @@ EXTRA_DIST = \
X11Controller.h \
applewmExt.h \
darwin.h \
+ darwinfb.h \
darwinEvents.h \
keysym2ucs.h \
pseudoramiX.h \
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index 2611c5e..d7ce14d 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -215,17 +215,10 @@ static Bool DarwinScreenInit(int index, ScreenPtr pScreen, int argc, char **argv
// TODO: Make PseudoColor visuals not suck in TrueColor mode
// if(dfb->depth > 8)
// miSetVisualTypesAndMasks(8, PseudoColorMask, 8, PseudoColor, 0, 0, 0);
-
-#if 0
- /*
- * These aren't used anymore. xpr/xprScreen.c initializes the dfb struct
- * above based on the display properties.
- */
if(dfb->depth > 15)
- miSetVisualTypesAndMasks(15, LARGE_VISUALS, 5, TrueColor, 0x7c00, 0x03e0, 0x001f);
+ miSetVisualTypesAndMasks(15, TrueColorMask, 5, TrueColor, RM_ARGB(0,5,5,5), GM_ARGB(0,5,5,5), BM_ARGB(0,5,5,5));
if(dfb->depth > 24)
- miSetVisualTypesAndMasks(24, LARGE_VISUALS, 8, TrueColor, 0x00ff0000, 0x0000ff00, 0x000000ff);
-#endif
+ miSetVisualTypesAndMasks(24, TrueColorMask, 8, TrueColor, RM_ARGB(0,8,8,8), GM_ARGB(0,8,8,8), BM_ARGB(0,8,8,8));
miSetPixmapDepths();
@@ -247,29 +240,6 @@ static Bool DarwinScreenInit(int index, ScreenPtr pScreen, int argc, char **argv
return FALSE;
}
-// ErrorF("Screen type: %d, %d=%d, %d=%d, %d=%d, %x=%x=%x, %x=%x=%x, %x=%x=%x\n", pScreen->visuals->class,
-// pScreen->visuals->offsetRed, dfb->bitsPerRGB * 2,
-// pScreen->visuals->offsetGreen, dfb->bitsPerRGB,
-// pScreen->visuals->offsetBlue, 0,
-// pScreen->visuals->redMask, dfb->redMask, ((1<<dfb->bitsPerRGB)-1) << pScreen->visuals->offsetRed,
-// pScreen->visuals->greenMask, dfb->greenMask, ((1<<dfb->bitsPerRGB)-1) << pScreen->visuals->offsetGreen,
-// pScreen->visuals->blueMask, dfb->blueMask, ((1<<dfb->bitsPerRGB)-1) << pScreen->visuals->offsetBlue);
-
- // set the RGB order correctly for TrueColor
-// if (dfb->bitsPerPixel > 8) {
-// for (i = 0, visual = pScreen->visuals; // someday we may have more than 1
-// i < pScreen->numVisuals; i++, visual++) {
-// if (visual->class == TrueColor) {
-// visual->offsetRed = bitsPerRGB * 2;
-// visual->offsetGreen = bitsPerRGB;
-// visual->offsetBlue = 0;
-// visual->redMask = ((1<<bitsPerRGB)-1) << visual->offsetRed;
-// visual->greenMask = ((1<<bitsPerRGB)-1) << visual->offsetGreen;
-// visual->blueMask = ((1<<bitsPerRGB)-1) << visual->offsetBlue;
-// }
-// }
-// }
-
#ifdef RENDER
if (! fbPictureInit(pScreen, 0, 0)) {
return FALSE;
diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h
index 7fb9396..586044f 100644
--- a/hw/xquartz/darwin.h
+++ b/hw/xquartz/darwin.h
@@ -36,22 +36,7 @@
#include "threadSafety.h"
-typedef struct {
- void *framebuffer;
- int x;
- int y;
- int width;
- int height;
- int pitch;
- int depth;
- int visuals;
- int bitsPerRGB;
- int bitsPerPixel;
- int preferredCVC;
- Pixel redMask;
- Pixel greenMask;
- Pixel blueMask;
-} DarwinFramebufferRec, *DarwinFramebufferPtr;
+#include "darwinfb.h"
// From darwin.c
void DarwinPrintBanner(void);
diff --git a/hw/xquartz/darwinfb.h b/hw/xquartz/darwinfb.h
new file mode 100644
index 0000000..dab6d4b
--- /dev/null
+++ b/hw/xquartz/darwinfb.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2009 Apple, Inc.
+ * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written authorization.
+ */
+
+#ifndef _DARWIN_FB_H
+#define _DARWIN_DB_H
+
+#include "scrnintstr.h"
+
+typedef struct {
+ void *framebuffer;
+ int x;
+ int y;
+ int width;
+ int height;
+ int pitch;
+ int depth;
+ int visuals;
+ int bitsPerRGB;
+ int bitsPerPixel;
+ int preferredCVC;
+ Pixel redMask;
+ Pixel greenMask;
+ Pixel blueMask;
+} DarwinFramebufferRec, *DarwinFramebufferPtr;
+
+#define MASK_LH(l,h) (((1 << (1 + (h) - (l))) - 1) << (l))
+#define BM_ARGB(a,r,g,b) MASK_LH(0, (b) - 1)
+#define GM_ARGB(a,r,g,b) MASK_LH(b, (b) + (g) - 1)
+#define RM_ARGB(a,r,g,b) MASK_LH((b) + (g), (b) + (g) + (r) - 1)
+#define AM_ARGB(a,r,g,b) MASK_LH((b) + (g) + (r), (b) + (g) + (r) + (a) - 1)
+
+#endif /* _DARWIN_FB_H */
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 3ffb926..3387ecf 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -277,22 +277,9 @@ xprAddScreen(int index, ScreenPtr pScreen)
if(depth == -1) {
depth = CGDisplaySamplesPerPixel(kCGDirectMainDisplay) * CGDisplayBitsPerSample(kCGDirectMainDisplay);
- //dfb->depth = CGDisplaySamplesPerPixel(kCGDirectMainDisplay) * CGDisplayBitsPerSample(kCGDirectMainDisplay);
- //dfb->bitsPerRGB = CGDisplayBitsPerSample(kCGDirectMainDisplay);
- //dfb->bitsPerPixel = CGDisplayBitsPerPixel(kCGDirectMainDisplay);
}
switch(depth) {
-// case -8: // broken
-// dfb->visuals = (1 << StaticGray) | (1 << GrayScale);
-// dfb->preferredCVC = GrayScale;
-// dfb->depth = 8;
-// dfb->bitsPerRGB = 8;
-// dfb->bitsPerPixel = 8;
-// dfb->redMask = 0;
-// dfb->greenMask = 0;
-// dfb->blueMask = 0;
-// break;
case 8: // pseudo-working
dfb->visuals = PseudoColorMask;
dfb->preferredCVC = PseudoColor;
@@ -309,9 +296,9 @@ xprAddScreen(int index, ScreenPtr pScreen)
dfb->depth = 15;
dfb->bitsPerRGB = 5;
dfb->bitsPerPixel = 16;
- dfb->redMask = 0x7c00;
- dfb->greenMask = 0x03e0;
- dfb->blueMask = 0x001f;
+ dfb->redMask = RM_ARGB(0,5,5,5);
+ dfb->greenMask = GM_ARGB(0,5,5,5);
+ dfb->blueMask = BM_ARGB(0,5,5,5);
break;
// case 24:
default:
@@ -322,9 +309,9 @@ xprAddScreen(int index, ScreenPtr pScreen)
dfb->depth = 24;
dfb->bitsPerRGB = 8;
dfb->bitsPerPixel = 32;
- dfb->redMask = 0x00ff0000;
- dfb->greenMask = 0x0000ff00;
- dfb->blueMask = 0x000000ff;
+ dfb->redMask = RM_ARGB(0,8,8,8);
+ dfb->greenMask = GM_ARGB(0,8,8,8);
+ dfb->blueMask = BM_ARGB(0,8,8,8);
break;
}
commit 1c983175f635ed001caeb20e11bcfdb9881e045b
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Fri Jul 31 14:19:50 2009 -0700
XQuartz: Dead code removal for StaticColor visual
(cherry picked from commit e457a44e87950207f6c16bf82bf5af11c777ecf1)
diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index e5e2e9e..653ae13 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -41,7 +41,6 @@ EXTRA_DIST = \
X11Application.h \
X11Controller.h \
applewmExt.h \
- darwinClut8.h \
darwin.h \
darwinEvents.h \
keysym2ucs.h \
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index ff1d3d0..2611c5e 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -73,7 +73,6 @@
#include "darwinEvents.h"
#include "quartzKeyboard.h"
#include "quartz.h"
-//#include "darwinClut8.h"
#ifdef ENABLE_DEBUG_LOG
FILE *debug_log_fp = NULL;
@@ -295,21 +294,6 @@ static Bool DarwinScreenInit(int index, ScreenPtr pScreen, int argc, char **argv
return FALSE;
}
- /* Set the colormap to the statically defined one if we're in 8 bit
- * mode and we're using a fixed color map. Essentially this translates
- * to Darwin/x86 in 8-bit mode.
- */
-// if(dfb->depth == 8) {
-// ColormapPtr map = RootlessGetColormap (pScreen);
-// for( i = 0; i < map->pVisual->ColormapEntries; i++ ) {
-// Entry *ent = map->red + i;
-// ErrorF("Setting lo %d -> r: %04x g: %04x b: %04x\n", i, darwinClut8[i].red, darwinClut8[i].green, darwinClut8[i].blue);
-// ent->co.local.red = darwinClut8[i].red;
-// ent->co.local.green = darwinClut8[i].green;
-// ent->co.local.blue = darwinClut8[i].blue;
-// }
-// }
-
dixScreenOrigins[index].x = dfb->x;
dixScreenOrigins[index].y = dfb->y;
diff --git a/hw/xquartz/darwinClut8.h b/hw/xquartz/darwinClut8.h
deleted file mode 100644
index 8e914f3..0000000
--- a/hw/xquartz/darwinClut8.h
+++ /dev/null
@@ -1,531 +0,0 @@
-/*
- * Darwin default 8-bit Colormap for StaticColor
- */
-
-#ifndef _DARWIN_CLUT8_
-#define _DARWIN_CLUT8_
-
-#ifdef USE_NEW_CLUT
-
-static xColorItem darwinClut8[] = {
- { 0, 0xffff, 0xffff, 0xffff, 0, 0 },
- { 1, 0xfefe, 0xfefe, 0xfefe, 0, 0 },
- { 2, 0xfdfd, 0xfdfd, 0xfdfd, 0, 0 },
- { 3, 0xb8b8, 0x2727, 0x2b2b, 0, 0 },
- { 4, 0xfcfc, 0xfcfc, 0xfcfc, 0, 0 },
- { 5, 0xffff, 0xffff, 0x0, 0, 0 },
- { 6, 0xfafa, 0xfafa, 0xfafa, 0, 0 },
- { 7, 0xf9f9, 0xf9f9, 0xf9f9, 0, 0 },
- { 8, 0xf8f8, 0xf8f8, 0xf8f8, 0, 0 },
- { 9, 0xf7f7, 0xf7f7, 0xf7f7, 0, 0 },
- { 10, 0xf6f6, 0xf6f6, 0xf6f6, 0, 0 },
- { 11, 0xf5f5, 0xf5f5, 0xf5f5, 0, 0 },
- { 12, 0xf4f4, 0xf4f4, 0xf4f4, 0, 0 },
- { 13, 0xf2f2, 0xf2f2, 0xf2f2, 0, 0 },
- { 14, 0xf1f1, 0xf1f1, 0xf1f1, 0, 0 },
- { 15, 0x0, 0x0, 0x0, 0, 0 },
- { 16, 0xefef, 0xefef, 0xefef, 0, 0 },
- { 17, 0xeeee, 0xeeee, 0xeeee, 0, 0 },
- { 18, 0xeded, 0xeded, 0xeded, 0, 0 },
- { 19, 0xebeb, 0xebeb, 0xebeb, 0, 0 },
- { 20, 0xe8e8, 0xe8e8, 0xe8e8, 0, 0 },
- { 21, 0xe7e7, 0xe7e7, 0xe7e7, 0, 0 },
- { 22, 0xc9c9, 0x3838, 0x3e3e, 0, 0 },
- { 23, 0xe5e5, 0xe5e5, 0xe5e5, 0, 0 },
- { 24, 0xffff, 0x0, 0xffff, 0, 0 },
- { 25, 0xfbfb, 0xfbfb, 0xfbfb, 0, 0 },
- { 26, 0xdede, 0x6c6c, 0x7272, 0, 0 },
- { 27, 0xe0e0, 0xe0e0, 0xe0e0, 0, 0 },
- { 28, 0xe8e8, 0x8686, 0x9090, 0, 0 },
- { 29, 0xdede, 0xdede, 0xdede, 0, 0 },
- { 30, 0xdddd, 0xdddd, 0xdddd, 0, 0 },
- { 31, 0xd3d3, 0x7e7e, 0x8d8d, 0, 0 },
- { 32, 0xd9d9, 0xd9d9, 0xd9d9, 0, 0 },
- { 33, 0xf3f3, 0x9696, 0xa6a6, 0, 0 },
- { 34, 0xb1b1, 0x1c1c, 0x3939, 0, 0 },
- { 35, 0xffff, 0x0, 0x0, 0, 0 },
- { 36, 0xbebe, 0x5e5e, 0x7272, 0, 0 },
- { 37, 0xd3d3, 0xd3d3, 0xd3d3, 0, 0 },
- { 38, 0xc6c6, 0x2e2e, 0x6767, 0, 0 },
- { 39, 0xd1d1, 0xd1d1, 0xd1d1, 0, 0 },
- { 40, 0xa3a3, 0x606, 0x4545, 0, 0 },
- { 41, 0xcece, 0xcece, 0xcece, 0, 0 },
- { 42, 0xcccc, 0xcccc, 0xffff, 0, 0 },
- { 43, 0xcccc, 0xcccc, 0xcccc, 0, 0 },
- { 44, 0xc6c6, 0x8f8f, 0xa7a7, 0, 0 },
- { 45, 0xe1e1, 0xd3d3, 0xd9d9, 0, 0 },
- { 46, 0xcece, 0x9e9e, 0xb4b4, 0, 0 },
- { 47, 0xcaca, 0xcaca, 0xcaca, 0, 0 },
- { 48, 0xbfbf, 0x3f3f, 0x7d7d, 0, 0 },
- { 49, 0xc9c9, 0xc9c9, 0xc9c9, 0, 0 },
- { 50, 0xf4f4, 0x8989, 0xbebe, 0, 0 },
- { 51, 0xc6c6, 0xc6c6, 0xc6c6, 0, 0 },
- { 52, 0xd6d6, 0x5151, 0x9797, 0, 0 },
- { 53, 0xc9c9, 0x2c2c, 0x8484, 0, 0 },
- { 54, 0x9696, 0x1a1a, 0x6a6a, 0, 0 },
- { 55, 0xc2c2, 0xc2c2, 0xc2c2, 0, 0 },
- { 56, 0xf3f3, 0x6f6f, 0xc6c6, 0, 0 },
- { 57, 0xe5e5, 0x4c4c, 0xbbbb, 0, 0 },
- { 58, 0xb7b7, 0x5a5a, 0x9c9c, 0, 0 },
- { 59, 0xbfbf, 0xbfbf, 0xbfbf, 0, 0 },
- { 60, 0xbebe, 0xbebe, 0xbebe, 0, 0 },
- { 61, 0xbdbd, 0xbdbd, 0xbdbd, 0, 0 },
- { 62, 0xb8b8, 0x2121, 0xa2a2, 0, 0 },
- { 63, 0xd3d3, 0x4444, 0xc0c0, 0, 0 },
- { 64, 0xc2c2, 0x6666, 0xb7b7, 0, 0 },
- { 65, 0xf4f4, 0x6666, 0xe6e6, 0, 0 },
- { 66, 0xfcfc, 0x7373, 0xfdfd, 0, 0 },
- { 67, 0xb9b9, 0xb9b9, 0xb9b9, 0, 0 },
- { 68, 0xeaea, 0xdfdf, 0xeaea, 0, 0 },
- { 69, 0xd4d4, 0x7171, 0xd5d5, 0, 0 },
- { 70, 0xf9f9, 0x8b8b, 0xffff, 0, 0 },
- { 71, 0xf5f5, 0xadad, 0xffff, 0, 0 },
- { 72, 0xbcbc, 0x9292, 0xc2c2, 0, 0 },
- { 73, 0xc7c7, 0x4f4f, 0xd9d9, 0, 0 },
- { 74, 0xa0a0, 0x4444, 0xafaf, 0, 0 },
- { 75, 0xc8c8, 0x8c8c, 0xd5d5, 0, 0 },
- { 76, 0xd7d7, 0x7474, 0xf7f7, 0, 0 },
- { 77, 0xb4b4, 0xb4b4, 0xb4b4, 0, 0 },
- { 78, 0xdada, 0x9595, 0xf9f9, 0, 0 },
- { 79, 0xeded, 0xcbcb, 0xffff, 0, 0 },
- { 80, 0xb2b2, 0xb2b2, 0xb2b2, 0, 0 },
- { 81, 0xa1a1, 0x6161, 0xd7d7, 0, 0 },
- { 82, 0xb2b2, 0x8585, 0xe2e2, 0, 0 },
- { 83, 0x5959, 0x2626, 0x9c9c, 0, 0 },
- { 84, 0x7c7c, 0x5151, 0xcccc, 0, 0 },
- { 85, 0xb0b0, 0xb0b0, 0xb0b0, 0, 0 },
- { 86, 0xb4b4, 0x8e8e, 0xfcfc, 0, 0 },
- { 87, 0xd5d5, 0xc0c0, 0xffff, 0, 0 },
- { 88, 0x5d5d, 0x3232, 0xcccc, 0, 0 },
- { 89, 0x7b7b, 0x5c5c, 0xe5e5, 0, 0 },
- { 90, 0xc0c0, 0xb0b0, 0xfdfd, 0, 0 },
- { 91, 0x6060, 0x5353, 0xadad, 0, 0 },
- { 92, 0x1212, 0xc0c, 0x7e7e, 0, 0 },
- { 93, 0x2e2e, 0x2929, 0x9999, 0, 0 },
- { 94, 0x7979, 0x7878, 0xe9e9, 0, 0 },
- { 95, 0x5b5b, 0x5c5c, 0xd0d0, 0, 0 },
- { 96, 0x6969, 0x6a6a, 0xcccc, 0, 0 },
- { 97, 0x9393, 0x9494, 0xf8f8, 0, 0 },
- { 98, 0x9292, 0x9292, 0xc3c3, 0, 0 },
- { 99, 0x4141, 0x4444, 0xbaba, 0, 0 },
- { 100, 0xa8a8, 0xabab, 0xffff, 0, 0 },
- { 101, 0xa3a3, 0xa3a3, 0xa3a3, 0, 0 },
- { 102, 0xdbdb, 0xdddd, 0xeaea, 0, 0 },
- { 103, 0x3131, 0x4949, 0xaaaa, 0, 0 },
- { 104, 0x7070, 0x8f8f, 0xf9f9, 0, 0 },
- { 105, 0x4848, 0x6666, 0xc1c1, 0, 0 },
- { 106, 0x5c5c, 0x7e7e, 0xe9e9, 0, 0 },
- { 107, 0xe2e2, 0xe5e5, 0xebeb, 0, 0 },
- { 108, 0xb0b0, 0xcdcd, 0xffff, 0, 0 },
- { 109, 0x6c6c, 0x8989, 0xb7b7, 0, 0 },
- { 110, 0x3434, 0x6565, 0xafaf, 0, 0 },
- { 111, 0x8c8c, 0xb9b9, 0xffff, 0, 0 },
- { 112, 0x3737, 0x7979, 0xd4d4, 0, 0 },
- { 113, 0x5a5a, 0x9999, 0xeaea, 0, 0 },
- { 114, 0xe0e, 0x4c4c, 0x9595, 0, 0 },
- { 115, 0x7979, 0xb9b9, 0xffff, 0, 0 },
- { 116, 0x8a8a, 0xa3a3, 0xbcbc, 0, 0 },
- { 117, 0x2020, 0x6161, 0x9d9d, 0, 0 },
- { 118, 0x8f8f, 0xaeae, 0xcaca, 0, 0 },
- { 119, 0xa0a, 0x6060, 0xa8a8, 0, 0 },
- { 120, 0x3f3f, 0x9494, 0xd9d9, 0, 0 },
- { 121, 0x6363, 0xb5b5, 0xf9f9, 0, 0 },
- { 122, 0xe2e2, 0xe8e8, 0xeded, 0, 0 },
- { 123, 0x2828, 0x6a6a, 0x9999, 0, 0 },
- { 124, 0x5555, 0xb2b2, 0xe7e7, 0, 0 },
- { 125, 0x3232, 0x8989, 0xa9a9, 0, 0 },
- { 126, 0xcfcf, 0xdada, 0xdede, 0, 0 },
- { 127, 0x2929, 0xa1a1, 0xc7c7, 0, 0 },
- { 128, 0x8686, 0xa9a9, 0xb4b4, 0, 0 },
- { 129, 0x0, 0x5f5f, 0x7979, 0, 0 },
- { 130, 0xc0c, 0x7777, 0x8e8e, 0, 0 },
- { 131, 0x1212, 0x8f8f, 0xabab, 0, 0 },
- { 132, 0x4141, 0xbaba, 0xd5d5, 0, 0 },
- { 133, 0x2424, 0x8282, 0x8383, 0, 0 },
- { 134, 0x2c2c, 0xc4c4, 0xc3c3, 0, 0 },
- { 135, 0x1a1a, 0xabab, 0xa6a6, 0, 0 },
- { 136, 0x4b4b, 0xa8a8, 0xa2a2, 0, 0 },
- { 137, 0xa0a, 0x9393, 0x8585, 0, 0 },
- { 138, 0xd0d, 0xa5a5, 0x9696, 0, 0 },
- { 139, 0x2626, 0xbcbc, 0xacac, 0, 0 },
- { 140, 0x404, 0x8181, 0x7272, 0, 0 },
- { 141, 0x1919, 0xb3b3, 0x8686, 0, 0 },
- { 142, 0x2929, 0xc1c1, 0x9494, 0, 0 },
- { 143, 0x2121, 0x9c9c, 0x7171, 0, 0 },
- { 144, 0x202, 0x8c8c, 0x5050, 0, 0 },
- { 145, 0x3535, 0xd0d0, 0x8989, 0, 0 },
- { 146, 0x4646, 0xa5a5, 0x7676, 0, 0 },
- { 147, 0x202, 0x7d7d, 0x3939, 0, 0 },
- { 148, 0x2929, 0xc9c9, 0x7171, 0, 0 },
- { 149, 0x5757, 0xd6d6, 0x8f8f, 0, 0 },
- { 150, 0xa2a2, 0xb5b5, 0xaaaa, 0, 0 },
- { 151, 0x101, 0x8888, 0x2a2a, 0, 0 },
- { 152, 0x7474, 0xbebe, 0x8a8a, 0, 0 },
- { 153, 0x1919, 0xb6b6, 0x4747, 0, 0 },
- { 154, 0x2d2d, 0xc6c6, 0x5151, 0, 0 },
- { 155, 0x3838, 0xdede, 0x5d5d, 0, 0 },
- { 156, 0x4c4c, 0xf4f4, 0x6f6f, 0, 0 },
- { 157, 0x9191, 0x9c9c, 0x9393, 0, 0 },
- { 158, 0x0, 0x8e8e, 0x1919, 0, 0 },
- { 159, 0x1010, 0xafaf, 0x2828, 0, 0 },
- { 160, 0xe3e3, 0xe3e3, 0xe3e3, 0, 0 },
- { 161, 0x808, 0xa1a1, 0x1a1a, 0, 0 },
- { 162, 0x5959, 0xc2c2, 0x6161, 0, 0 },
- { 163, 0xf0f0, 0xf0f0, 0xf0f0, 0, 0 },
- { 164, 0x8f8f, 0x9c9c, 0x9090, 0, 0 },
- { 165, 0x2323, 0xcece, 0x2a2a, 0, 0 },
- { 166, 0x1212, 0xbaba, 0x1717, 0, 0 },
- { 167, 0x101, 0x8a8a, 0x202, 0, 0 },
- { 168, 0x303, 0x9a9a, 0x202, 0, 0 },
- { 169, 0x4040, 0xe4e4, 0x4040, 0, 0 },
- { 170, 0x808, 0xb2b2, 0x505, 0, 0 },
- { 171, 0x1313, 0xcccc, 0xf0f, 0, 0 },
- { 172, 0x3636, 0xd7d7, 0x3232, 0, 0 },
- { 173, 0x2828, 0xe9e9, 0x1f1f, 0, 0 },
- { 174, 0x5353, 0xfbfb, 0x4c4c, 0, 0 },
- { 175, 0x6f6f, 0xafaf, 0x6a6a, 0, 0 },
- { 176, 0x7171, 0xe0e0, 0x6767, 0, 0 },
- { 177, 0x3232, 0xc0c0, 0x1212, 0, 0 },
- { 178, 0x2929, 0xa5a5, 0x808, 0, 0 },
- { 179, 0x5c5c, 0xdddd, 0x3535, 0, 0 },
- { 180, 0x0, 0xffff, 0xffff, 0, 0 },
- { 181, 0x6363, 0xc8c8, 0x4545, 0, 0 },
- { 182, 0x8686, 0xfdfd, 0x5b5b, 0, 0 },
- { 183, 0x7171, 0xf6f6, 0x3939, 0, 0 },
- { 184, 0x5555, 0xcccc, 0x1515, 0, 0 },
- { 185, 0x0, 0xffff, 0x0, 0, 0 },
- { 186, 0x9090, 0xcaca, 0x6e6e, 0, 0 },
- { 187, 0x4343, 0xa7a7, 0x101, 0, 0 },
- { 188, 0x8d8d, 0xe4e4, 0x3737, 0, 0 },
- { 189, 0xb3b3, 0xf0f0, 0x6464, 0, 0 },
- { 190, 0x8585, 0x8e8e, 0x7a7a, 0, 0 },
- { 191, 0xb0b0, 0xfafa, 0x4d4d, 0, 0 },
- { 192, 0xd6d6, 0xd6d6, 0xd6d6, 0, 0 },
- { 193, 0x8888, 0xd0d0, 0x1a1a, 0, 0 },
- { 194, 0x6a6a, 0xa7a7, 0x303, 0, 0 },
- { 195, 0x9898, 0xbfbf, 0x4141, 0, 0 },
- { 196, 0xcdcd, 0xf8f8, 0x5151, 0, 0 },
- { 197, 0x9494, 0xa4a4, 0x5555, 0, 0 },
- { 198, 0x9191, 0xb0b0, 0xa0a, 0, 0 },
- { 199, 0xdada, 0xf1f1, 0x3c3c, 0, 0 },
- { 200, 0xbaba, 0xcaca, 0x5353, 0, 0 },
- { 201, 0xb9b9, 0xc3c3, 0x2828, 0, 0 },
- { 202, 0xb1b1, 0xbaba, 0x1212, 0, 0 },
- { 203, 0xd2d2, 0xd9d9, 0x2626, 0, 0 },
- { 204, 0xe8e8, 0xecec, 0x2d2d, 0, 0 },
- { 205, 0x9898, 0x9696, 0x202, 0, 0 },
- { 206, 0xadad, 0xadad, 0x5c5c, 0, 0 },
- { 207, 0xe2e2, 0xd8d8, 0x3838, 0, 0 },
- { 208, 0xd9d9, 0xc4c4, 0x3838, 0, 0 },
- { 209, 0xa8a8, 0x9a9a, 0x5050, 0, 0 },
- { 210, 0x0, 0x0, 0xffff, 0, 0 },
- { 211, 0xbebe, 0xaeae, 0x5e5e, 0, 0 },
- { 212, 0x9a9a, 0x9898, 0x8e8e, 0, 0 },
- { 213, 0xacac, 0x8d8d, 0xd0d, 0, 0 },
- { 214, 0xc5c5, 0xa0a0, 0x2b2b, 0, 0 },
- { 215, 0xdbdb, 0xb5b5, 0x4848, 0, 0 },
- { 216, 0xdddd, 0x0, 0x0, 0, 0 },
- { 217, 0x9c9c, 0x6d6d, 0x303, 0, 0 },
- { 218, 0xd4d4, 0xa8a8, 0x4747, 0, 0 },
- { 219, 0xb7b7, 0x7171, 0x1717, 0, 0 },
- { 220, 0xdcdc, 0xa1a1, 0x5a5a, 0, 0 },
- { 221, 0xb9b9, 0x9c9c, 0x7c7c, 0, 0 },
- { 222, 0xb4b4, 0xabab, 0xa2a2, 0, 0 },
- { 223, 0x9e9e, 0x4b4b, 0x101, 0, 0 },
- { 224, 0xc8c8, 0x7878, 0x3535, 0, 0 },
- { 225, 0xd2d2, 0x8d8d, 0x5151, 0, 0 },
- { 226, 0xadad, 0x5252, 0xf0f, 0, 0 },
- { 227, 0x0, 0xbbbb, 0x0, 0, 0 },
- { 228, 0xb2b2, 0x6666, 0x3838, 0, 0 },
- { 229, 0xb1b1, 0xa6a6, 0x9f9f, 0, 0 },
- { 230, 0xb1b1, 0x8787, 0x6f6f, 0, 0 },
- { 231, 0xa4a4, 0x3434, 0x303, 0, 0 },
- { 232, 0xeeee, 0x9e9e, 0x8585, 0, 0 },
- { 233, 0xc9c9, 0x7373, 0x5a5a, 0, 0 },
- { 234, 0xe6e6, 0x9494, 0x7c7c, 0, 0 },
- { 235, 0xa9a9, 0x2222, 0x606, 0, 0 },
- { 236, 0xdbdb, 0x8787, 0x7474, 0, 0 },
- { 237, 0xb0b0, 0x2e2e, 0x1515, 0, 0 },
- { 238, 0xb7b7, 0x5a5a, 0x5050, 0, 0 },
- { 239, 0xb2b2, 0x4242, 0x3b3b, 0, 0 },
- { 240, 0xcdcd, 0x7373, 0x6e6e, 0, 0 },
- { 241, 0xd9d9, 0x5858, 0x5858, 0, 0 },
- { 242, 0xacac, 0xacac, 0xacac, 0, 0 },
- { 243, 0xa0a0, 0xa0a0, 0xa0a0, 0, 0 },
- { 244, 0x9a9a, 0x9a9a, 0x9a9a, 0, 0 },
- { 245, 0x9292, 0x9292, 0x9292, 0, 0 },
- { 246, 0x8e8e, 0x8e8e, 0x8e8e, 0, 0 },
- { 247, 0xbbbb, 0xbbbb, 0xbbbb, 0, 0 },
- { 248, 0x8181, 0x8181, 0x8181, 0, 0 },
- { 249, 0x8888, 0x8888, 0x8888, 0, 0 },
- { 250, 0x7777, 0x7777, 0x7777, 0, 0 },
- { 251, 0x5555, 0x5555, 0x5555, 0, 0 },
- { 252, 0x4444, 0x4444, 0x4444, 0, 0 },
- { 253, 0x2222, 0x2222, 0x2222, 0, 0 },
- { 254, 0x7b7b, 0x7b7b, 0x7b7b, 0, 0 },
- { 255, 0x0, 0x0, 0x0, 0, 0 },
-};
-
-#else /* !USE_NEW_CLUT */
-
-static xColorItem darwinClut8[] = {
- { 0, 0x0000, 0x0000, 0x0000, 0, 0 },
- { 1, 0xffff, 0xffff, 0xcccc, 0, 0 },
- { 2, 0xffff, 0xffff, 0x9999, 0, 0 },
- { 3, 0xffff, 0xffff, 0x6666, 0, 0 },
- { 4, 0xffff, 0xffff, 0x3333, 0, 0 },
- { 5, 0xffff, 0xffff, 0x0000, 0, 0 },
- { 6, 0xffff, 0xcccc, 0xffff, 0, 0 },
- { 7, 0xffff, 0xcccc, 0xcccc, 0, 0 },
- { 8, 0xffff, 0xcccc, 0x9999, 0, 0 },
- { 9, 0xffff, 0xcccc, 0x6666, 0, 0 },
- { 10, 0xffff, 0xcccc, 0x3333, 0, 0 },
- { 11, 0xffff, 0xcccc, 0x0000, 0, 0 },
- { 12, 0xffff, 0x9999, 0xffff, 0, 0 },
- { 13, 0xffff, 0x9999, 0xcccc, 0, 0 },
- { 14, 0xffff, 0x9999, 0x9999, 0, 0 },
- { 15, 0xffff, 0x9999, 0x6666, 0, 0 },
- { 16, 0xffff, 0x9999, 0x3333, 0, 0 },
- { 17, 0xffff, 0x9999, 0x0000, 0, 0 },
- { 18, 0xffff, 0x6666, 0xffff, 0, 0 },
- { 19, 0xffff, 0x6666, 0xcccc, 0, 0 },
- { 20, 0xffff, 0x6666, 0x9999, 0, 0 },
- { 21, 0xffff, 0x6666, 0x6666, 0, 0 },
- { 22, 0xffff, 0x6666, 0x3333, 0, 0 },
- { 23, 0xffff, 0x6666, 0x0000, 0, 0 },
- { 24, 0xffff, 0x3333, 0xffff, 0, 0 },
- { 25, 0xffff, 0x3333, 0xcccc, 0, 0 },
- { 26, 0xffff, 0x3333, 0x9999, 0, 0 },
- { 27, 0xffff, 0x3333, 0x6666, 0, 0 },
- { 28, 0xffff, 0x3333, 0x3333, 0, 0 },
- { 29, 0xffff, 0x3333, 0x0000, 0, 0 },
- { 30, 0xffff, 0x0000, 0xffff, 0, 0 },
- { 31, 0xffff, 0x0000, 0xcccc, 0, 0 },
- { 32, 0xffff, 0x0000, 0x9999, 0, 0 },
- { 33, 0xffff, 0x0000, 0x6666, 0, 0 },
- { 34, 0xffff, 0x0000, 0x3333, 0, 0 },
- { 35, 0xffff, 0x0000, 0x0000, 0, 0 },
- { 36, 0xcccc, 0xffff, 0xffff, 0, 0 },
- { 37, 0xcccc, 0xffff, 0xcccc, 0, 0 },
- { 38, 0xcccc, 0xffff, 0x9999, 0, 0 },
- { 39, 0xcccc, 0xffff, 0x6666, 0, 0 },
- { 40, 0xcccc, 0xffff, 0x3333, 0, 0 },
- { 41, 0xcccc, 0xffff, 0x0000, 0, 0 },
- { 42, 0xcccc, 0xcccc, 0xffff, 0, 0 },
- { 43, 0xcccc, 0xcccc, 0xcccc, 0, 0 },
- { 44, 0xcccc, 0xcccc, 0x9999, 0, 0 },
- { 45, 0xcccc, 0xcccc, 0x6666, 0, 0 },
- { 46, 0xcccc, 0xcccc, 0x3333, 0, 0 },
- { 47, 0xcccc, 0xcccc, 0x0000, 0, 0 },
- { 48, 0xcccc, 0x9999, 0xffff, 0, 0 },
- { 49, 0xcccc, 0x9999, 0xcccc, 0, 0 },
- { 50, 0xcccc, 0x9999, 0x9999, 0, 0 },
- { 51, 0xcccc, 0x9999, 0x6666, 0, 0 },
- { 52, 0xcccc, 0x9999, 0x3333, 0, 0 },
- { 53, 0xcccc, 0x9999, 0x0000, 0, 0 },
- { 54, 0xcccc, 0x6666, 0xffff, 0, 0 },
- { 55, 0xcccc, 0x6666, 0xcccc, 0, 0 },
- { 56, 0xcccc, 0x6666, 0x9999, 0, 0 },
- { 57, 0xcccc, 0x6666, 0x6666, 0, 0 },
- { 58, 0xcccc, 0x6666, 0x3333, 0, 0 },
- { 59, 0xcccc, 0x6666, 0x0000, 0, 0 },
- { 60, 0xcccc, 0x3333, 0xffff, 0, 0 },
- { 61, 0xcccc, 0x3333, 0xcccc, 0, 0 },
- { 62, 0xcccc, 0x3333, 0x9999, 0, 0 },
- { 63, 0xcccc, 0x3333, 0x6666, 0, 0 },
- { 64, 0xcccc, 0x3333, 0x3333, 0, 0 },
- { 65, 0xcccc, 0x3333, 0x0000, 0, 0 },
- { 66, 0xcccc, 0x0000, 0xffff, 0, 0 },
- { 67, 0xcccc, 0x0000, 0xcccc, 0, 0 },
- { 68, 0xcccc, 0x0000, 0x9999, 0, 0 },
- { 69, 0xcccc, 0x0000, 0x6666, 0, 0 },
- { 70, 0xcccc, 0x0000, 0x3333, 0, 0 },
- { 71, 0xcccc, 0x0000, 0x0000, 0, 0 },
- { 72, 0x9999, 0xffff, 0xffff, 0, 0 },
- { 73, 0x9999, 0xffff, 0xcccc, 0, 0 },
- { 74, 0x9999, 0xffff, 0x9999, 0, 0 },
- { 75, 0x9999, 0xffff, 0x6666, 0, 0 },
- { 76, 0x9999, 0xffff, 0x3333, 0, 0 },
- { 77, 0x9999, 0xffff, 0x0000, 0, 0 },
- { 78, 0x9999, 0xcccc, 0xffff, 0, 0 },
- { 79, 0x9999, 0xcccc, 0xcccc, 0, 0 },
- { 80, 0x9999, 0xcccc, 0x9999, 0, 0 },
- { 81, 0x9999, 0xcccc, 0x6666, 0, 0 },
- { 82, 0x9999, 0xcccc, 0x3333, 0, 0 },
- { 83, 0x9999, 0xcccc, 0x0000, 0, 0 },
- { 84, 0x9999, 0x9999, 0xffff, 0, 0 },
- { 85, 0x9999, 0x9999, 0xcccc, 0, 0 },
- { 86, 0x9999, 0x9999, 0x9999, 0, 0 },
- { 87, 0x9999, 0x9999, 0x6666, 0, 0 },
- { 88, 0x9999, 0x9999, 0x3333, 0, 0 },
- { 89, 0x9999, 0x9999, 0x0000, 0, 0 },
- { 90, 0x9999, 0x6666, 0xffff, 0, 0 },
- { 91, 0x9999, 0x6666, 0xcccc, 0, 0 },
- { 92, 0x9999, 0x6666, 0x9999, 0, 0 },
- { 93, 0x9999, 0x6666, 0x6666, 0, 0 },
- { 94, 0x9999, 0x6666, 0x3333, 0, 0 },
- { 95, 0x9999, 0x6666, 0x0000, 0, 0 },
- { 96, 0x9999, 0x3333, 0xffff, 0, 0 },
- { 97, 0x9999, 0x3333, 0xcccc, 0, 0 },
- { 98, 0x9999, 0x3333, 0x9999, 0, 0 },
- { 99, 0x9999, 0x3333, 0x6666, 0, 0 },
- { 100, 0x9999, 0x3333, 0x3333, 0, 0 },
- { 101, 0x9999, 0x3333, 0x0000, 0, 0 },
- { 102, 0x9999, 0x0000, 0xffff, 0, 0 },
- { 103, 0x9999, 0x0000, 0xcccc, 0, 0 },
- { 104, 0x9999, 0x0000, 0x9999, 0, 0 },
- { 105, 0x9999, 0x0000, 0x6666, 0, 0 },
- { 106, 0x9999, 0x0000, 0x3333, 0, 0 },
- { 107, 0x9999, 0x0000, 0x0000, 0, 0 },
- { 108, 0x6666, 0xffff, 0xffff, 0, 0 },
- { 109, 0x6666, 0xffff, 0xcccc, 0, 0 },
- { 110, 0x6666, 0xffff, 0x9999, 0, 0 },
- { 111, 0x6666, 0xffff, 0x6666, 0, 0 },
- { 112, 0x6666, 0xffff, 0x3333, 0, 0 },
- { 113, 0x6666, 0xffff, 0x0000, 0, 0 },
- { 114, 0x6666, 0xcccc, 0xffff, 0, 0 },
- { 115, 0x6666, 0xcccc, 0xcccc, 0, 0 },
- { 116, 0x6666, 0xcccc, 0x9999, 0, 0 },
- { 117, 0x6666, 0xcccc, 0x6666, 0, 0 },
- { 118, 0x6666, 0xcccc, 0x3333, 0, 0 },
- { 119, 0x6666, 0xcccc, 0x0000, 0, 0 },
- { 120, 0x6666, 0x9999, 0xffff, 0, 0 },
- { 121, 0x6666, 0x9999, 0xcccc, 0, 0 },
- { 122, 0x6666, 0x9999, 0x9999, 0, 0 },
- { 123, 0x6666, 0x9999, 0x6666, 0, 0 },
- { 124, 0x6666, 0x9999, 0x3333, 0, 0 },
- { 125, 0x6666, 0x9999, 0x0000, 0, 0 },
- { 126, 0x6666, 0x6666, 0xffff, 0, 0 },
- { 127, 0x6666, 0x6666, 0xcccc, 0, 0 },
- { 128, 0x6666, 0x6666, 0x9999, 0, 0 },
- { 129, 0x6666, 0x6666, 0x6666, 0, 0 },
- { 130, 0x6666, 0x6666, 0x3333, 0, 0 },
- { 131, 0x6666, 0x6666, 0x0000, 0, 0 },
- { 132, 0x6666, 0x3333, 0xffff, 0, 0 },
- { 133, 0x6666, 0x3333, 0xcccc, 0, 0 },
- { 134, 0x6666, 0x3333, 0x9999, 0, 0 },
- { 135, 0x6666, 0x3333, 0x6666, 0, 0 },
- { 136, 0x6666, 0x3333, 0x3333, 0, 0 },
- { 137, 0x6666, 0x3333, 0x0000, 0, 0 },
- { 138, 0x6666, 0x0000, 0xffff, 0, 0 },
- { 139, 0x6666, 0x0000, 0xcccc, 0, 0 },
- { 140, 0x6666, 0x0000, 0x9999, 0, 0 },
- { 141, 0x6666, 0x0000, 0x6666, 0, 0 },
- { 142, 0x6666, 0x0000, 0x3333, 0, 0 },
- { 143, 0x6666, 0x0000, 0x0000, 0, 0 },
- { 144, 0x3333, 0xffff, 0xffff, 0, 0 },
- { 145, 0x3333, 0xffff, 0xcccc, 0, 0 },
- { 146, 0x3333, 0xffff, 0x9999, 0, 0 },
- { 147, 0x3333, 0xffff, 0x6666, 0, 0 },
- { 148, 0x3333, 0xffff, 0x3333, 0, 0 },
- { 149, 0x3333, 0xffff, 0x0000, 0, 0 },
- { 150, 0x3333, 0xcccc, 0xffff, 0, 0 },
- { 151, 0x3333, 0xcccc, 0xcccc, 0, 0 },
- { 152, 0x3333, 0xcccc, 0x9999, 0, 0 },
- { 153, 0x3333, 0xcccc, 0x6666, 0, 0 },
- { 154, 0x3333, 0xcccc, 0x3333, 0, 0 },
- { 155, 0x3333, 0xcccc, 0x0000, 0, 0 },
- { 156, 0x3333, 0x9999, 0xffff, 0, 0 },
- { 157, 0x3333, 0x9999, 0xcccc, 0, 0 },
- { 158, 0x3333, 0x9999, 0x9999, 0, 0 },
- { 159, 0x3333, 0x9999, 0x6666, 0, 0 },
- { 160, 0x3333, 0x9999, 0x3333, 0, 0 },
- { 161, 0x3333, 0x9999, 0x0000, 0, 0 },
- { 162, 0x3333, 0x6666, 0xffff, 0, 0 },
- { 163, 0x3333, 0x6666, 0xcccc, 0, 0 },
- { 164, 0x3333, 0x6666, 0x9999, 0, 0 },
- { 165, 0x3333, 0x6666, 0x6666, 0, 0 },
- { 166, 0x3333, 0x6666, 0x3333, 0, 0 },
- { 167, 0x3333, 0x6666, 0x0000, 0, 0 },
- { 168, 0x3333, 0x3333, 0xffff, 0, 0 },
- { 169, 0x3333, 0x3333, 0xcccc, 0, 0 },
- { 170, 0x3333, 0x3333, 0x9999, 0, 0 },
- { 171, 0x3333, 0x3333, 0x6666, 0, 0 },
- { 172, 0x3333, 0x3333, 0x3333, 0, 0 },
- { 173, 0x3333, 0x3333, 0x0000, 0, 0 },
- { 174, 0x3333, 0x0000, 0xffff, 0, 0 },
- { 175, 0x3333, 0x0000, 0xcccc, 0, 0 },
- { 176, 0x3333, 0x0000, 0x9999, 0, 0 },
- { 177, 0x3333, 0x0000, 0x6666, 0, 0 },
- { 178, 0x3333, 0x0000, 0x3333, 0, 0 },
- { 179, 0x3333, 0x0000, 0x0000, 0, 0 },
- { 180, 0x0000, 0xffff, 0xffff, 0, 0 },
- { 181, 0x0000, 0xffff, 0xcccc, 0, 0 },
- { 182, 0x0000, 0xffff, 0x9999, 0, 0 },
- { 183, 0x0000, 0xffff, 0x6666, 0, 0 },
- { 184, 0x0000, 0xffff, 0x3333, 0, 0 },
- { 185, 0x0000, 0xffff, 0x0000, 0, 0 },
- { 186, 0x0000, 0xcccc, 0xffff, 0, 0 },
- { 187, 0x0000, 0xcccc, 0xcccc, 0, 0 },
- { 188, 0x0000, 0xcccc, 0x9999, 0, 0 },
- { 189, 0x0000, 0xcccc, 0x6666, 0, 0 },
- { 190, 0x0000, 0xcccc, 0x3333, 0, 0 },
- { 191, 0x0000, 0xcccc, 0x0000, 0, 0 },
- { 192, 0x0000, 0x9999, 0xffff, 0, 0 },
- { 193, 0x0000, 0x9999, 0xcccc, 0, 0 },
- { 194, 0x0000, 0x9999, 0x9999, 0, 0 },
- { 195, 0x0000, 0x9999, 0x6666, 0, 0 },
- { 196, 0x0000, 0x9999, 0x3333, 0, 0 },
- { 197, 0x0000, 0x9999, 0x0000, 0, 0 },
- { 198, 0x0000, 0x6666, 0xffff, 0, 0 },
- { 199, 0x0000, 0x6666, 0xcccc, 0, 0 },
- { 200, 0x0000, 0x6666, 0x9999, 0, 0 },
- { 201, 0x0000, 0x6666, 0x6666, 0, 0 },
- { 202, 0x0000, 0x6666, 0x3333, 0, 0 },
- { 203, 0x0000, 0x6666, 0x0000, 0, 0 },
- { 204, 0x0000, 0x3333, 0xffff, 0, 0 },
- { 205, 0x0000, 0x3333, 0xcccc, 0, 0 },
- { 206, 0x0000, 0x3333, 0x9999, 0, 0 },
- { 207, 0x0000, 0x3333, 0x6666, 0, 0 },
- { 208, 0x0000, 0x3333, 0x3333, 0, 0 },
- { 209, 0x0000, 0x3333, 0x0000, 0, 0 },
- { 210, 0x0000, 0x0000, 0xffff, 0, 0 },
- { 211, 0x0000, 0x0000, 0xcccc, 0, 0 },
- { 212, 0x0000, 0x0000, 0x9999, 0, 0 },
- { 213, 0x0000, 0x0000, 0x6666, 0, 0 },
- { 214, 0x0000, 0x0000, 0x3333, 0, 0 },
- { 215, 0xeeee, 0x0000, 0x0000, 0, 0 },
- { 216, 0xdddd, 0x0000, 0x0000, 0, 0 },
- { 217, 0xbbbb, 0x0000, 0x0000, 0, 0 },
- { 218, 0xaaaa, 0x0000, 0x0000, 0, 0 },
- { 219, 0x8888, 0x0000, 0x0000, 0, 0 },
- { 220, 0x7777, 0x0000, 0x0000, 0, 0 },
- { 221, 0x5555, 0x0000, 0x0000, 0, 0 },
- { 222, 0x4444, 0x0000, 0x0000, 0, 0 },
- { 223, 0x2222, 0x0000, 0x0000, 0, 0 },
- { 224, 0x1111, 0x0000, 0x0000, 0, 0 },
- { 225, 0x0000, 0xeeee, 0x0000, 0, 0 },
- { 226, 0x0000, 0xdddd, 0x0000, 0, 0 },
- { 227, 0x0000, 0xbbbb, 0x0000, 0, 0 },
- { 228, 0x0000, 0xaaaa, 0x0000, 0, 0 },
- { 229, 0x0000, 0x8888, 0x0000, 0, 0 },
- { 230, 0x0000, 0x7777, 0x0000, 0, 0 },
- { 231, 0x0000, 0x5555, 0x0000, 0, 0 },
- { 232, 0x0000, 0x4444, 0x0000, 0, 0 },
- { 233, 0x0000, 0x2222, 0x0000, 0, 0 },
- { 234, 0x0000, 0x1111, 0x0000, 0, 0 },
- { 235, 0x0000, 0x0000, 0xeeee, 0, 0 },
- { 236, 0x0000, 0x0000, 0xdddd, 0, 0 },
- { 237, 0x0000, 0x0000, 0xbbbb, 0, 0 },
- { 238, 0x0000, 0x0000, 0xaaaa, 0, 0 },
- { 239, 0x0000, 0x0000, 0x8888, 0, 0 },
- { 240, 0x0000, 0x0000, 0x7777, 0, 0 },
- { 241, 0x0000, 0x0000, 0x5555, 0, 0 },
- { 242, 0x0000, 0x0000, 0x4444, 0, 0 },
- { 243, 0x0000, 0x0000, 0x2222, 0, 0 },
- { 244, 0x0000, 0x0000, 0x1111, 0, 0 },
- { 245, 0xeeee, 0xeeee, 0xeeee, 0, 0 },
- { 246, 0xdddd, 0xdddd, 0xdddd, 0, 0 },
- { 247, 0xbbbb, 0xbbbb, 0xbbbb, 0, 0 },
- { 248, 0xaaaa, 0xaaaa, 0xaaaa, 0, 0 },
- { 249, 0x8888, 0x8888, 0x8888, 0, 0 },
- { 250, 0x7777, 0x7777, 0x7777, 0, 0 },
- { 251, 0x5555, 0x5555, 0x5555, 0, 0 },
- { 252, 0x4444, 0x4444, 0x4444, 0, 0 },
- { 253, 0x2222, 0x2222, 0x2222, 0, 0 },
- { 254, 0x1111, 0x1111, 0x1111, 0, 0 },
- { 255, 0xffff, 0xffff, 0xffff, 0, 0 }
-};
-#endif /* USE_NEW_CLUT */
-
-#endif /* _DARWIN_CLUT8_ */
commit ec16bf8ee50320547eda94e48a39a9b2a214ca63
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Fri Jul 31 14:14:21 2009 -0700
XQuartz: Cleanup the bitmask setting for GLX visuals.
(cherry picked from commit d32c3df258e748958ef997c675dc4fae118c0d7b)
diff --git a/hw/xquartz/GL/visualConfigs.c b/hw/xquartz/GL/visualConfigs.c
index 64c8291..46addaf 100644
--- a/hw/xquartz/GL/visualConfigs.c
+++ b/hw/xquartz/GL/visualConfigs.c
@@ -56,6 +56,8 @@
#include "capabilities.h"
#include "visualConfigs.h"
+#define MASK(l,h) (((1 << (1 + h - l)) - 1) << l)
+
/* Based originally on code from indirect.c which was based on code from i830_dri.c. */
__GLXconfig *__glXAquaCreateVisualConfigs(int *numConfigsPtr, int screenNumber) {
int numConfigs = 0;
@@ -180,33 +182,29 @@ __GLXconfig *__glXAquaCreateVisualConfigs(int *numConfigsPtr, int screenNumber)
}
// Color
- c->redBits = conf->color_buffers[color].r;
- c->greenBits = conf->color_buffers[color].g;
+ c->rgbBits = 0;
+
c->blueBits = conf->color_buffers[color].b;
+ c->blueMask = MASK(c->rgbBits, c->rgbBits + c->blueBits - 1);
+ c->rgbBits += c->blueBits;
+
+ c->greenBits = conf->color_buffers[color].g;
+ c->greenMask = MASK(c->rgbBits, c->rgbBits + c->greenBits - 1);
+ c->rgbBits += c->greenBits;
+
+ c->redBits = conf->color_buffers[color].r;
+ c->redMask = MASK(c->rgbBits, c->rgbBits + c->redBits - 1);
+ c->rgbBits += c->redBits;
if(GLCAPS_COLOR_BUF_INVALID_VALUE != conf->color_buffers[color].a) {
c->alphaBits = conf->color_buffers[color].a;
+ c->alphaMask = MASK(c->rgbBits, c->rgbBits + c->alphaBits - 1);
+ c->rgbBits += c->alphaBits;
} else {
c->alphaBits = 0;
+ c->alphaMask = 0;
}
-
- c->rgbBits = c->redBits + c->blueBits +
- c->blueBits + c->alphaBits;
-
- /*
- * I'm uncertain about these masks.
- * I don't think we actually care what the values are in our
- * libGL, so it doesn't seem to make a difference.
- *
- * These need to match dfb in xprScreen.c or we'll have a default
- * visual without a corresponding GLX visual. This causes
- * http://xquartz.macosforge.org/trac/ticket/287
- */
- c->redMask = 0xff0000;
- c->greenMask = 0x00ff00;
- c->blueMask = 0x0000ff;
- c->alphaMask = 0;
-
+
// Accumulation Buffers
if(conf->total_accum_buffers > 0) {
c->accumRedBits = conf->accum_buffers[accum].r;
commit 536acc25ee269e786ab07193af3506e4dca9e091
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Thu Jul 30 01:30:52 2009 -0700
XQuartz: no DirectColor
(cherry picked from commit df2fbc410f2c484612f65a6539a6cb069ef4a468)
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 9a2b1b4..3ffb926 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -304,7 +304,7 @@ xprAddScreen(int index, ScreenPtr pScreen)
dfb->blueMask = 0;
break;
case 15:
- dfb->visuals = LARGE_VISUALS;
+ dfb->visuals = TrueColorMask; //LARGE_VISUALS;
dfb->preferredCVC = TrueColor;
dfb->depth = 15;
dfb->bitsPerRGB = 5;
@@ -317,7 +317,7 @@ xprAddScreen(int index, ScreenPtr pScreen)
default:
if(depth != 24)
ErrorF("Unsupported color depth requested. Defaulting to 24bit. (depth=%d darwinDesiredDepth=%d CGDisplaySamplesPerPixel=%d CGDisplayBitsPerSample=%d)\n", darwinDesiredDepth, depth, (int)CGDisplaySamplesPerPixel(kCGDirectMainDisplay), (int)CGDisplayBitsPerSample(kCGDirectMainDisplay));
- dfb->visuals = LARGE_VISUALS;
+ dfb->visuals = TrueColorMask; //LARGE_VISUALS;
dfb->preferredCVC = TrueColor;
dfb->depth = 24;
dfb->bitsPerRGB = 8;
commit 01a1b79e9898a14d06c6f3521d93acef3a83a3c8
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Thu Jul 30 00:51:55 2009 -0700
XQuartz: Define DDXRingBell
(cherry picked from commit 113347381289497cb2a79994d0ef5f427ae63ac5)
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index f27691e..ff1d3d0 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -152,10 +152,6 @@ const int NUMFORMATS = sizeof(formats)/sizeof(formats[0]);
#define XORG_RELEASE "?"
#endif
-void DDXRingBell(int volume, int pitch, int duration) {
- // FIXME -- make some noise, yo
-}
-
void
DarwinPrintBanner(void)
{
diff --git a/hw/xquartz/quartzAudio.c b/hw/xquartz/quartzAudio.c
index 2123266..8627588 100644
--- a/hw/xquartz/quartzAudio.c
+++ b/hw/xquartz/quartzAudio.c
@@ -211,10 +211,10 @@ QuartzAudioIOProc(
/*
- * QuartzCoreAudioBell
- * Play a tone using the CoreAudio API
+ * DDXRingBell
+ * Play a tone using the CoreAudio API
*/
-static void QuartzCoreAudioBell(
+void DDXRingBell(
int volume, // volume is % of max
int pitch, // pitch is Hz
int duration ) // duration is milliseconds
@@ -239,7 +239,7 @@ static void QuartzCoreAudioBell(
OSStatus status;
status = AudioDeviceStart(quartzAudioDevice, QuartzAudioIOProc);
if (status) {
- ErrorF("QuartzAudioBell: AudioDeviceStart returned %ld\n", (long)status);
+ ErrorF("DDXRingBell: AudioDeviceStart returned %ld\n", (long)status);
} else {
data.playing = TRUE;
}
@@ -276,7 +276,7 @@ void QuartzBell(
if (volume)
NSBeep();
} else {
- QuartzCoreAudioBell(volume, pitch, duration);
+ DDXRingBell(volume, pitch, duration);
}
}
More information about the xorg-commit
mailing list