Content under the grid is composited twice when the static and dynamic painters share the band plan #93

Open
opened 2026-10-13 02:28:06 +00:00 by ImBenji · 0 comments
Owner

From the engineering review on 2026-10-13.

_v2SceneBands (lib/rendering/canvas_painter.dart:401) is a single static slot and both layer painters write it at the top of _paintCore. _buildQtTile is queued during the static paint, awaits, then reads the slot later. By then the dynamic layer (which passes showGrid: false) has painted, the slot holds a plan with no grid band, and every band counts as above the grid.

Scenario: grid on, anything at or below the grid's z. Reference images default to z=-1, the grid's own band. That content is composited live under the grid and again inside the tile image above it, so a translucent tracing image shows at double opacity and an image below the grid hides the grid.

Evidence: test/review_probes/render_dynamic_layer_band_crosstalk_probe.dart (local, untracked). Pixel inside a 50% opacity box at z=-5: direct rgb(255,128,128), tiled static only rgb(255,128,128), tiled static plus dynamic rgb(255,64,64). The probe emulates the same-frame paint order; it was not observed in the running app.

Fix sketch: capture the band list and grid z in _drawQtTiles and pass them into _buildQtTile and _compositeFlatBands, or stop the dynamic layer writing the slot at all. Related: #49, #50.

From the engineering review on 2026-10-13. `_v2SceneBands` (`lib/rendering/canvas_painter.dart:401`) is a single static slot and both layer painters write it at the top of `_paintCore`. `_buildQtTile` is queued during the static paint, awaits, then reads the slot later. By then the dynamic layer (which passes `showGrid: false`) has painted, the slot holds a plan with no grid band, and every band counts as above the grid. **Scenario:** grid on, anything at or below the grid's z. Reference images default to z=-1, the grid's own band. That content is composited live under the grid and again inside the tile image above it, so a translucent tracing image shows at double opacity and an image below the grid hides the grid. **Evidence:** `test/review_probes/render_dynamic_layer_band_crosstalk_probe.dart` (local, untracked). Pixel inside a 50% opacity box at z=-5: direct `rgb(255,128,128)`, tiled static only `rgb(255,128,128)`, tiled static plus dynamic `rgb(255,64,64)`. The probe emulates the same-frame paint order; it was not observed in the running app. **Fix sketch:** capture the band list and grid z in `_drawQtTiles` and pass them into `_buildQtTile` and `_compositeFlatBands`, or stop the dynamic layer writing the slot at all. Related: #49, #50.
ImBenji added the bugarea:rendering labels 2026-10-13 02:28:06 +00:00
ImBenji added this to the Arcs & Angles project 2026-10-13 02:28:06 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: IMBENJI.NET/Metro-Map-Maker#93