[Pixman] [cairo] [PATCHES] gradient color-tolerance/performance work
Chris Toshok
toshok at gmail.com
Wed Apr 7 14:34:00 PDT 2010
I've pushed changes to my git repo such that the double is passed all
the way down, i.e.:
void pixman_image_set_color_tolerance (pixman_image_t* image, double
tolerance);
The mapping is essentially unchanged, we just pick a different number of
entries for the lookup tables depending on the value of tolerance. But
all this is hidden from the user.
but I'm unclear what you mean about the mapping breaking. Unfortunately
the color lookup tables aren't any use in respecting an error tolerance
at render time (unless we're going to interpolate between cached values,
but that kinda defeats the purpose of the lookup table - to remove per
pixel color calculations). Or did you mean something about the ranges?
ala (0.0,0.5] => MEDIUM?.
Chris
On 04/06/2010 10:40 AM, Andrea Canciani wrote:
> On Tue, Apr 6, 2010 at 6:07 PM, Chris Toshok<toshok at gmail.com> wrote:
>
>> On 04/06/2010 04:58 AM, Adrian Johnson wrote:
>>
>>> Something like
>>>
>>> cairo_pattern_set_color_tolerance (double error)
>>>
>>> would be more flexible and could be used directly by the PS/PDF backends.
>>>
>> done. the cairo change now uses a double for color tolerance, while pixman
>> retains the enum. _cairo_color_tolerance_to_pixman_color_tolerance now maps
>> 0.0 => LOW, (0.0,0.5) => MEDIUM, [0.5,1.0] => HIGH. 0.0 is the default.
>>
> If LOW, MEDIUM, HIGH are defined as in your first mail, this mapping breaks
> the assumption that the error should be no more than the given tolerance.
> Would it be possible to change pixman to respect it?
> Andrea Canciani
>
More information about the Pixman
mailing list