[cairo] 32k limit with image surface?

Ian Britten britten at caris.com
Tue Aug 4 10:49:29 PDT 2009


Carl Worth wrote:

[ snip ]

> No, pixman doesn't use X.

[ snip ]

> But pixman still uses 16.16-bit fixed-point integers, so cairo has to
> convert to that for some operations (such as trapezoid rasterization),
> which can be buggy due to data loss as you've noticed. So to eliminate
> more bugs we will want to either teach pixman to accept 24.8-bit
> integers instead, or else code things up in such a way to avoid all
> 16.16-bit interfaces in pixman for the image backend.

Carl,
Many thanks for all the background info, and clarification of the
current state of things!

>> And on a separate note - If there is a limit present, should that not
>> maybe be documented somewhere (eg: cairo_image_surface_create())?
>> And, shouldn't an error be being raised if it's exceeded  (eg:
>> CAIRO_STATUS_SIZE_ERROR)?
> 
> Yes, we probably should do both of these things. Care to help implement
> that?

Well, given that I'm not familiar with Cairo, its internals, Git, the
latest Cairo development, plus my limited time, etc, I think my time
might be better spent with testing/feedback/etc (Such as things like 
this).  I could enter a bug, if you'd like that?
Meanwhile, I can offer some words for the docs (Probably
cairo_image_surface_create() and cairo_image_surface_create_for_data()),
but it's really not much help, in the big scheme of things...  :P
eg:
"Note that due to underlying limitations within Cairo, the maximum size
that an image surface can successfully be made is 32767 x 32767.
Attempting to create a surface larger than this will trigger an error,
since the results would be incorrect otherwise."

Thanks,
Ian


More information about the cairo mailing list