From a428f77db67edbbc467ed43a8196d39fabdea261 Mon Sep 17 00:00:00 2001 From: omigamedev Date: Sat, 13 Jun 2026 19:19:33 +0200 Subject: [PATCH] Wrap stroke mix shell --- docs/modernization/debt.md | 4 ++++ docs/modernization/tasks.md | 3 +++ src/canvas.cpp | 6 +++--- src/legacy_canvas_stroke_execution_services.h | 13 +++++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/docs/modernization/debt.md b/docs/modernization/debt.md index 6a0204e..3015c45 100644 --- a/docs/modernization/debt.md +++ b/docs/modernization/debt.md @@ -18,6 +18,10 @@ agent or engineer to remove them without reconstructing context from chat. ## Recent Reductions +- 2026-06-13: `LATER-003` was narrowed again. `Canvas::stroke_draw_mix()` now + routes the retained mix-pass shell through + `execute_legacy_canvas_stroke_mix_pass_shell(...)`; the live path still owns + the concrete framebuffer bind and GL capability toggles. - 2026-06-13: `LATER-003` was narrowed again. `Canvas::stroke_draw_mix()` now routes the full retained mix-pass shell through `execute_legacy_canvas_stroke_mix_pass_with_setup(...)`; the live path diff --git a/docs/modernization/tasks.md b/docs/modernization/tasks.md index d594e1f..e557a97 100644 --- a/docs/modernization/tasks.md +++ b/docs/modernization/tasks.md @@ -601,6 +601,9 @@ Progress Notes: - 2026-06-13: `Canvas::stroke_draw_mix()` now routes the full retained mix-pass shell through `execute_legacy_canvas_stroke_mix_pass_with_setup(...)`; the live path still owns the concrete framebuffer bind and GL capability toggles. +- 2026-06-13: `Canvas::stroke_draw_mix()` now routes the retained mix-pass + shell through `execute_legacy_canvas_stroke_mix_pass_shell(...)`; the live + path still owns the concrete framebuffer bind and GL capability toggles. - 2026-06-13: `Canvas::stroke_draw()` live-pass sampler wiring now reuses a retained helper builder, and the stroke execution tests cover it. `STR-004` is now done after the final pad-destination helper extraction and tracker diff --git a/src/canvas.cpp b/src/canvas.cpp index 72ac9ad..5813643 100644 --- a/src/canvas.cpp +++ b/src/canvas.cpp @@ -420,10 +420,10 @@ void Canvas::stroke_draw_mix(const glm::vec2& bb_min, const glm::vec2& bb_sz) m_mixer.unbindFramebuffer(); }); [[maybe_unused]] const auto mix_result = - pp::panopainter::execute_legacy_canvas_stroke_mix_pass_with_setup( + pp::panopainter::execute_legacy_canvas_stroke_mix_pass_shell( mix_setup.begin, mix_setup.end, - pp::panopainter::make_legacy_canvas_stroke_mix_pass_request( + pp::panopainter::make_legacy_canvas_stroke_mix_pass_request( "Canvas::stroke_draw_mix", m_size, mix_planes, @@ -477,7 +477,7 @@ void Canvas::stroke_draw_mix(const glm::vec2& bb_min, const glm::vec2& bb_sz) [&](int plane_index) { set_active_texture_unit(0); current_layer.rtt(plane_index).unbindTexture(); - }); + })); gl.restore(); } diff --git a/src/legacy_canvas_stroke_execution_services.h b/src/legacy_canvas_stroke_execution_services.h index 4fdc2e4..6ada6e4 100644 --- a/src/legacy_canvas_stroke_execution_services.h +++ b/src/legacy_canvas_stroke_execution_services.h @@ -562,6 +562,19 @@ execute_legacy_canvas_stroke_mix_pass_with_setup( return result; } +template +[[nodiscard]] inline LegacyCanvasStrokeMixPassResult +execute_legacy_canvas_stroke_mix_pass_shell( + BeginMixPass&& begin_mix_pass, + EndMixPass&& end_mix_pass, + const LegacyCanvasStrokeMixPassRequest& request) +{ + return execute_legacy_canvas_stroke_mix_pass_with_setup( + std::forward(begin_mix_pass), + std::forward(end_mix_pass), + request); +} + struct LegacyCanvasStrokeComputeRequest { StrokeSample previous_sample {}; std::span samples;