[PATCH 03/18] [RFC] mi: Avoid division by zero errors in miInitializeColormap()

Keith Packard keithp at keithp.com
Mon Apr 8 09:45:01 PDT 2013


Geert Uytterhoeven <geert at linux-m68k.org> writes:

> Question: Should we restrict depth < 3 to grayscale visuals instead?
> For monochrome this is already needed, as miCreateDefColormap() only
> preallocates black and white pixels if depth > 1.

Yes, it doesn't make sense to offer static color and true color for this
hardware. I'd suggest that miInitializeColormap should probably return
failure when trying to initialize a TrueColor or StaticColor colormap
where you're getting a color plane or line instead of a color cube :-)

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20130408/a2ca9996/attachment.pgp>


More information about the xorg-devel mailing list