Re: pre-allocated colors (a patch)
Keith Packard <[email protected]> Thu, 05 Sep 2002 15:20:33 -0700
| Newsgroups | gmane.comp.xfree86.render |
|---|---|
| Message-ID | <E17n4zJ-0000du-00@localhost> |
Around 22 o'clock on Sep 5, Olivier Chapuis wrote: > After some times I discover that it is the XRender extension which does > that and I take a look at the code: xc/programs/Xserver/render/miindex.c. > There is something strange in the code: too many colors are allocated with > a PseudoColor visual class, only the color cube is used but some greys are > also allocated (in depth 8, 28/21 colors "lost"). Attached to this message > a patch which fixes this. The intent is that there be more resolution along the grey axis for AA text; a 4x4x4 (or 6x6x6) cube gives too few gray entries. The RGB->pixel conversion table should identify gray values and pick the nearer extra gray values rather than other entries in the cube. I just realized now that the RGB->pixel uses a 32x32x32 table to do the conversion; it might be better to allocate gray values exactly aligned with those instead of some random ramp. Perhaps 16 gray values in addition to the 4x4x4 cube would be a better solution. Keith Packard XFree86 Core Team HP Cambridge Research Lab