Extract draw merge layer composite orchestration

This commit is contained in:
2026-06-13 18:23:29 +02:00
parent e7813c2ff0
commit 42bc1866ad
4 changed files with 89 additions and 21 deletions

View File

@@ -18,6 +18,11 @@ agent or engineer to remove them without reconstructing context from chat.
## Recent Reductions
- 2026-06-13: DEBT-0036 was narrowed again. `Canvas::draw_merge()` now routes
the remaining per-layer branch orchestration through
`execute_legacy_canvas_draw_merge_layer_composite(...)`; the retained path
still owns the concrete temporary-stroke, layer-texture, and layer-blend
callback bodies.
- 2026-06-13: DEBT-0036 was narrowed again. `Canvas::stroke_commit()` now
builds its retained callback table through
`make_legacy_canvas_stroke_commit_callbacks(...)`; the legacy executor still

View File

@@ -1022,3 +1022,39 @@ Completed Task Log:
| Date | Task | Score | Validation | Commit |
| --- | --- | ---: | --- | --- |
| 2026-06-13 | STR-009 | +2 renderer boundary and OpenGL parity | `ctest --preset desktop-fast --build-config Debug -R "retained_stroke_commit_callback_builder_preserves_order|retained_stroke_commit_runner_preserves_per_face_step_order" --output-on-failure`; `& 'C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\MSBuild.exe' out\build\windows-msvc-default\tests\pp_paint_renderer_compositor_tests.vcxproj /p:Configuration=Debug /p:Platform=x64` | `pending` |
### STR-010 - Extract Remaining Draw Merge Composite Orchestration
Status: Done
Score: +2 renderer boundary and OpenGL parity
Debt: `DEBT-0036`
Scope: `src/canvas.cpp`, `src/legacy_canvas_draw_merge_services.*`,
`tests/paint_renderer/compositor_tests.cpp`
Goal:
Move the remaining inline `Canvas::draw_merge()` branch orchestration into
retained helpers so the merge path keeps only concrete framebuffer, sampler,
and texture wiring. Preserve per-plane order, temporary-stroke behavior, and
final merge composition.
Done Checks:
- `Canvas::draw_merge()` no longer contains the remaining large inline branch
orchestration for temporary-stroke or blend/final-plane composition.
- Regression coverage proves the extracted helper preserves ordering and
branch behavior.
- `docs/modernization/debt.md` records the reduced draw-merge callback surface.
Validation:
```powershell
ctest --preset desktop-fast --build-config Debug -R "pp_paint_renderer_compositor" --output-on-failure
& 'C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\MSBuild.exe' out\build\windows-msvc-default\tests\pp_paint_renderer_compositor_tests.vcxproj /p:Configuration=Debug /p:Platform=x64
```
Completed Task Log:
| Date | Task | Score | Validation | Commit |
| --- | --- | ---: | --- | --- |
| 2026-06-13 | STR-010 | +2 renderer boundary and OpenGL parity | `ctest --preset desktop-fast --build-config Debug -R "pp_paint_renderer_compositor|pp_paint_renderer_stroke_execution" --output-on-failure`; `& 'C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\MSBuild.exe' out\build\windows-msvc-default\PanoPainter.vcxproj /p:Configuration=Debug /p:Platform=x64` | `pending` |