Extract canvas object draw and brush panel services

This commit is contained in:
2026-06-16 18:43:14 +02:00
parent b56a46a82c
commit a5002a4e3e
10 changed files with 504 additions and 279 deletions

View File

@@ -79,14 +79,14 @@ What is still carrying too much live ownership:
Current hotspot files:
- `src/canvas.cpp`: 2728 lines
- `src/canvas.cpp`: 2592 lines
- `src/app_layout.cpp`: 125 lines
- `src/canvas_modes.cpp`: 1710 lines
- `src/canvas_modes.cpp`: 1626 lines
- `src/node.cpp`: 1368 lines
- `src/main.cpp`: 271 lines
- `src/node_panel_brush.cpp`: 1207 lines
- `src/node_panel_brush.cpp`: 1094 lines
- `src/node_stroke_preview.cpp`: 910 lines
- `src/node_canvas.cpp`: 864 lines
- `src/node_canvas.cpp`: 872 lines
- `src/app.cpp`: 575 lines
- `src/app_dialogs.cpp`: 168 lines
@@ -244,6 +244,18 @@ Current architecture mismatches that must be treated as real blockers:
callback-assembly setup now also route through
`execute_node_canvas_draw_unmerged_pass(...)`, which trims another coherent
unmerged draw shell from the live node even though the file itself remains
large, while `NodeCanvas::draw()` merged-pass callback wiring and pass setup
now also route through `execute_node_canvas_draw_merged_pass(...)`, which
trims another coherent merged draw shell from the live node even though the
broader draw loop still remains inline,
while `Canvas::draw_objects_direct(...)` and `Canvas::draw_objects(...)` now
route through `src/legacy_canvas_object_draw_services.*` instead of staying
inline in `src/canvas.cpp`, which trims another coherent object-draw and
viewport-state execution family from the live canvas shell,
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
pocket from the live UI node even though the broader panel still remains
large, while shared canvas-mode GL wrappers plus the
`CanvasModeBasicCamera` and `CanvasModeCamera` input handlers now also route
through `src/legacy_canvas_mode_helpers.*` 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
2728 lines.
2592 lines.
Current slice:
- Canvas state-management helpers for picking, clear/clear-all, layer
@@ -108,6 +108,10 @@ Current slice:
`src/legacy_canvas_projection_services.*` instead of staying inline in
`src/canvas.cpp`, which trims another coherent non-UI state/query pocket
from the live canvas shell.
- `Canvas::draw_objects_direct(...)` and `Canvas::draw_objects(...)` now also
live in `src/legacy_canvas_object_draw_services.*` instead of staying inline
in `src/canvas.cpp`, which trims another coherent object-draw and
viewport-state execution pocket from the live canvas shell.
- Shared canvas-mode GL wrappers plus the `CanvasModeBasicCamera` and
`CanvasModeCamera` input handlers now also live in
`src/legacy_canvas_mode_helpers.*` instead of staying inline in
@@ -263,6 +267,10 @@ Current slice:
through `execute_node_canvas_draw_unmerged_pass(...)`, which trims another
coherent unmerged draw-orchestration block from the live node even though
the file size remains roughly flat.
- `NodeCanvas::draw()` merged-pass callback wiring and pass setup now also
route through `execute_node_canvas_draw_merged_pass(...)`, which trims
another coherent merged draw-orchestration block from the live node even
though the broader draw loop still remains inline.
Write scope:
- `src/node_stroke_preview.cpp`
@@ -970,6 +978,13 @@ Why now:
Cloud browse/download/upload and brush package import/export still close over
retained nodes, worker threads, and direct UI ownership.
Current slice:
- `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 a coherent retained brush-workflow
pocket from the live UI node even though cloud and package-worker ownership
still remain separate follow-up work.
Write scope:
- `src/legacy_cloud_services.*`
- `src/node_dialog_cloud.*`