[cairo] Any plan to address the 32768px limit ?

Uli Schlachter psychon at znc.in
Sat Jul 24 08:24:34 UTC 2021


Hi,

Am 23.07.21 um 23:29 schrieb ChameleonScales:
[...]
> Is there any intention to change that in order to support larger images?

For me personally: Nope, I have no such intention.

> Otherwise could the source code be easily edited to make a custom build of Cairo with an increased limit?

Well, not easily, I guess. According to the comment next to the limit
[0], this limit exists because pixman has an API using a 16.16 format.
I don't know how much of the API exists in which version, but apparently
there are several fixed point formats in pixman [1]. However, searching
for e.g. "pixman_fixed_32" in pixman.h produces basically no hits while
pixman_fixed_t appears everywhere.

(IIRC cairo mostly uses a 24.8 format, but I am not entirely sure.)

So, I guess you first need to change pixman's API and then port cairo to
that new API.

Cheers,
Uli

[0]:
https://gitlab.freedesktop.org/cairo/cairo/-/blob/994eccefc0a778d291a8dbbb4143280b38a7ad80/src/cairo-image-surface.c#L58-62
[1]:
https://gitlab.freedesktop.org/pixman/pixman/-/blob/aaf59b0338fbd4b9142794254261f8d0a018b60c/pixman/pixman.h#L115-123

-- 
<alanc> I think someone had a Xprint version of glxgears at one point,
    but benchmarking how many GL pages you can print per second
    was deemed too silly to merge


More information about the cairo mailing list