Extract canvas layer flows, pen modes, and node attributes

This commit is contained in:
2026-06-16 20:09:25 +02:00
parent 9b2a0d9c30
commit d6a7512b94
10 changed files with 832 additions and 747 deletions

View File

@@ -79,10 +79,10 @@ What is still carrying too much live ownership:
Current hotspot files:
- `src/canvas.cpp`: 1490 lines
- `src/canvas.cpp`: 1271 lines
- `src/app_layout.cpp`: 125 lines
- `src/canvas_modes.cpp`: 1014 lines
- `src/node.cpp`: 995 lines
- `src/canvas_modes.cpp`: 720 lines
- `src/node.cpp`: 803 lines
- `src/main.cpp`: 271 lines
- `src/node_panel_brush.cpp`: 435 lines
- `src/node_stroke_preview.cpp`: 751 lines
@@ -264,11 +264,18 @@ Current architecture mismatches that must be treated as real blockers:
`Canvas::stroke_draw()` orchestration now also routes through
`src/legacy_canvas_stroke_live_services.cpp` instead of staying inline in
`src/canvas.cpp`, which materially thins another large retained live
stroke-render pocket, while the
stroke-render pocket, while `Canvas::layer_merge(...)`,
`Canvas::flood_fill(...)`, and `Canvas::FloodData::apply()` now also route
through `src/legacy_canvas_layer_services.cpp` instead of staying inline in
`src/canvas.cpp`, which trims another coherent retained layer/fill workflow
pocket, while the
`CanvasModeTransform` interaction family now also routes through
`src/legacy_canvas_mode_transform.cpp` instead of staying inline in
`src/canvas_modes.cpp`, which materially thins another retained canvas-view
and transform-mode execution pocket,
and transform-mode execution pocket, while the `CanvasModePen` and
`CanvasModeLine` interaction families now also route through
`src/legacy_canvas_mode_pen_line.cpp` instead of staying inline in
`src/canvas_modes.cpp`,
while `NodePanelBrush` save/restore/scan/reload/find/get-path ownership now
routes through `src/legacy_brush_panel_services.*` instead of staying inline
in `src/node_panel_brush.cpp`, which trims another retained brush-workflow
@@ -306,7 +313,9 @@ Current architecture mismatches that must be treated as real blockers:
about without yet moving ownership into `pp_ui_core`, while the generic
per-frame node execution/traversal family for `restore_context`,
`clear_context`, `update`, `update_internal`, and `tick` now also lives in
`src/legacy_ui_node_execution.cpp`,
`src/legacy_ui_node_execution.cpp`, while `Node::parse_attributes(...)` now
also routes through `src/legacy_ui_node_attributes.*` instead of staying
inline in `src/node.cpp`,
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

View File

@@ -91,7 +91,7 @@ Status: In Progress
Why now:
`src/canvas.cpp` is still the biggest single architectural blocker at about
1490 lines, with `src/canvas_modes.cpp` still large at about 1014 lines.
1271 lines, with `src/canvas_modes.cpp` still large at about 720 lines.
Current slice:
- Canvas state-management helpers for picking, clear/clear-all, layer
@@ -130,6 +130,15 @@ Current slice:
`src/legacy_canvas_stroke_live_services.cpp` instead of staying inline in
`src/canvas.cpp`, which materially thins another large retained live
stroke-render pocket from the canvas shell.
- `Canvas::layer_merge(...)`, `Canvas::flood_fill(...)`, and
`Canvas::FloodData::apply()` now also live in
`src/legacy_canvas_layer_services.cpp` instead of staying inline in
`src/canvas.cpp`, which trims another coherent retained layer/fill workflow
pocket from the live canvas shell.
- 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
interaction pocket from the broader canvas/render hotspot family.
Write scope:
- `src/canvas.cpp`
@@ -728,6 +737,10 @@ Current slice:
`src/legacy_ui_node_event.*` instead of staying inline in `src/node.cpp`,
which materially thins the base scene-graph event shell without changing its
public surface.
- `Node::parse_attributes(...)` now also routes through
`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.
Write scope:
- `src/node.cpp`