Split Apple platform target and move platform state ownership

This commit is contained in:
2026-06-17 01:03:01 +02:00
parent 5fdc9a9dd6
commit 90a55b86fe
18 changed files with 258 additions and 104 deletions

View File

@@ -92,6 +92,20 @@ Current hotspot files:
Latest slice:
- `pp_platform_api` no longer compiles
`src/platform_apple/apple_platform_services.*`; Apple concrete platform
code now lives in the new `pp_platform_apple` target, and
`panopainter_app` plus `pp_platform_api_tests` link that concrete target
where needed.
- Retained GLFW window hooks/state and retained Apple UI/app handle snapshots
now live in `src/platform_legacy/legacy_platform_state.*` instead of staying
inline in `src/platform_legacy/legacy_platform_services.cpp`, which trims
another process-global platform-state pocket out of the legacy platform
shell and removes more direct `App::I` reads from touched platform paths.
- Windows VR session snapshot ownership now lives in
`src/platform_windows/windows_vr_shell.h` and
`src/platform_windows/windows_platform_services.*` instead of on `App`,
with app-side reads now routed through `App::vr_session_snapshot()`.
- The live Windows entry shell now routes through
`run_main_application(...)` in
`src/platform_windows/windows_runtime_shell.*`, leaving `src/main.cpp` as a
@@ -172,8 +186,9 @@ Latest slice:
Current architecture mismatches that must be treated as real blockers:
- `pp_platform_api` still compiles Apple implementation files instead of only
platform-neutral policy and interface code.
- `pp_platform_api` no longer compiles Apple implementation files, but it
still owns concrete Linux platform sources instead of only platform-neutral
policy and interface code.
- `src/platform_apple/apple_platform_services.cpp` no longer reaches `App::I`
directly, and Linux FPS title reporting now uses an injected callback, but
retained Apple bridging in `platform_legacy` and other platform/app coupling
@@ -185,8 +200,10 @@ Current architecture mismatches that must be treated as real blockers:
route through retained local GLFW callback hooks, and retained Apple ObjC
handles plus storage paths now sit behind one local `platform_legacy`
helper instead of being re-read through `App::I` in each touched path, with
the retained GLFW window hooks and fallback storage-path return now also
using local retained-state helpers instead of direct method-body reads.
the retained GLFW window hooks, Apple handle snapshots, and fallback
storage-path return now also using local retained-state helpers instead of
direct method-body reads, while Windows VR session snapshot state now also
lives behind platform-owned helpers instead of on `App`.
- `src/platform_legacy/legacy_platform_services.*` is still part of the live
app shell.
- `pp_panopainter_ui` still depends on `pp_legacy_app`.

View File

@@ -41,7 +41,8 @@ Completed, blocked, and superseded task history moved to
`src/node_stroke_preview.cpp`, `src/app.cpp`, `src/app_dialogs.cpp`, and the
extracted canvas/platform containment files.
- The platform boundary is not finished:
- `pp_platform_api` still compiles Apple implementation files
- `pp_platform_api` no longer compiles Apple implementation files, but it
still compiles concrete Linux platform sources
- `platform_apple` no longer reaches `App::I` directly, and Linux FPS title
reporting now uses an injected callback, but retained Apple bridging and
broader platform-to-app singleton reach are still open in
@@ -1063,11 +1064,21 @@ layer.
#### ARC-PLT-001 - Split `pp_platform_api` From Concrete Platform Code
Status: Ready
Status: In Progress
Why now:
`pp_platform_api` is supposed to be the SDK-free policy and interface layer,
but it still compiles `src/platform_apple/apple_platform_services.*`.
and while Apple implementation has now moved out, it still compiles concrete
Linux platform sources.
Current slice:
- `pp_platform_api` no longer compiles
`src/platform_apple/apple_platform_services.*`.
- Apple concrete platform code now lives in the new `pp_platform_apple`
target, and `panopainter_app` plus `pp_platform_api_tests` now link that
concrete target where needed.
- The dependency direction is cleaner for Apple, but the same split is still
incomplete for Linux and the broader concrete platform family.
Write scope:
- `CMakeLists.txt`
@@ -1128,6 +1139,10 @@ Current slice:
- retained storage-path state now also lives in
`src/platform_legacy/legacy_platform_state.*` instead of staying inline in
`src/platform_legacy/legacy_platform_services.cpp`
- retained GLFW window hooks/state and retained Apple UI/app handle state now
also live in `src/platform_legacy/legacy_platform_state.*`, and
`src/platform_legacy/legacy_platform_services.cpp` now consumes those
snapshots without direct `App::I` reads in the touched paths
- retained Apple callback injection and broader `platform_legacy` singleton
reach are still open
- The remaining Win32 shell wrappers for close, async lock/swap,
@@ -1160,12 +1175,22 @@ Mini-model packet:
#### ARC-PLT-003 - Remove App-Owned Cross-Platform Handle Storage
Status: Ready
Status: In Progress
Why now:
`src/platform_legacy/legacy_platform_services.cpp` and `src/app.h` still keep
platform-handle state on `App`, which blocks a real `pp_platform_*` shell split.
Current slice:
- Windows VR session snapshot ownership no longer lives on `App`.
- `VrSessionSnapshot` now lives behind
`src/platform_windows/windows_vr_shell.h` and
`read_platform_vr_session_snapshot()` in
`src/platform_windows/windows_platform_services.*`, with app-side reads now
routed through `App::vr_session_snapshot()`.
- `App` still owns other platform-facing handles and retained legacy platform
state is not fully removed, so this remains a live ownership task.
Write scope:
- `src/platform_legacy/legacy_platform_services.*`
- `src/app.h`