[cairo] Faster Radial Gradients patch

David Turner david at freetype.org
Thu Mar 8 03:07:15 PST 2007


  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.


  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)


- David Turner
- The FreeType Project  (www.freetype.org)

More information about the cairo mailing list