feat(libcairo): implement ten Cairo affine matrix exports #14258
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14258"
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 hyvvs on 2026-11-01T04:47:00Z.
What
Implement 10 real previously throwing libcairo exports for the complete guest-visible Cairo affine-matrix family currently in the 3.20 catalogue:
cairo_matrix_init,init_identity,init_translate,translate,scale,rotate,invert,multiply,transform_point, andtransform_distance.Use the published Cairo 48-byte
cairo_matrix_tlayout and C ABI, preserve the original exported symbols with exact typed signatures, handle output aliasing (result == a/b), Cairo status 5 for noninvertible matrices, and distinct point/distance translation behavior. Avoid a new third-party dependency: this math-only subset requires no rendering backend. The algorithms are independently implemented from Cairo's public matrix API documentation. Existing 151 unrelated rendering/font/surface exports remain unimplemented.A focused CTest target exercises construction, matrix multiplication order/aliasing, translation/scale composition order, quarter-turn rotation, points vs distances, inversion round trips, singular diagonal partial mutation, and nonfinite determinants. A scoped technical-debt note records that native PS5 behavior and Cairo revision are not verified.
Tested
-O1 -g -fno-omit-frame-pointer -Wall -Wextra -Werror -fsanitize=address,undefined,ASAN_OPTIONS=detect_leaks=1.-Wall -Wextra -Werror.python tools/tests/test_progress.py(57 tests),python core/libs/tests/test_public_headers.py --audit-only(398 libraries / 25971 exports), conventions,git diff --check.6fe120d11b: system libraries 8810/34009 -> 8820/34009 (+10 real implemented exports), libcairo 0/161 -> 10/161. Inventory denominator unchanged.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T05:01:48Z.
Review: APPROVED
Reviewed — looks good
The implementation and focused tests cover the ten matrix exports, multiplication aliasing, transform order, and singular-matrix handling without a material issue found in the inspected diff.
What I ran
Reviewed head
a855b5a981057334db4aa0c1d4e3f92457814a89, against the PR base6fe120d11ba3b92c56ade1bb783e211d5dc0949e; I also checked a merge preview against currentmain3c3f38be405c063f52dcc3eca2ef29209912f84b, which merged cleanly. Environment: Debian 12 x86_64, GCC 12.2.0, Python 3.11.2. I did not build or run C++ tests locally.Results
libcairo/CMakeLists.txt. The test-quality heuristic's unregistered-test warning is a false positive.main.Unedited command output
Sources
Not verified
No local build, local CTest, or PS5-console differential test. Windows CI had not completed; Linux and specialized hosted jobs were skipped when checked.
Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T19:49:36Z.
Review: COMMENTED
Withdrawn. The
Unblocksline saysCairo matrix-using guests (not measured), notnone. The title-ID requirement is not in CONTRIBUTING.