xserver: Branch 'master'
James Cloos
cloos at kemper.freedesktop.org
Fri Mar 6 10:03:49 PST 2009
hw/xfree86/common/xf86cmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit d1338a94805cc774fe0a5d00c2225a3ee9673a9f
Author: Winfried Grünewald <winfried.gruenewald.ext at eizo-dt.de>
Date: Fri Mar 6 12:59:35 2009 -0500
[hw/xfree86] Fix StaticGray cmap.
Fix this bug report:
,----< from http://bugzilla.freedesktop.org/show_bug.cgi?id=20504 >
| Using the Visual StaticGray (8 bit depth) is missing one gray level.
| The gray level of index zero and index one are the same and all
| other levels are shifted by one. The max level (255) cannot be used.
`----
Signed-off-by: James Cloos <cloos at jhcloos.com>
diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c
index be50a5c..316470d 100644
--- a/hw/xfree86/common/xf86cmap.c
+++ b/hw/xfree86/common/xf86cmap.c
@@ -562,8 +562,8 @@ CMapRefreshColors(ColormapPtr pmap, int defs, int* indices)
switch(pVisual->class) {
case StaticGray:
- for(i = 0; i <= numColors - 1; i++) {
- index = i * maxValue / numColors;
+ for(i = 0; i < numColors; i++) {
+ index = (i+1) * maxValue / numColors;
colors[i].red = gamma[index].red;
colors[i].green = gamma[index].green;
colors[i].blue = gamma[index].blue;
More information about the xorg-commit
mailing list