diff --git a/docs/modernization/debt.md b/docs/modernization/debt.md index 15b120e..e82d7e6 100644 --- a/docs/modernization/debt.md +++ b/docs/modernization/debt.md @@ -108,6 +108,10 @@ agent or engineer to remove them without reconstructing context from chat. - 2026-06-13: `DEBT-0036` was narrowed again. `Canvas::stroke_commit()` now routes the commit-input texture role switch through a local helper, leaving the callsite with sequence planning plus retained callback wiring. +- 2026-06-13: `DEBT-0036` was narrowed again. `Canvas::stroke_commit()` + now routes the commit-input texture role switch through a retained service + helper, leaving the callsite with sequence planning and concrete face + bindings only. - 2026-06-13: `DEBT-0036` was narrowed again. `NodeStrokePreview::draw_stroke_immediate()` now routes final composite execution and preview copy-back through a retained local wrapper, leaving the call site with only sequence wiring. diff --git a/docs/modernization/tasks.md b/docs/modernization/tasks.md index f0fd057..bf9083a 100644 --- a/docs/modernization/tasks.md +++ b/docs/modernization/tasks.md @@ -653,6 +653,9 @@ Progress Notes: - 2026-06-13: `Canvas::stroke_commit()` now routes the commit-input texture role switch through a local helper, so the callsite no longer owns that inline texture binding bundle. +- 2026-06-13: `Canvas::stroke_commit()` now routes the commit-input texture + role switch through a retained service helper, so the callsite only supplies + concrete face bindings. - 2026-06-13: `Canvas::stroke_draw_samples()` now reuses a retained destination texture dispatch helper for the live sample path; `Canvas` still owns the concrete face textures and callback execution. diff --git a/src/canvas.cpp b/src/canvas.cpp index 66c4407..806748a 100644 --- a/src/canvas.cpp +++ b/src/canvas.cpp @@ -543,7 +543,7 @@ static auto make_canvas_stroke_commit_callbacks( { const auto& b = current_stroke->m_brush; auto bind_commit_inputs = [&](int i) { - pp::panopainter::bind_legacy_canvas_stroke_commit_inputs( + pp::panopainter::bind_legacy_canvas_stroke_commit_face_inputs( sequence, [&](int texture_slot) { set_active_texture_unit(texture_slot); diff --git a/src/legacy_canvas_stroke_commit_services.h b/src/legacy_canvas_stroke_commit_services.h index 3defc34..f198f8f 100644 --- a/src/legacy_canvas_stroke_commit_services.h +++ b/src/legacy_canvas_stroke_commit_services.h @@ -151,6 +151,20 @@ inline void bind_legacy_canvas_stroke_commit_inputs( } } +template +inline void bind_legacy_canvas_stroke_commit_face_inputs( + const pp::paint_renderer::CanvasStrokeCommitSequencePlan& sequence, + SetActiveTextureUnit&& set_active_texture_unit, + BindFaceTextureRole&& bind_face_texture_role, + BindFaceSamplerRole&& bind_face_sampler_role) +{ + bind_legacy_canvas_stroke_commit_inputs( + sequence, + std::forward(set_active_texture_unit), + std::forward(bind_face_texture_role), + std::forward(bind_face_sampler_role)); +} + template inline void execute_legacy_canvas_stroke_commit_erase( SetupShader&& setup_shader,