libcairo: build it from the Cairo and pixman sources instead of reimplementing the API #19098
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by BSchneppe on 2026-11-12T19:13:26Z.
libcairo is a hand-written reimplementation of the Cairo API. 90 of its 161 exports are implemented (matrices, image surfaces, contexts, paths, regions, font options, PNG writing), and the pull requests that added them were checked against native Cairo 1.18. Nothing draws yet:
cairo_set_source_rgb,cairo_paint,cairo_fill,cairo_stroke,cairo_clip,cairo_mask, the pattern exports and the text and font exports still callNotImplemented_nid_no_patch. What is left is the rasterizer, compositing, patterns and font rendering, which is most of Cairo's code.Proposal
Add Cairo and pixman as submodules under
3rdparty/, build them from source with CMake as is already done for harfbuzz and fontconfig, and turncore/libs/prx/libcairointo a guest-ABI wrapper around them.src/cairo-pattern.cwith its copyright notice.What it costs
cairo_write_func_t,cairo_read_func_tand thecairo_destroy_func_tof user data.cairo_ft_*exports take anFT_Faceand anFcPatternthat the guest got from libfreetype and libfontconfig. The wrapper has to accept the objects those two libraries hand out.Open questions
libcairo.sprxcarry?docs/dev/debt/libSceNKWebKitRequirements.mdcompares that module's exports with cairo 1.18.2 and pixman 0.42.2. Nobody has checkedlibcairo.sprxitself.I can do the port if this direction is accepted.
AI-assisted: yes. Claude Code read the libcairo sources, the debt files and the open pull requests, and drafted this issue.