summaryrefslogtreecommitdiff
path: root/hw/xquartz/xpr
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2009-07-31 15:32:07 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2009-07-31 15:34:13 -0700
commitae65daab080c6269f0eadc6be1a48bf27866c542 (patch)
tree4f32c5d07f08094dab8b62d028748f5fa56df004 /hw/xquartz/xpr
parent4a53fed41d711f270c7d8a7fbeaafb4fb619e879 (diff)
XQuartz: Unify how we set our bitmasks for visuals
(cherry picked from commit c230b52c27ce50ac6c27011ec8e88f1b263b25f9)
Diffstat (limited to 'hw/xquartz/xpr')
-rw-r--r--hw/xquartz/xpr/xprScreen.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 3ffb926ac..3387ecf0a 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;
}