Split Linux platform target and move runtime/platform state

This commit is contained in:
2026-06-17 01:20:11 +02:00
parent 90a55b86fe
commit 3ce365fc15
16 changed files with 169 additions and 94 deletions

View File

@@ -41,8 +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` no longer compiles Apple implementation files, but it
still compiles concrete Linux platform sources
- `pp_platform_api` no longer compiles Apple or Linux implementation files,
but broader concrete platform ownership is still not fully separated
- `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
@@ -770,6 +770,9 @@ Current slice:
- the remaining Windows app shell in `main(...)` now also routes through
`run_main_application(...)` in `src/platform_windows/windows_runtime_shell.*`,
which reduces `src/main.cpp` to a minimal `main`/`WinMain` wrapper
- the retained Win32 main-thread task queue now also lives in `AppRuntime`
instead of `src/platform_windows/windows_platform_services.cpp`, which
removes another runtime queue from retained platform-local static state
- prepared-file background work now runs through an `AppRuntime`-owned worker
queue instead of a retained static worker in `src/app_events.cpp`
- canvas async import/export/save/open background work now also runs through an
@@ -1077,8 +1080,13 @@ Current slice:
- 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.
- `pp_platform_api` now also stops compiling
`src/platform_linux/linux_platform_services.*`.
- Linux concrete platform code now lives in the new `pp_platform_linux`
target, and `pp_legacy_app` plus `pp_platform_api_tests` now link that
concrete target where needed.
- The dependency direction is cleaner for Apple and Linux, but the broader
concrete platform family is still being separated.
Write scope:
- `CMakeLists.txt`
@@ -1093,8 +1101,8 @@ Read scope:
Done when:
- `pp_platform_api` contains only platform-neutral interfaces, policies, and
shared helpers.
- Apple implementation files are built by a concrete platform target instead of
the API target.
- Apple and Linux implementation files are built by concrete platform targets
instead of the API target.
- The dependency direction is obvious from CMake without reading debt notes.
Mini-model packet:
@@ -1145,6 +1153,10 @@ Current slice:
snapshots without direct `App::I` reads in the touched paths
- retained Apple callback injection and broader `platform_legacy` singleton
reach are still open
- the `platform_legacy`-mirrored Apple/GLFW handle cluster is now seeded
explicitly from the iOS, macOS, Linux, and WebGL entrypoints through
`src/platform_legacy/legacy_platform_state.*` instead of being copied out
of `App`
- The remaining Win32 shell wrappers for close, async lock/swap,
stylus/FPS updates, VR start/stop, window-state save, and the
window-handle accessor now live in
@@ -1188,8 +1200,12 @@ Current slice:
`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.
- The `platform_legacy`-mirrored Apple/GLFW handle cluster also no longer
lives on `App`; retained Apple/GLFW platform state is now seeded explicitly
from the iOS, macOS, Linux, and WebGL entrypoints through
`src/platform_legacy/legacy_platform_state.*`.
- `App` still owns Android-native handles plus broader retained legacy
platform state, so this remains a live ownership task.
Write scope:
- `src/platform_legacy/legacy_platform_services.*`