[cairo] towards 24.8

Behdad Esfahbod behdad at behdad.org
Mon Jun 18 12:32:41 PDT 2007

On Fri, 2007-06-15 at 18:58 -0400, Vladimir Vukicevic wrote:
> There are a number of bugs related to the 16.16 fixed coordinate space 
> that many cairo calculations happen in being too small.  I'd like to do 
> the work to change this to 24.8, and to make it possible to do more 
> easily change that (including optionally allowing cairo to work in 
> doubles or floats, at a performance cost).  There are two large chunks 
> of this work, and I'd like to tackle them separately.  Here's the 
> proposed plan..
> 1. Get cairo using 24.8 instead of 16.16.
>    a. Replace all fixed point ops with macros (where appropriate)
>    b. Change all uses of the fixed fractional bits into using a 
> #define'd constant
>    c. Catch all hardcoded fixed-point ops and replace with 
> macros/functions (multiplication in particular is done "by hand" in a 
> number of places)
>    d. Fix touch points with other fixed-point libraries (xlib, xcb, and 
> pixman) to do the correct format translation
> 2. Get pixman using 24.8 instead of 16.16.
>    a. This depends on getting to a pixman that's maintainable; so I 
> think that this depends on the pixman work that ssp is doing
>    b. Turn this into a compile time option in pixman

So then we cannot share pixman with X server again :).
Maybe by correctly handling overflows and using an integer offset of
some sort, we can manage to handle using a 16.16 pixman/xrender
decently.  Not sure.


> I'm going to focus on #1 first, since #2 is a bit nebulous.  I think 
> that leaving pixman at 16.16 for the time being is a decent compromise, 
> because backends that don't rely on 16.16 fixed will have a bigger 
> coordinate space to play with right away.
> Comments?
>      - Vlad

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759

More information about the cairo mailing list