Extract app runtime shell, canvas render shell, and node tree services
This commit is contained in:
@@ -79,15 +79,15 @@ What is still carrying too much live ownership:
|
||||
|
||||
Current hotspot files:
|
||||
|
||||
- `src/canvas.cpp`: 1010 lines
|
||||
- `src/canvas.cpp`: 429 lines
|
||||
- `src/app_layout.cpp`: 125 lines
|
||||
- `src/canvas_modes.cpp`: 720 lines
|
||||
- `src/node.cpp`: 803 lines
|
||||
- `src/node.cpp`: 465 lines
|
||||
- `src/main.cpp`: 271 lines
|
||||
- `src/node_panel_brush.cpp`: 435 lines
|
||||
- `src/node_stroke_preview.cpp`: 607 lines
|
||||
- `src/node_canvas.cpp`: 219 lines
|
||||
- `src/app.cpp`: 502 lines
|
||||
- `src/app.cpp`: 292 lines
|
||||
- `src/app_dialogs.cpp`: 168 lines
|
||||
|
||||
Current architecture mismatches that must be treated as real blockers:
|
||||
@@ -332,7 +332,22 @@ Current architecture mismatches that must be treated as real blockers:
|
||||
while `Canvas` point-trace/unproject/project/camera push-pop-get-set and
|
||||
face-to-shape helpers now also route through
|
||||
`src/legacy_canvas_projection_services.*` instead of staying inline in
|
||||
`src/canvas.cpp`.
|
||||
`src/canvas.cpp`, while `App::draw(...)`, `App::update(...)`,
|
||||
`App::terminate(...)`, `App::update_memory_usage(...)`,
|
||||
`App::update_rec_frames(...)`, `App::res_from_index(...)`,
|
||||
`App::res_to_index(...)`, `App::res_to_string(...)`, `App::rec_clear(...)`,
|
||||
`App::rec_start(...)`, `App::rec_stop(...)`, `App::rec_export(...)`,
|
||||
`App::rec_loop(...)`, and `App::render_thread_tick(...)` now also route
|
||||
through `src/legacy_app_runtime_shell_services.cpp` instead of staying
|
||||
inline in `src/app.cpp`, while `Canvas::draw_merge(...)`, the temporary
|
||||
paint/branch orchestration helpers, final-plane composite, timelapse commit,
|
||||
create/destroy, clear-context, and camera accessors now also route through
|
||||
`src/legacy_canvas_render_shell_services.*` instead of staying inline in
|
||||
`src/canvas.cpp`, while `Node::destroy()`, `root()`, `set_manager(...)`,
|
||||
`added_to_root()`, `handle_on_screen(...)`, template loading helpers, child
|
||||
add/remove/move helpers, and child query helpers now also route through
|
||||
`src/legacy_ui_node_tree_services.cpp` instead of staying inline in
|
||||
`src/node.cpp`.
|
||||
- Modern C++23 usage exists in extracted components, especially `std::span`,
|
||||
explicit result/status objects, and a few concepts, but the live app still
|
||||
does not consistently express ownership, thread affinity, or renderer
|
||||
|
||||
@@ -91,7 +91,7 @@ Status: In Progress
|
||||
|
||||
Why now:
|
||||
`src/canvas.cpp` is still the biggest single architectural blocker at about
|
||||
1010 lines, with `src/canvas_modes.cpp` now materially thinner and the next
|
||||
429 lines, with `src/canvas_modes.cpp` now materially thinner and the next
|
||||
remaining render-shell pressure shifting toward preview/canvas nodes.
|
||||
|
||||
Current slice:
|
||||
@@ -142,6 +142,12 @@ Current slice:
|
||||
in `src/legacy_canvas_stroke_runtime_services.*` instead of staying inline in
|
||||
`src/canvas.cpp`, which trims another large retained live stroke/runtime
|
||||
pocket from the canvas shell.
|
||||
- `Canvas::draw_merge(...)`, the temporary-paint and merge-branch
|
||||
orchestration helpers, final-plane composite, timelapse commit, create,
|
||||
destroy, clear-context, and camera accessors now also live in
|
||||
`src/legacy_canvas_render_shell_services.*` instead of staying inline in
|
||||
`src/canvas.cpp`, which trims another large retained render/context shell
|
||||
from the live canvas owner.
|
||||
- The `CanvasModePen` and `CanvasModeLine` interaction families now also live
|
||||
in `src/legacy_canvas_mode_pen_line.cpp` instead of staying inline in
|
||||
`src/canvas_modes.cpp`, which materially thins another retained pen/line
|
||||
@@ -521,7 +527,7 @@ Status: In Progress
|
||||
|
||||
Why now:
|
||||
`src/app.cpp` still carries startup, frame flow, queue draining, recording,
|
||||
and composition logic in one 575-line file.
|
||||
and composition logic in one 292-line file.
|
||||
|
||||
Current slice:
|
||||
- UI observer math now routes through `src/legacy_app_frame_services.cpp`
|
||||
@@ -530,6 +536,14 @@ Current slice:
|
||||
retained helper.
|
||||
- Canvas toolbar refresh in `App::update()` now also routes through that helper
|
||||
file, materially shrinking `src/app.cpp`.
|
||||
- `App::draw(...)`, `App::update(...)`, `App::terminate(...)`,
|
||||
`App::update_memory_usage(...)`, `App::update_rec_frames(...)`,
|
||||
`App::res_from_index(...)`, `App::res_to_index(...)`,
|
||||
`App::res_to_string(...)`, `App::rec_clear(...)`, `App::rec_start(...)`,
|
||||
`App::rec_stop(...)`, `App::rec_export(...)`, `App::rec_loop(...)`, and
|
||||
`App::render_thread_tick(...)` now also live in
|
||||
`src/legacy_app_runtime_shell_services.cpp` instead of staying inline in
|
||||
`src/app.cpp`, which materially thins the remaining frame/runtime shell.
|
||||
|
||||
Write scope:
|
||||
- `src/app.cpp`
|
||||
@@ -758,6 +772,12 @@ Current slice:
|
||||
`src/legacy_ui_node_attributes.*` instead of staying inline in `src/node.cpp`,
|
||||
which trims another coherent XML/Yoga attribute decoding pocket from the base
|
||||
scene-graph shell without changing its public surface.
|
||||
- `Node::destroy()`, `root()`, `set_manager(...)`, `added_to_root()`,
|
||||
`handle_on_screen(...)`, template loading helpers, child add/remove/move
|
||||
helpers, and child query helpers now also live in
|
||||
`src/legacy_ui_node_tree_services.cpp` instead of staying inline in
|
||||
`src/node.cpp`, which materially thins the remaining generic scene-graph
|
||||
lifecycle/tree shell without changing the public surface.
|
||||
|
||||
Write scope:
|
||||
- `src/node.cpp`
|
||||
|
||||
Reference in New Issue
Block a user