Extract dialog, VR, and canvas draw helpers

This commit is contained in:
2026-06-16 11:40:00 +02:00
parent 18665bdffc
commit d2a841f348
9 changed files with 566 additions and 377 deletions

View File

@@ -83,12 +83,12 @@ Current hotspot files:
- `src/app_layout.cpp`: 1249 lines
- `src/canvas_modes.cpp`: 1798 lines
- `src/node.cpp`: 1551 lines
- `src/main.cpp`: 1218 lines
- `src/main.cpp`: 1117 lines
- `src/node_panel_brush.cpp`: 1197 lines
- `src/node_stroke_preview.cpp`: 933 lines
- `src/node_canvas.cpp`: 968 lines
- `src/node_canvas.cpp`: 953 lines
- `src/app.cpp`: 950 lines
- `src/app_dialogs.cpp`: 908 lines
- `src/app_dialogs.cpp`: 789 lines
Current architecture mismatches that must be treated as real blockers:
@@ -124,8 +124,11 @@ Current architecture mismatches that must be treated as real blockers:
per-layer render-path orchestration now also route through retained
draw-merge helpers even though the broader node draw loop is still inline,
with the non-`draw_merged` outer layer/plane traversal now also routing
through `execute_legacy_canvas_draw_layer_traversal(...)` while the heavier
per-layer GL setup and draw lambdas still live in `src/node_canvas.cpp`.
through `execute_legacy_canvas_draw_layer_traversal(...)`, while the heavier
per-layer GL setup now also routes through
`make_legacy_canvas_draw_merge_layer_path_gl_execution(...)` even though the
remaining draw lambdas and broader node draw loop still live in
`src/node_canvas.cpp`.
- `app_layout.cpp` and `app_dialogs.cpp` are still mixed shell/controller files
rather than thin composition/binding surfaces, even though tools-menu binding
plus nested panels/options submenu wiring now live in
@@ -134,7 +137,9 @@ Current architecture mismatches that must be treated as real blockers:
live in `src/app_layout_file_menu.cpp` and `App::init_menu_file()` is now a
thin call-through, while about-menu and layer-menu wiring now also live in
`src/app_layout_about_layer_menu.cpp` and `App::init_menu_about()` plus
`App::init_menu_layer()` are now thin call-throughs.
`App::init_menu_layer()` are now thin call-throughs, while the informational
overlay opener family now also lives in `src/app_dialogs_info_openers.cpp`
and the corresponding `App::dialog_*` entrypoints are thinner.
- `App`, `Canvas`, `Node`, retained workers, and platform entrypoints still use
global singleton reach, raw observer pointers, retained static worker
ownership in several app families, and ad hoc mutex/condition-variable
@@ -161,6 +166,9 @@ Current architecture mismatches that must be treated as real blockers:
`src/main.cpp`, while Win32 pointer API loading, stylus/ink timer decay,
Wintab packet reset, and `WM_POINTERUPDATE` pen/touch handling now also live
in `src/platform_windows/windows_stylus_input.cpp` instead of `src/main.cpp`,
while the retained Win32 VR/HMD shell now also routes through
`src/platform_windows/windows_vr_shell.h` instead of staying inline in
`src/main.cpp`,
while `App::rec_loop()` now delegates worker-iteration orchestration into
the retained recording bridge, `App::update_rec_frames()` now delegates
recording label refresh through that same retained recording path, and the

View File

@@ -195,8 +195,11 @@ Current slice:
broader draw-loop and renderer-state shell sequencing.
- `NodeCanvas` outer non-`draw_merged` layer/plane traversal, onion-range
failure handling, and visit payload setup now also route through
`execute_legacy_canvas_draw_layer_traversal(...)`, but the node still owns
the heavier per-layer GL setup and draw lambdas.
`execute_legacy_canvas_draw_layer_traversal(...)`.
- `NodeCanvas` non-`draw_merged` per-layer temporary erase/paint, layer-texture,
and blend setup now also route through
`make_legacy_canvas_draw_merge_layer_path_gl_execution(...)`, but the node
still owns the remaining draw lambdas and broader renderer-state shell.
Write scope:
- `src/node_stroke_preview.cpp`
@@ -325,6 +328,13 @@ Why now:
`src/app_dialogs.cpp` still mixes document workflow decisions, export routing,
dialog construction, and overlay ownership.
Current slice:
- Informational overlay opener paths for user manual, changelog, about,
what's-new, and shortcuts now live in `src/app_dialogs_info_openers.cpp`,
and the corresponding `App::dialog_*` entrypoints are now thin call-throughs,
but document/export workflow and retained dialog execution are still inline in
`src/app_dialogs.cpp`.
Write scope:
- `src/app_dialogs.cpp`
- `src/legacy_app_dialog_services.*`
@@ -417,6 +427,10 @@ Current slice:
reset, and `WM_POINTERUPDATE` pen/touch handling now live in
`src/platform_windows/windows_stylus_input.cpp` instead of `src/main.cpp`,
but broader retained Win32 shell state is still open
- the retained Win32 VR/HMD shell, including worker start/stop and VR FPS
state, now routes through `src/platform_windows/windows_vr_shell.h` instead
of staying inline in `src/main.cpp`, but broader retained Win32 shell state
is still open
- 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