[cairo] [Patch] make _color_to_short() use
jorn at openedhand.com
Wed Jan 24 09:09:50 PST 2007
On Wed, 2007-01-24 at 11:18 -0500, Behdad Esfahbod wrote:
> On Wed, 2007-01-24 at 09:37 -0500, Jorn Baayen wrote:
> > Hi,
> > I attach a patch to make _color_to_short() in cairo-color.c use
> > _cairo_fixed_from_double(). This does not produce any measurable
> > speedup, but I'd say it's good for consistency.
> cairo_fixed_from_double() rounds, but we want to floor in this case.
> At the end it doesn't really matter as we are talking 16bits of color
> per channel, but also there's no need to regress.
As we are talking 16 bits of relevant data, I was thinking that whether
we round or floor is of little importance (rounding strikes me as more
'right' though, personally). Anyway, as this patch has no measurable
performance impact it probably isn't worth dwelling here much longer.
> > Regards,
> > Jorn
> > _______________________________________________
> > cairo mailing list
> > cairo at cairographics.org
> > http://cairographics.org/cgi-bin/mailman/listinfo/cairo
More information about the cairo