Commit graph

1 commit

Author SHA1 Message Date
0d43d61049 refactor(map): implement trait-based render graph (Phase 3)
- Define RenderPass trait with execute(), z_order(), zoom gating
- Implement 5 concrete passes: Background, Fill, Stroke, Poi, Label
- Create RenderContext to pass state to passes
- Refactor view.rs draw_walk() to use render_graph.execute()
- Reduce draw_walk() from 153 lines to 50 lines (-67%)
- Remove all hardcoded if-statements for pass execution
- Add 13 integration tests for render graph
- Enable true extensibility: new passes require only trait implementation

Benefits:
- Extensible: add custom passes without modifying view.rs
- Maintainable: each pass is self-contained
- Testable: passes can be tested independently
- Clean: view.rs reduced by 150 lines

Architecture:
  NigigMapView.draw_walk()
    -> creates RenderContext
    -> render_graph.execute(&mut ctx)
       -> iterates passes in z_order
       -> calls pass.execute(ctx) for each enabled pass

This completes Phase 3 of the Makepad codebase improvement plan.
2026-07-27 16:17:51 +00:00