Repository navigation
feat(libSceFreeType): copy and convert guest bitmaps - #8286
adriadam10 merged 5 commits into
Conversation
|
The same paragraph asks that an entry state the gap first (what differs from the console, what is unverified, what throws). In this entry the first two sentences describe the implementation, "console behavior and errors have not been measured" comes third, and what throws comes last. I would move the entry under the existing - [FT_Bitmap_New, FT_Bitmap_Copy, FT_Bitmap_Convert, FT_Bitmap_Done](../../../core/libs/prx/libSceFreeType/src/Bitmap.cpp) (libSceFreeType) - console behaviour and error codes are not measured; these follow the bundled FreeType 2.13.3. Copy and Convert throw when source and target share a non-null buffer, and Convert throws when they are the same object |
|
I checked the current head and confirmed the debt entry still sits under the new |
821c6c1 to
5a5c21e
Compare
5a5c21e to
211dc98
Compare
|
Addressed the requested documentation placement in For #9550, confirmed the merge order: bitmap registration and the additional size-object declarations are distinct and both must be retained. |
jotitadev
left a comment
There was a problem hiding this comment.
First Linux run (the PR lists Windows only). Ubuntu 26.04, glibc 2.43, x86_64 i7-8700, GCC 15.2.0, head 6133773 merged --no-commit onto origin/main 7e2ba73 (clean, the branch is ~680 commits behind).
- Release:
guest_freetype_bitmap,guest_freetype,guest_freetype_charmapandpatched_librariespass. -DANYPS5_ENABLE_ASAN=ON(ASan + UBSan + LeakSanitizer):guest_freetype_bitmappasses with no report, including the forced allocation failure and the repeated convert/cleanup cases.guest_freetypepasses too.- Not from this PR:
guest_freetype_charmapfails under LeakSanitizer onmainas well (16920 bytes in 95 allocations, fromFT_Init_FreeType_nid_postfixandFT_New_Face_nid_postfixatGuestFreeTypeCharmap.cpp:83-85, never released). Same result with and without this PR.
No control run: the FT_Bitmap_* exports don't exist on main, so the new test doesn't link there.
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
|
Combined integration check on freshly fetched main The local integration contains the current heads of #8286, #9045, #9054, #9064, #9069, #9075, #9090, #9785, #9792 and #9802. It exercises all eleven FreeType tests, both normal/NID protocol-selection runs, and loading all 367 packaged libraries. The only manual integration resolution combined both sets of CMake source/test registrations when adding the bitmap branch; no implementation changes were needed. The integration branch is local verification, and the contribution PRs remain separate. Environment: Windows 11 x64, WinLibs GCC 15.2.0, Ninja Release, bundled dependencies, BUILD_TESTING=ON and SPIRV-Tools disabled. No console/title or Linux/macOS claim. |
|
Thanks for the independent Linux and sanitizer validation. I added attribution and the exact tested inputs to the PR description: Release 4/4; bitmap and base FreeType pass with ASan/UBSan/LeakSanitizer. I also recorded the charmap fixture's 16,920-byte/95-allocation leak as reproduced on main, rather than claiming that fixture is sanitizer-clean. The bitmap implementation and the already-corrected debt placement are unchanged. The #9550 merge-order agreement remains: retain both bitmap-registration and size-object declarations. |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
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.
|
|
Refreshed to Full default Windows build and 4/4 focused CTests pass. Local Ubuntu 24.04.1/WSL2, GCC 13.3/glibc 2.39: complete libs build and 4/4 focused tests, each repeated three times, including the 368-library loader, pass. The body now separates these fresh local results from the earlier independent Linux report. Newer main The earlier Linux release and bitmap sanitizer validation by @jotitadev is retained as attributed historical evidence: #8286 (comment). The fresh Linux results below are local, without sanitizers; no fresh sanitizer claim is made. |
|
Checked the bitmap copy/convert/done/new paths against bundled FreeType 2.13.3 ( |
What
The existing
libSceFreeTypebridge can render a glyph bitmap but cannot initialize, retain, convert or release standalone bitmaps. AddFT_Bitmap_New,FT_Bitmap_Copy,FT_Bitmap_ConvertandFT_Bitmap_Doneusing the bundled FreeType allocator and bitmap routines. Copies own their pixel storage; conversion preserves native row direction, alignment, pixel-mode handling and partial output state when allocation fails.A tracked glyph-slot bitmap also updates its native record when changed or freed. The registration is removed when its guest face wrapper is destroyed, so reusing that storage cannot write through a stale native pointer. Copying a bitmap onto itself follows FreeType's no-op behavior; unsupported shared-buffer aliases throw before freeing storage.
Refresh onto fetched main
e3d03fbae64e1b49e5d4e84e753ccce6edf60da5, preserving all merged FreeType features and their registrations/debt entries. The implementation and behavioral fixtures are unchanged. Rechecked newer main74f6fa8e312462bc4b373b5ec498b2eea2b28efcbefore publication: no FreeType production/test/debt file changed in that interval and the branch merges cleanly. Results are pinned to the submitted head, not a claim of rebuilding newer upstream commits.Tested
Submitted head
7f5367d4e4bb603746dbcb91eaaf4d2f490467b0.Windows 11 x64, WinLibs GCC 15.2.0 r7, Ninja Release, bundled dependencies,
BUILD_TESTING=ON,ANYPS5_ENABLE_SPIRV_TOOLS=OFF: full default build passed; 4/4 focused CTests passed, zero skips.Local Ubuntu 24.04.1 x86-64/WSL2 (6.6.87.2), GCC 13.3.0, glibc 2.39, same build options: complete
libsbuild plus selected executables passed; 4/4 focused CTests each passed three consecutive times. This covers the feature, existing base/charmap APIs and the 368-library packaged loader. No fresh title, console or macOS result is claimed.The earlier Linux release and bitmap sanitizer validation by @jotitadev is retained as attributed historical evidence: #8286 (comment). The fresh Linux results below are local, without sanitizers; no fresh sanitizer claim is made.
Whitespace and conventions checks pass. The bitmap refresh retains main's outline, charmap, face-info, list and size-request source/test registrations alongside its own bitmap registration.
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)