Repository navigation
feat(libSceFreeType): manage multiple size objects - #9550
Conversation
Progress report (58c9977 → ad2b085)📈 System libraries: 49.94% (+0.01%, +3 implemented functions) ✅ 3 implemented
Changed libraries (implemented exports)
|
MarcZX10
left a comment
There was a problem hiding this comment.
The size creation and activation paths are narrowly scoped and have strong native-reference lifecycle coverage. The PR declares its #9437 and FreeType insertion-order dependencies, and the hosted eligibility, intake, labels and report checks pass. The convention check and product/relinker builds are still pending/skipped; I did not run local tests.
I’m requesting changes for one destruction-path issue in the submitted head:
FT_Done_FreeType destroys a face by calling FT_List_Finalize on face->sizes_list. That routine saves cur->next, invokes the size destructor, then proceeds to the saved node. In FinalizeSize, the adapter calls SyncSizePointer_nid_no_patch, which searches face.sizes for host->face->size and throws if it cannot find it. This makes library teardown depend on whether the active native size is still represented in the guest list at each callback. Please add a regression that forces library teardown with several guest sizes and the active size positioned so its guest owner is removed before later size callbacks, and make the callback/teardown path tolerate FreeType's list-finalization order while keeping every callback's guest size record valid. Also verify callbacks still see the expected active-size pointer and metrics where that state is available.
This is based on the bundled FreeType 2.13.3 destroy_face/FT_List_Finalize order and the current callback's lookup/throw behavior; I have not run a local reproduction. Please report the focused test and rerun convention checks after fixing it.
|
The size creation and activation paths are narrowly scoped and have strong native-reference lifecycle coverage. The PR declares its #9437 and FreeType insertion-order dependencies, and the hosted eligibility, intake, labels and report checks pass. The convention check and product/relinker builds are still pending/skipped; I did not run local tests. I’m requesting changes for one destruction-path issue in the submitted head:
This is based on the bundled FreeType 2.13.3 |
|
I opened #9574 for FT_Cos, FT_Sin, FT_Tan, FT_Vector_Unit and FT_Angle_Diff. I declared #9550 for merge order because both patches add different FreeType API includes in GuestFreeType.cpp; its declared chain covers the earlier include insertions. Retain both FT_SIZES_H and FT_TRIGONOMETRY_H. The implementations are independent. |
|
The new teardown-order regression in the description addresses the earlier review concern: the finalizer cases now check each owned guest size record, active pointer and metrics while earlier sizes are finalized. The reported full Windows build and focused native comparisons are detailed. I checked current upstream/main: diff-check and conventions pass, and the merge is clean. This head is 7 ahead/16 behind current main 4777cac (merge base d6732b5); the reported full build used that older base. Please update from current main, rerun the focused FreeType tests/checks on the resulting head, and refresh the Tested commit. Preserve the declared #9437/#8286/#9329/#9545 dependency and #9574 insertion order. I did not run local C++ tests because the root filesystem is full; hosted product/relinker jobs are skipped. |
MarcZX10
left a comment
There was a problem hiding this comment.
The updated implementation and test description appear to resolve my earlier finalizer-order concern. I am retaining changes requested only for current-main freshness: this head is 7 ahead/16 behind upstream/main 4777cac (merge base d6732b5), so update and rerun the focused FreeType suite and convention/overlap checks on the resulting head. The merge is clean and conventions pass on the present head. Keep the declared prerequisite chain (#9437, #8286, #9329, #9545) and #9574 insertion order intact. I did not run tests locally; the filesystem is full.
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
a2f3057 to
65e79d6
Compare
65e79d6 to
c799c39
Compare
c799c39 to
9369ba8
Compare
9369ba8 to
44eed61
Compare
44eed61 to
09ac3a8
Compare
09ac3a8 to
ba7d970
Compare
ba7d970 to
d32f20c
Compare
d32f20c to
85e4388
Compare
85e4388 to
ad2b085
Compare
Dismissing a stale review: the requested changes were addressed after it (new head) and the merge queue blocks on it. Please request changes again if anything is still open.
|
Rebased onto current main (conflict in |
What
A face can have several independently configured pixel sizes, but the guest bridge previously had only one embedded size record and no size-object entry points. Add
FT_New_Size,FT_Activate_SizeandFT_Done_Size, with NIDszyezaHweY3U,EBvr2CZnjVoand-2rnxRCeHMs.Keep stable guest records for additional native sizes, retain the existing default record, and synchronize the active pointer and LP64 metrics without refreshing the glyph slot or overwriting guest outline edits. Deleting an active size selects the same surviving native size; deleting the last one clears
face->size. Size finalizers receive the corresponding record and observe the native active-size selection. Face/library teardown keeps those records alive through all size callbacks and clears the pointer before the face callback. The review follow-up pins this behavior with an active additional size destroyed before later size callbacks; each callback checks its owned guest record, complete current-size metrics and the active pointer against native FreeType.Preserve native error ordering, untouched outputs on precondition failures, output clearing on allocation failure, and the behavior of
FT_New_Size(face, &face->size). Allocate guest storage before native creation so a wrapper allocation failure cannot leak a native size. Native size/list/internal allocation failures are exercised through the public FreeType memory allocator.The names/NIDs match the pinned PS5 3.20 inventory. Contracts and destruction order follow bundled FreeType 2.13.3 ftobjs.c and ftsizes.h. Console ABI/version and finalizer equivalence remain unverified and are recorded in debt.
Depends on #9437 for the native face-lifetime fix; its implementation and regression coverage remain included, with the current #9437 head
60a0f0f5e2ef9ee462718108dd3a27a8a1c495bdused for comparison. #9437 declares #9419 for debt insertion order. #8286, #9545, #9574 and #9384 have merged; their bitmap, CID, trigonometry and strike-selection implementation/tests remain in this rebased tree, along with main's outline-copy/decomposition coverage. No title unblock or performance improvement is claimed.Tested
Rebased on upstream
main0119103fa9ed65a894a931da02b6510669991b45; tested PR head85e43880cf84adbd140203e09ff58e3a1b34d918. Windows 11 Pro 10.0.26300, Ryzen 9 7900X, 31.7 GiB RAM, WinLibs MinGW-w64 GCC 15.2.0 UCRT, Ninja, Release,BUILD_TESTING=ON, pinned bundled dependencies (FreeType 2.13.3). These tests used the CPU.cmake --build <build> --target libSceFreeType 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, followed bycmake --build <build> --target guest_font_metrics_tests guest_font_style_information_tests guest_font_outline_profile_tests --parallel 8: production FreeType and all focused fixtures built successfully without a source overlay.ctest --test-dir <build> -R '^(guest_freetype.*|guest_.*font.*|font_.*)$' -V --output-on-failure --no-tests=error: 20/20 passed, zero skips. Size regression: 24 lifecycles, 468 rendered glyphs and 48 injected allocation failures compared with native FreeType. Included fix(libSceFreeType): preserve referenced face lifetimes #9437 regression: 28 retains, 24 non-final releases and eight finalized faces, including reentrant callbacks and owned file bytes. Main'sFT_Select_Sizeregression also passed (26 native request comparisons and 18 bitmap glyph comparisons), alongside its outline, CID and trigonometry coverage and the three new font tests.ctest --test-dir <build> -R '^public_headers($|_compile_)' -j 8 --output-on-failure --no-tests=error: 65/65 passed, zero skips. The conflict inApi.hppwas resolved by retaining both main'sFT_Select_Sizedeclaration and this PR's face-reference/size-object declarations.git range-diff 50a4f824fc3ee23177d8e1effbe306e50150187f..d32f20c97e5188902f77ff525303f7252e4071d0 0119103fa9ed65a894a931da02b6510669991b45..85e43880cf84adbd140203e09ff58e3a1b34d918: all three commits retained; changes are API declaration integration and surrounding context, with the teardown regression unchanged.python tools/check_conventions.py --base origin/main,python tools/check_main_sync.py --base origin/main --strict,git diff origin/main...HEAD --check, andpython tools/check_test_registration.py <build>passed.python tools/pr_overlap.py --branch codex/pr9550-rebase-20261024 --repo boykopovar/AnyPS5 --jobs 12completed against the same main. fix(libSceFreeType): preserve referenced face lifetimes #9437 is the inherited face-reference implementation and feat(libSceFreeType): implement vector and matrix geometry #9419 its documentation-order predecessor; old feat(libSceFreeType): manage multiple size objects #9550 is the expected self-match. Manual shared-file comparisons confirmed feat(libSceFreeType): implement FT_Open_Face for memory and path sources #10604 (FT_Open_Face), feat(libSceFreeType): implement FT_Done_Library and FT_Reference_Library #10606 (library references), feat(libSceFreeType): implement FT_Get_PS_Font_Value and FT_Attach_File #10616 (FT_Attach_File), feat(libSceFreeType): add partial bitmap and outline glyph ownership #9465 (glyph debt) and fix(libSceFreeType): preserve helpers through NID patching #9848 (macOS debt cleanup) change distinct behavior. Adjacent insertions must retain both changes during later rebases.The baseline lacks the guest size exports required by the size regression. Console ABI/version, title impact and generic-finalizer equivalence remain unverified as recorded in debt. The complete all-target build, patched-libraries loader, complete CTest suite and a title run were not performed on this rebased head; earlier full-build/loader results are historical evidence only.
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)