[Pixman] Performance of radial gradients

Soeren Sandmann sandmann at daimi.au.dk
Fri Feb 19 11:42:08 PST 2010

Luca Barbato <lu_zero at gentoo.org> writes:

> On 02/19/2010 12:57 PM, Siarhei Siamashka wrote:
> > Adding small increments to the values at the end of loop iteration could be
> > the biggest source of precision loss. Replacing this with explicit calculation
> > like 'pdx = pdx0 + cx * n' should improve precision and maybe allow to use
> > floats freely. And floats work better with SIMD on any platforms.
> And all the SIMD we are covering have a multiply-accumulate instruction
> that would be in use, I'm a bit more concerned about the sqrt usage
> though...
> > In any case, seems like radial gradients are not covered by any
> > correctness/precision tests at the moment. This looks like the first
> > thing which needs to be implemented :)
> Indeed =)

Yeah, the main problem is that we need to define what precision
guarantees pixman is supposed to give, and then the various test
suites need to be updated to tolerate such deviations.

Having such a definition written down and the test suites updated
would allow several interesting things:

- Transformations could be floating point. That would fix bug 15355.

- Compositing 565 images could be done with fewer bits, which would be
  both fast and more accurate.

- Gradients could be evaluated in floating point

- The 10bpc images could be composited with floating point

- Radial gradients could be approximated with a polynomial to avoid
  the square root.


More information about the Pixman mailing list