[cairo] Faster Radial Gradients patch
David Turner
david at freetype.org
Thu Mar 8 03:07:15 PST 2007
Hello,
here's a small patchset that speeds up radial gradient rendering up to 1.48x.
the trick is simply to optimize the computations through simplifications and
forward differencing.
http://david.freetype.org/cairo/faster-radial-gradients-1.patchset
other tricks like using fixed point arithmetics, or approximating the square
root extraction per pixel may be used in the future.
note that the patch also introduces support for degenerate cases like
when the two circles are identical, or when they touch on a single point
of contact (respectively A == 0 && B == 0 and A == 0 && B != 0)
Regards,
- David Turner
- The FreeType Project (www.freetype.org)
More information about the cairo
mailing list