[Pixman] [cairo] Floating point API in Pixman

Andrea Canciani ranma42 at gmail.com
Thu Aug 12 00:54:36 PDT 2010


2010/8/12 Arjen Nienhuis <a.g.nienhuis at gmail.com>:
> 2010/8/11 Krzysztof Kosiński <tweenk.pl at gmail.com>
>>
>> The 16.16 limitation on gradient coordinates and transformation
>> matrices is insufficient and causes glitches when rendering gradients
>> and bitmaps at 40x zoom, and in certain cases even at 1x zoom. It
>> would be best if gradients could use the full precision of doubles, as
>> exposed in Cairo.
>
> The gradients in your test case
> (https://bugs.freedesktop.org/show_bug.cgi?id=29470) can be rendered fine
> with just 16.16 fixed point math. It's just that the implementation in
> pixman is not very accurate. I guess it's accumulating errors.
To have sufficient accuracy and still be using fixed point math we
will need either a division per pixel or an DDA-like system (to keep
the whole accuracy even with a division we will have to keep quotaient
and remainder and accumulate).
I'm now trying to implement DDA, I think it can be fast enough, I will
push a branch both with floating point and with fixed point arithmetic
and I'll ask to benchmark on your platform of interest. Is this ok?
(I would *really* love if int128_t was actually available!)
Andrea


More information about the Pixman mailing list