Around 0 o'clock on Nov 7, Olivier Chapuis wrote: > ?? With static class the colors are already defined. It is a 3/3/2 > standard colormap (StaticColor) and you do not have to allocate or free > the colors. There are consecutive the colormap is full (and the > code is perfect first = 0, last = num_entries-1).
Actually, StaticColor in fb allocates a 6x6x6 cube and a gray ramp; 3/3/2 is useless for applications. > Fine. So you can have (in theory) first = 0 and last = 255 and render want > to use only 71 entries in the cmap. Now take a look at FindBestColor (it > takes a look at undefined entries). The XFree86 server always places zeros in unallocated entries, so FindBestColor will just skip over those. In any case, the point is moot now because the current implementation doesn't do this anymore because... > Of course this have some (theoretical) importance for QueryPictIndexValues > (In my patch I've assumed that the allocation is consecutive). QueryPictIndexValues doesn't make this assumption anymore. That's what required having the pixel allocation code save all of the pixel values (which is can now use in FindBestColor and FindBestGray). QueryPictIndexValues is quite cheap now; it just copies precomputed data off to the client. Keith Packard XFree86 Core Team HP Cambridge Research Lab _______________________________________________ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert
