[cairo] Pixman coordinates

Jonathan Morton jonathan.morton at movial.com
Wed Jul 7 02:59:57 PDT 2010

> The irony is that from a binding point of view, everything is in double
> precision. Like I really need beyond 6 significant figures to specify alpha
> composition. So we've got way more resolution than we need (and it comes at
> a price from a call point of view, since it's twice as much data to put on
> the bus, even if the op of manipulating them is all done in 80bit land). But
> then when we get into these guts issues, we're trying to figure out how to
> maximize the precision we can express in a 32bit integer.

I personally think that handling paths in fixed-point is a mistake.
By all means represent the resulting tesselation in an integer-based
format to speed up rasterisation, but everything prior to that
probably should be in at least single precision, if not double.  That
would at least mitigate some of the problems described by Inkscape

Another irony is that modern FPUs can be faster at handling
floating-point than the rest of the CPU can handle fixed-point
arithmetic.  There are now very few CPUs on the market where the
reverse is true (one of them is the Cortex-A8 with stock GCC and/or
double-precision, but not with LLVM and single precision).  That is at
least true for the 2^N-1 system used for colour values, as distinct
from the 2^N system used for most other purposes, but I don't believe
there is a big slowdown from using even double-precision vs. the
present 16.16 or 24.8 formats on AMD64 or PowerPC CPUs.  Or, for that
matter, on Cortex-A9.

 - Jonathan Morton

More information about the cairo mailing list