feat(libSceFreeType): decompose guest outlines #9560
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9560"
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 Ondra97 on 2026-10-22T02:20:11Z.
What
Add
FT_Outline_Decompose(NID++lgV9pRsO4) so callers can consume guest outlines through move, line, quadratic and cubic callbacks. The existing bridge can load and render an outline but has no entry point for callers that need its path segments.Describe the 48-byte LP64 callback table and invoke its System V callbacks directly with 64-bit guest vectors. Walk guest coordinates without narrowing them through Windows' 32-bit native
FT_Pos. Preserve implicit on-curve midpoints, contour closure, degenerate segments, low tag bits, partial callback sequences on invalid outlines, and the exact nonzero value returned by a callback. Each call has local traversal state; callback changes to the emitter table take effect, while shift/delta and the current contour's array pointers retain the native snapshot behavior.The name/NID comes from the pinned PS5 3.20 inventory. The layout and behavior follow bundled FreeType 2.13.3 ftoutln.c and ftimage.h. Console ABI and version equivalence remain unverified. The debt entry also records throwing paths for undefined signed overflow and nonempty outlines with shifts outside 0-62. Valid arrays and the callbacks a contour uses remain caller requirements.
Merge after #9465 for the shared guest-record/debt insertion, retaining the existing insertion-order prerequisite previously declared through #9519. #9519 is now merged into main; its outline-copy implementation, public declaration, debt entry and regressions remain included alongside decomposition. #9530, #9574, #9054, #9309 and #9329 are also merged. #9588 includes the glyph records from #9465 and implements a separate control-box query; preserve those records alongside GuestOutlineFuncs. The decomposition implementation is independent. No other open PR adds this decomposition export.
No title unblock or performance improvement is claimed.
Tested
Rebased on upstream
main52a8bed576e5c54a7f443728cdf663a080f8f9ed; tested PR head110f43a331d865b126e09e29e713f43c42176437. Windows 11 Pro 10.0.26300, Ryzen 9 7900X, 31.7 GiB RAM, NVIDIA GeForce RTX 4070 Ti SUPER, WinLibs MinGW-w64 GCC 15.2.0 UCRT, Ninja, Release,BUILD_TESTING=ON, pinned bundled dependencies. These FreeType/font tests use the CPU.cmake --build <build> --target relinker libs patched_libraries_tests guest_freetype_tests guest_freetype_bitmap_tests guest_freetype_request_size_tests guest_freetype_outline_tests guest_freetype_outline_mutations_tests guest_freetype_charmap_tests guest_freetype_charmap_info_tests guest_freetype_face_info_tests guest_freetype_names_tests guest_freetype_sfnt_names_tests guest_freetype_list_tests guest_font_tests guest_system_font_tests guest_font_writing_line_tests font_face_lifetime_tests --parallel 8: production relinker, patched libraries and all selected fixtures built successfully from the rebased source.ctest --test-dir <build> -R '^(guest_freetype.*|guest_.*font.*|font_.*|patched_libraries)$' -V --output-on-failure --no-tests=error: 18/18 passed, zero skips; 368 patched libraries loaded, none failed. Decomposition performed 49,416 native comparisons, 72,732 callbacks and eight rendered glyphs, including wide coordinates and callback mutation. The merged outline-copy regression also passed 178 cases and three rendered copies; main's Gasp, trigonometry, orientation and CID regressions remain executed.ctest --test-dir <build> -R '^public_headers($|_compile_)' -j 4 --output-on-failure --no-tests=error: 65/65 passed, zero skips. Both outline exports retain their separate public declarations inApi.hpp; the test uses the public declaration andGuestLibrary*type.objdump -p <build>/core/libs/libs/libSceFreeType.prxconfirms packaged NID++lgV9pRsO4.OutlineDecompose.cppis byte-identical to the previous submitted implementation.git range-diffretains the single feature commit and its substantive test assertions; conflict resolutions preserve both outline exports and their debt entries, and the automatic test merge retainsCheckOutlineCopies()alongsideOutlineDecomposition().python tools/check_conventions.py --base origin/main,python tools/check_main_sync.py --base origin/main --strict,git diff origin/main...HEAD --checkandpython tools/check_test_registration.py <build>: passed.python tools/pr_overlap.py --branch codex/pr9560-rebase-20261024 --repo boykopovar/AnyPS5 --jobs 12completed. #9465 remains the insertion-order prerequisite; #9588 includes the same glyph records and adds a distinct query. Manual inspection of the shared files in conflicting #9848 and #10593 found separate macOS symbol-visibility and glyph-slot-synthesis changes. The old hosted #9560 head is the expected self-match. No other open PR duplicates the decomposition export.No title/homebrew run or complete CTest suite is claimed on this rebased head. Console callback ABI/version equivalence remains unverified as recorded in debt.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by Ondra97 on 2026-10-22T02:48:34Z.
I opened #9574 for FT_Cos, FT_Sin, FT_Tan, FT_Vector_Unit and FT_Angle_Diff. I declared #9560 for merge order because the patches share CMake, prototype, helper, test-call and debt insertion points. Retain both OutlineDecompose.cpp and Trigonometry.cpp, their declarations, tests and debt entries. The implementations are independent.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T04:15:01Z.
Review: CHANGES_REQUESTED
The LP64 adapter, callback behavior, bounded-arithmetic exceptions, and native-comparison coverage are documented in unusually useful detail; I found no code-level blocker in the reviewed diff. The remaining repository requirement is base freshness: this branch is based on
8c26eac3, while current upstream main isdce41a89478876a8e3ea9c346b1dac00bb31c8cd(23 commits ahead). Please update from current main and rerun the focused FreeType tests/convention and overlap checks on the resulting head. I checked the intervening commits and none touch the FreeType implementation, tests, or debt files, but the repo still requires branches to be based on current main. The declared dependencies #9054, #9519, #9530 and #9329 are open and their merge order is clearly described; preserve those insertions when rebasing. Hosted eligibility, conventions, intake, labels and report checks pass; product/relinker jobs are skipped. Windows testing in the body is author-reported; I did not run tests locally.Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-22T07:42:20Z.
Review: COMMENTED
Linux run, since the description only covers Windows, where native
FT_Posis 32-bit. On Linux, nativeFT_Posis 64-bit, the other side of the narrowing the description talks about. It passes, and runs clean under ASan and UBSan.Machine: Linux, Ubuntu 26.04, GCC 15.2.0, x86-64. Head
be5a985f8merged withgit merge --no-commitonto currentmaind6eafa54d(clean).BUILD_TESTING=ON,ANYPS5_RELINKER_ONLY=OFF):guest_freetypepasses.-fsanitize=address,undefined -fno-sanitize-recover=undefined -O1 -g,ANYPS5_ENABLE_ASAN=ON, leak detection off):guest_freetype_testsexits 0 with no reports:FreeType outline decomposition: 49416 native comparisons, 72732 callbacks, 8 rendered glyphs, wide coordinates and callback mutation.Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T11:22:09Z.
The new Linux independent run adds useful evidence, including sanitizer coverage and native 64-bit FT_Pos comparison. The declared dependency chain and the follow-up #9574 merge-order note are explicit. I checked the current head against upstream/main: the merge is clean and the only intervening FreeType-path change is the unrelated #7961 merge, but the branch is still 2 ahead/11 behind (merge base
d6eafa54d) while current main is4777caca34. CONTRIBUTING requires the branch to stay current. Please update from current main, rerun the focused FreeType suite and convention/overlap checks, and refresh Tested on that head. I did not run the tests locally due to the full filesystem; the Windows and Linux reports are by the PR author and another reviewer.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T11:22:11Z.
Review: DISMISSED
No code-level blocker surfaced in the reviewed diff, and the PR now has strong Windows and independent Linux evidence. I am retaining changes requested solely for the repository freshness requirement: the head is 2 ahead/11 behind current upstream/main
4777caca34(merge based6eafa54d). Please update and rerun focused FreeType tests plus convention/overlap checks on that head, preserving the declared prerequisites #9054, #9519, #9530 and #9329 and the recorded #9574 insertion order. I did not run tests locally; the filesystem is full.