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

@@ -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`