feat(libcairo): implement cairo_arc and cairo_arc_negative #18404

Closed
simnJS wants to merge 5 commits from upstream-pr/18404 into main
simnJS commented 2026-11-11 13:26:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by simnJS on 2026-11-11T13:26:42Z.


What

Arc.cpp ports src/cairo-arc.c and the major-axis helper of src/cairo-matrix.c from Cairo 1.18.0, as asked on #15679. It is a separate file with the full upstream notice and a Derived from line.

  • Angles are normalized as cairo_arc and cairo_arc_negative do.
  • Arcs longer than pi are split.
  • The number of Bezier segments follows the CTM major axis at the default 0.1 tolerance. The catalogue has no cairo_set_tolerance.
  • A radius of zero or less adds the centre twice.
  • Infinite or NaN angles stop after the first line, as in Cairo.

cairo_curve_to now follows _cairo_path_fixed_curve_to:

  • It drops a preceding degenerate line. Every arc that starts from no current point produces one; without this the path was M L C where Cairo gives M C.
  • A curve that does not move is tested against the last path point before the implicit move. That point survives cairo_new_sub_path and is the origin after cairo_new_path. Before, curve_to(5,5,5,5,5,5) on an empty path gave M L where Cairo gives M C.

Overlap: #18381 implements cairo_rectangle, the operator state and cairo_path_extents. This PR implements none of those exports; it edits the same Export.cpp, InventoryExports.hpp, CMake and debt lines, so whichever lands second needs a merge of main.

Tested

  • Linux (Ubuntu 24.04, GCC 13, Release): the 9 guest_cairo_* tests pass. guest_cairo_arc also passed under ASan and UBSan on an earlier stack of this change.
  • guest_cairo_arc compares 17 arc cases and 9 degenerate-curve cases with the element streams the host's Cairo 1.18.0 gives for the same calls. The comparison is exact except for the non-dyadic scaled and the rotated CTMs (1e-12).
  • It also checks a 70000-turn arc (262144 curves, clamped to 65536 full circles) against Cairo's element count and endpoints.
  • 20000 arcs at extreme scales and radii, run against the host's Cairo: no difference.
  • Not run on Windows.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5260307854 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18404). Originally posted by [simnJS](https://github.com/simnJS) on 2026-11-11T13:26:42Z. --- ### What `Arc.cpp` ports `src/cairo-arc.c` and the major-axis helper of `src/cairo-matrix.c` from Cairo 1.18.0, as asked on #15679. It is a separate file with the full upstream notice and a `Derived from` line. - Angles are normalized as `cairo_arc` and `cairo_arc_negative` do. - Arcs longer than pi are split. - The number of Bezier segments follows the CTM major axis at the default 0.1 tolerance. The catalogue has no `cairo_set_tolerance`. - A radius of zero or less adds the centre twice. - Infinite or NaN angles stop after the first line, as in Cairo. `cairo_curve_to` now follows `_cairo_path_fixed_curve_to`: - It drops a preceding degenerate line. Every arc that starts from no current point produces one; without this the path was `M L C` where Cairo gives `M C`. - A curve that does not move is tested against the last path point before the implicit move. That point survives `cairo_new_sub_path` and is the origin after `cairo_new_path`. Before, `curve_to(5,5,5,5,5,5)` on an empty path gave `M L` where Cairo gives `M C`. Overlap: #18381 implements `cairo_rectangle`, the operator state and `cairo_path_extents`. This PR implements none of those exports; it edits the same `Export.cpp`, `InventoryExports.hpp`, CMake and debt lines, so whichever lands second needs a merge of `main`. ### Tested - Linux (Ubuntu 24.04, GCC 13, Release): the 9 `guest_cairo_*` tests pass. `guest_cairo_arc` also passed under ASan and UBSan on an earlier stack of this change. - `guest_cairo_arc` compares 17 arc cases and 9 degenerate-curve cases with the element streams the host's Cairo 1.18.0 gives for the same calls. The comparison is exact except for the non-dyadic scaled and the rotated CTMs (1e-12). - It also checks a 70000-turn arc (262144 curves, clamped to 65536 full circles) against Cairo's element count and endpoints. - 20000 arcs at extreme scales and radii, run against the host's Cairo: no difference. - Not run on Windows. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
PrivacyOnion commented 2026-11-11 15:59:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-11T15:59:21Z.

Review: CHANGES_REQUESTED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 6f30ec3a22:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_cairo_arc_tests failed to build.
    ftbase.c:(.text+0x1bb7): undefined reference to `FT_Stream_Open'
    ftbase.c:(.text+0x24c7): undefined reference to `FT_Stream_Open'
    ftbase.c:(.text+0x73c8): undefined reference to `FT_Stream_Open'
    ftbase.c:(.text+0x74c8): undefined reference to `FT_Stream_Open'
    ftbase.c:(.text+0x75c8): undefined reference to `FT_Stream_Open'
    /usr/bin/ld: 3rdparty/freetype/libfreetype.a(ftbase.c.o):ftbase.c:(.text+0xe495): more undefined references to `FT_Stream_Open' follow
    ftinit.c:(.text+0x1fc): undefined reference to `FT_New_Memory'
    /usr/bin/ld: ftinit.c:(.text+0x23c): undefined reference to `FT_Done_Memory'
    ftinit.c:(.text+0x276): undefined reference to `FT_Done_Memory'
    collect2: error: ld returned 1 exit status
    
  • Note: the AI-assisted checkbox can stay.

Requesting changes for the points above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5861592091 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18404#pullrequestreview-5861592091). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-11T15:59:21Z. **Review:** CHANGES_REQUESTED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `6f30ec3a22`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_cairo_arc_tests` failed to build. ``` ftbase.c:(.text+0x1bb7): undefined reference to `FT_Stream_Open' ftbase.c:(.text+0x24c7): undefined reference to `FT_Stream_Open' ftbase.c:(.text+0x73c8): undefined reference to `FT_Stream_Open' ftbase.c:(.text+0x74c8): undefined reference to `FT_Stream_Open' ftbase.c:(.text+0x75c8): undefined reference to `FT_Stream_Open' /usr/bin/ld: 3rdparty/freetype/libfreetype.a(ftbase.c.o):ftbase.c:(.text+0xe495): more undefined references to `FT_Stream_Open' follow ftinit.c:(.text+0x1fc): undefined reference to `FT_New_Memory' /usr/bin/ld: ftinit.c:(.text+0x23c): undefined reference to `FT_Done_Memory' ftinit.c:(.text+0x276): undefined reference to `FT_Done_Memory' collect2: error: ld returned 1 exit status ``` - Note: the AI-assisted checkbox can stay. Requesting changes for the points above.
MarcZX10 commented 2026-11-12 14:25:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T14:25:33Z.

Review: COMMENTED


Reviewed cairo_arc and cairo_arc_negative — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

  • Head: 6f30ec3a22a0. Read the run's description, commits, manifest, file list and the full diff. Repository files were read at the head with the reader only.
  • Reader commands:
python3 repo_read.py search AppendLine core/libs/prx/libcairo
python3 repo_read.py cat core/libs/prx/libcairo/Context.cpp 150 215
python3 repo_read.py cat core/libs/prx/libcairo/Context.cpp 520 585
python3 repo_read.py cat core/libs/prx/libcairo/include/Path.hpp 1 20
python3 repo_read.py search "type = 3" core/libs/prx/libcairo
python3 repo_read.py search CairoMatrix core
python3 repo_read.py search kNullPointer core/libs/prx/libcairo
python3 repo_read.py search "Derived from" core/libs/prx
python3 repo_read.py search comment docs/dev/CONVENTIONS.md
  • No build and no test run. The author reports the nine guest_cairo_* tests passing on Ubuntu 24.04, GCC 13, Release; I did not reproduce that.

Results

Check Result Note
Diff of all nine files passed Full diff read
Path logic in Context.cpp passed No defect found in the read code
Build and guest_cairo_arc not run Author-reported only
Test coverage of the degenerate-line drop failed See finding 2

Findings

Blocking

None.

Non-blocking

  1. The stated cause of the dropped degenerate line does not match the code. docs/dev/debt/libcairo.md:27 says the drop is "a preceding degenerate line … which the start of an arc produces". The description says the same for arcs that start from no current point. As I read AppendLine (Context.cpp:176-179), a line_to with no current point becomes a move, so an arc from no current point gives M C with no L. The zero-length L appears when the arc's start equals the current point, for example after a move_to to that point. Suggest rewording both places to that case.

  2. The degenerate-line drop has no test. Context.cpp:546-552 removes a zero-length line before a curve. GuestCairoArc.cpp CheckDegenerateCurves has no M L C case with a zero-length line, and none of the 17 arc references starts at the current point. Suggest a case such as move_to(5,5); line_to(5,5); curve_to(…) expecting MC.

  3. A stale sentence remains in the debt file. docs/dev/debt/libcairo.md:25 still says "arc/rectangle constructors remain pending" for the path-data entry. Arcs are now implemented, so drop "arc" from that sentence.

Not verified

  • The build and the guest_cairo_arc test were not run here. The author's run on Ubuntu 24.04 is not a run I performed.
  • Exact agreement with Cairo 1.18.0 (cairo-arc.c, cairo-matrix.c) was not checked against the upstream sources. The comparison relies on the test's reference values.
  • Windows was not run, as the author says.
  • Compile-level includes were not checked: Arc.cpp gets CairoContextStatus and CairoMatrix through Path.hpp and Context.hpp.
  • The new reset of the current point in cairo_new_path (Context.cpp, diff hunk at line 504) was not checked against the other guest_cairo_* tests, which I did not read.
  • Files: all nine files in files.json reviewed were read through the diff. Context.cpp, Path.hpp and Export.cpp were also read at the head where noted above. Nothing was excluded.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5876088807 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18404#pullrequestreview-5876088807). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-12T14:25:33Z. **Review:** COMMENTED --- # Reviewed cairo_arc and cairo_arc_negative — no blocking findings Nothing blocks this; the points below are optional. ## What I ran - Head: `6f30ec3a22a0`. Read the run's description, commits, manifest, file list and the full diff. Repository files were read at the head with the reader only. - Reader commands: ``` python3 repo_read.py search AppendLine core/libs/prx/libcairo python3 repo_read.py cat core/libs/prx/libcairo/Context.cpp 150 215 python3 repo_read.py cat core/libs/prx/libcairo/Context.cpp 520 585 python3 repo_read.py cat core/libs/prx/libcairo/include/Path.hpp 1 20 python3 repo_read.py search "type = 3" core/libs/prx/libcairo python3 repo_read.py search CairoMatrix core python3 repo_read.py search kNullPointer core/libs/prx/libcairo python3 repo_read.py search "Derived from" core/libs/prx python3 repo_read.py search comment docs/dev/CONVENTIONS.md ``` - No build and no test run. The author reports the nine `guest_cairo_*` tests passing on Ubuntu 24.04, GCC 13, Release; I did not reproduce that. ## Results | Check | Result | Note | | --- | --- | --- | | Diff of all nine files | passed | Full diff read | | Path logic in Context.cpp | passed | No defect found in the read code | | Build and `guest_cairo_arc` | not run | Author-reported only | | Test coverage of the degenerate-line drop | failed | See finding 2 | ## Findings ### Blocking None. ### Non-blocking 1. **The stated cause of the dropped degenerate line does not match the code.** `docs/dev/debt/libcairo.md:27` says the drop is "a preceding degenerate line … which the start of an arc produces". The description says the same for arcs that start from no current point. As I read `AppendLine` (`Context.cpp:176-179`), a `line_to` with no current point becomes a move, so an arc from no current point gives `M C` with no `L`. The zero-length `L` appears when the arc's start equals the current point, for example after a `move_to` to that point. Suggest rewording both places to that case. 2. **The degenerate-line drop has no test.** `Context.cpp:546-552` removes a zero-length line before a curve. `GuestCairoArc.cpp` `CheckDegenerateCurves` has no `M L C` case with a zero-length line, and none of the 17 arc references starts at the current point. Suggest a case such as `move_to(5,5); line_to(5,5); curve_to(…)` expecting `MC`. 3. **A stale sentence remains in the debt file.** `docs/dev/debt/libcairo.md:25` still says "arc/rectangle constructors remain pending" for the path-data entry. Arcs are now implemented, so drop "arc" from that sentence. ## Not verified - The build and the `guest_cairo_arc` test were not run here. The author's run on Ubuntu 24.04 is not a run I performed. - Exact agreement with Cairo 1.18.0 (`cairo-arc.c`, `cairo-matrix.c`) was not checked against the upstream sources. The comparison relies on the test's reference values. - Windows was not run, as the author says. - Compile-level includes were not checked: `Arc.cpp` gets `CairoContextStatus` and `CairoMatrix` through `Path.hpp` and `Context.hpp`. - The new reset of the current point in `cairo_new_path` (`Context.cpp`, diff hunk at line 504) was not checked against the other `guest_cairo_*` tests, which I did not read. - Files: all nine files in `files.json` `reviewed` were read through the diff. `Context.cpp`, `Path.hpp` and `Export.cpp` were also read at the head where noted above. Nothing was excluded. ## To get this to a good state Nothing is required.
PrivacyOnion commented 2026-11-13 19:49:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-13T19:49:14Z.

Review: CHANGES_REQUESTED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 0e740df2d9:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_cairo_arc_tests built cleanly.
  • CTest (guest_cairo_arc):
    1/1 Test #4511: guest_cairo_arc ..................   Passed    0.33 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libcairo/Context.cpp, core/libs/prx/libcairo/Export.cpp, core/libs/prx/libcairo/include/Context.hpp, core/libs/prx/libcairo/include/InventoryExports.hpp, core/libs/prx/libcairo/include/Path.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified cairo_arc and cairo_arc_negative input handling (NaN, infinity, radius <= 0, multi-turn modulo normalization, angle ordering) in Arc.cpp
    • Checked degenerate line elimination and curve-to logic in Context.cpp against path storage bounds and empty path states
    • Audited thread safety, memory allocations (std::nothrow / vector push), null-pointer handling, and status propagation across all changed files
    • Verified export declarations and symbol linkage in Arc.cpp, Export.cpp, InventoryExports.hpp, Path.hpp, and CMakeLists.txt
    • Checked repository conventions in AGENTS.md, documentation in docs/dev/debt/libcairo.md, and test coverage in GuestCairoArc.cpp
  • Concerns:
    • docs/dev/debt/libcairo.md:51: cairo_arc_negative was implemented in this PR and removed from Export.cpp and InventoryExports.hpp, but it was not removed from the table of unimplemented callable exports in docs/dev/debt/libcairo.md, leaving it incorrectly documented as an unverified stub throwing NotImplemented_nid_no_patch. Additionally, cairo_image_surface_create_from_png_stream was erroneously inserted at line 50.
  • Note: the AI-assisted checkbox can stay.

Requesting changes for the points above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5897085813 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18404#pullrequestreview-5897085813). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-13T19:49:14Z. **Review:** CHANGES_REQUESTED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `0e740df2d9`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_cairo_arc_tests` built cleanly. - **CTest** (`guest_cairo_arc`): ``` 1/1 Test #4511: guest_cairo_arc .................. Passed 0.33 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libcairo/Context.cpp`, `core/libs/prx/libcairo/Export.cpp`, `core/libs/prx/libcairo/include/Context.hpp`, `core/libs/prx/libcairo/include/InventoryExports.hpp`, `core/libs/prx/libcairo/include/Path.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified cairo_arc and cairo_arc_negative input handling (NaN, infinity, radius <= 0, multi-turn modulo normalization, angle ordering) in Arc.cpp - Checked degenerate line elimination and curve-to logic in Context.cpp against path storage bounds and empty path states - Audited thread safety, memory allocations (std::nothrow / vector push), null-pointer handling, and status propagation across all changed files - Verified export declarations and symbol linkage in Arc.cpp, Export.cpp, InventoryExports.hpp, Path.hpp, and CMakeLists.txt - Checked repository conventions in AGENTS.md, documentation in docs/dev/debt/libcairo.md, and test coverage in GuestCairoArc.cpp - **Concerns**: - docs/dev/debt/libcairo.md:51: cairo_arc_negative was implemented in this PR and removed from Export.cpp and InventoryExports.hpp, but it was not removed from the table of unimplemented callable exports in docs/dev/debt/libcairo.md, leaving it incorrectly documented as an unverified stub throwing NotImplemented_nid_no_patch. Additionally, cairo_image_surface_create_from_png_stream was erroneously inserted at line 50. - Note: the AI-assisted checkbox can stay. Requesting changes for the points above.
MarcZX10 commented 2026-11-14 01:15:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T01:15:40Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the inspected implementation and added cases support merging.

What I ran

Reviewed head 0e81b461c81f6514704fe1b223798cb503712914 using repo_read.py to inspect the prepared diff and targeted source ranges. No build or tests were run; the test results in the description are author-reported.

Results

Check Result Note
Diff and changed code passed All reviewed files were read
Build and tests not run Results supplied by the author only
Export wiring passed Implementations replace the stubs

Findings

Blocking

None.

Non-blocking

None.

Not verified

No build or tests were run in this review. Windows and physical-console behavior were not verified. Author reports Linux tests and Cairo comparisons in description.md; those results were not independently confirmed. Read all changed files listed in the manifest: core/libs/prx/libcairo/Arc.cpp, core/libs/prx/libcairo/CMakeLists.txt, core/libs/prx/libcairo/Context.cpp, core/libs/prx/libcairo/Export.cpp, core/libs/prx/libcairo/include/Context.hpp, core/libs/prx/libcairo/include/InventoryExports.hpp, core/libs/prx/libcairo/include/Path.hpp, core/libs/tests/GuestCairoArc.cpp, and docs/dev/debt/libcairo.md. No files were excluded by the manifest.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5900343157 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18404#pullrequestreview-5900343157). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-14T01:15:40Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the inspected implementation and added cases support merging. ## What I ran Reviewed head `0e81b461c81f6514704fe1b223798cb503712914` using `repo_read.py` to inspect the prepared diff and targeted source ranges. No build or tests were run; the test results in the description are author-reported. ## Results | Check | Result | Note | |---|---|---| | Diff and changed code | passed | All reviewed files were read | | Build and tests | not run | Results supplied by the author only | | Export wiring | passed | Implementations replace the stubs | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified No build or tests were run in this review. Windows and physical-console behavior were not verified. Author reports Linux tests and Cairo comparisons in `description.md`; those results were not independently confirmed. Read all changed files listed in the manifest: `core/libs/prx/libcairo/Arc.cpp`, `core/libs/prx/libcairo/CMakeLists.txt`, `core/libs/prx/libcairo/Context.cpp`, `core/libs/prx/libcairo/Export.cpp`, `core/libs/prx/libcairo/include/Context.hpp`, `core/libs/prx/libcairo/include/InventoryExports.hpp`, `core/libs/prx/libcairo/include/Path.hpp`, `core/libs/tests/GuestCairoArc.cpp`, and `docs/dev/debt/libcairo.md`. No files were excluded by the manifest. ## To get this to a good state Nothing is required.
PrivacyOnion commented 2026-11-14 01:46:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-14T01:46:52Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 0e81b461c8:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_cairo_arc_tests built cleanly.
  • CTest (guest_cairo_arc):
    1/1 Test #4511: guest_cairo_arc ..................   Passed    0.14 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libcairo/Context.cpp, core/libs/prx/libcairo/Export.cpp, core/libs/prx/libcairo/include/Context.hpp, core/libs/prx/libcairo/include/InventoryExports.hpp, core/libs/prx/libcairo/include/Path.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • core/libs/prx/libcairo/Arc.cpp: verified cairo_arc and cairo_arc_negative input normalization, recursive bisection below pi, Bezier parameterization, and non-positive radius handling matching Cairo 1.18.0
    • core/libs/prx/libcairo/Context.cpp: inspected cairo_curve_to degenerate line drop and degenerate curve conversion against CairoContext status, coordinate scaling, and path storage invariants
    • core/libs/prx/libcairo/CMakeLists.txt: verified shared library target inclusion and guest_cairo_arc test registration with timeout and platform environment properties
    • core/libs/prx/libcairo/include: confirmed Path.hpp, Context.hpp, and InventoryExports.hpp ABI prototypes, calling conventions (APS5_VABI), and struct layout static_asserts
    • AGENTS.md & docs/dev/debt/libcairo.md: verified no forbidden comments in code outside upstream licensing header, proper debt logging, and clean export inventory updates
  • Note: the AI-assisted checkbox can stay.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5900570824 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18404#pullrequestreview-5900570824). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-14T01:46:52Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `0e81b461c8`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_cairo_arc_tests` built cleanly. - **CTest** (`guest_cairo_arc`): ``` 1/1 Test #4511: guest_cairo_arc .................. Passed 0.14 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libcairo/Context.cpp`, `core/libs/prx/libcairo/Export.cpp`, `core/libs/prx/libcairo/include/Context.hpp`, `core/libs/prx/libcairo/include/InventoryExports.hpp`, `core/libs/prx/libcairo/include/Path.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - core/libs/prx/libcairo/Arc.cpp: verified cairo_arc and cairo_arc_negative input normalization, recursive bisection below pi, Bezier parameterization, and non-positive radius handling matching Cairo 1.18.0 - core/libs/prx/libcairo/Context.cpp: inspected cairo_curve_to degenerate line drop and degenerate curve conversion against CairoContext status, coordinate scaling, and path storage invariants - core/libs/prx/libcairo/CMakeLists.txt: verified shared library target inclusion and guest_cairo_arc test registration with timeout and platform environment properties - core/libs/prx/libcairo/include: confirmed Path.hpp, Context.hpp, and InventoryExports.hpp ABI prototypes, calling conventions (APS5_VABI), and struct layout static_asserts - AGENTS.md & docs/dev/debt/libcairo.md: verified no forbidden comments in code outside upstream licensing header, proper debt logging, and clean export inventory updates - Note: the AI-assisted checkbox can stay. Looks Good To Me

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!18404
No description provided.