diff --git a/docs/modernization/debt.md b/docs/modernization/debt.md index cfdbcf0..48e6fff 100644 --- a/docs/modernization/debt.md +++ b/docs/modernization/debt.md @@ -119,6 +119,9 @@ agent or engineer to remove them without reconstructing context from chat. now routes the retained commit request assembly through `make_legacy_canvas_stroke_commit_request(...)`, leaving the callsite with only concrete faces, sequence, and callbacks. +- 2026-06-13: `DEBT-0036` was narrowed again. `Canvas::stroke_commit()` + now routes the retained sequence invocation through a local helper, + leaving the callsite with only the built commit state. - 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 b627ffe..f75d1e8 100644 --- a/docs/modernization/tasks.md +++ b/docs/modernization/tasks.md @@ -1284,6 +1284,12 @@ Validation: ctest --preset desktop-fast --build-config Debug -R "pp_paint_renderer_stroke_execution|pp_paint_renderer_compositor" --output-on-failure ``` +### Completed Task Log + +| Date | Task | Score | Validation | Commit | +| --- | --- | --- | --- | --- | +| 2026-06-13 | STR-015 | +1 renderer boundary and OpenGL parity | `ctest --preset desktop-fast --build-config Debug -R "pp_paint_renderer_stroke_execution|pp_paint_renderer_compositor" --output-on-failure` | `pending` | + ### STR-011 - Extract Preview Main Pass Orchestration Status: Done diff --git a/src/canvas.cpp b/src/canvas.cpp index 27e89de..43c70c3 100644 --- a/src/canvas.cpp +++ b/src/canvas.cpp @@ -790,6 +790,14 @@ glm::vec4 Canvas::stroke_draw_samples( return result.dirty_bounds; } +template +static auto execute_canvas_stroke_commit_sequence( + BuildRequest&& build_request) +{ + return pp::panopainter::execute_legacy_canvas_stroke_commit_sequence( + build_request()); +} + std::vector Canvas::stroke_draw_compute(Stroke& stroke) const { auto samples = stroke.compute_samples(); @@ -1339,8 +1347,10 @@ void Canvas::stroke_commit() pp::panopainter::LegacyCanvasStrokeCommitFace { .index = 5, .dirty = m_dirty_face[5] }, }; - [[maybe_unused]] const auto commit_result = pp::panopainter::execute_legacy_canvas_stroke_commit_sequence( - pp::panopainter::make_legacy_canvas_stroke_commit_request(faces, sequence, commit_callbacks)); + [[maybe_unused]] const auto commit_result = execute_canvas_stroke_commit_sequence( + [&]() { + return pp::panopainter::make_legacy_canvas_stroke_commit_request(faces, sequence, commit_callbacks); + }); } void Canvas::stroke_commit_timelapse() diff --git a/tests/paint_renderer/compositor_tests.cpp b/tests/paint_renderer/compositor_tests.cpp index ef83949..e100c5d 100644 --- a/tests/paint_renderer/compositor_tests.cpp +++ b/tests/paint_renderer/compositor_tests.cpp @@ -2021,6 +2021,50 @@ void retained_stroke_commit_request_helper_preserves_dirty_face_order(pp::tests: PP_EXPECT(h, request.faces[4].dirty); } +void retained_stroke_commit_sequence_executor_preserves_request_shape(pp::tests::Harness& h) +{ + const pp::panopainter::LegacyCanvasStrokeCommitCallbacks callbacks { + .mark_commit_started = []() {}, + .capture_render_state = []() {}, + .prepare_render_state = []() {}, + .restore_render_state = []() {}, + .publish_history = []() {}, + .capture_timelapse_frame = []() {}, + .bind_layer_framebuffer = [](int) {}, + .capture_history_region = [](int) {}, + .apply_layer_dirty_region = [](int) {}, + .copy_layer_to_commit_destination = [](int) {}, + .bind_commit_inputs = [](int) {}, + .execute_erase_composite = [](int) {}, + .execute_paint_composite = [](int) {}, + .copy_committed_to_dilate_source = [](int) {}, + .execute_commit_dilate = [](int) {}, + .unbind_layer_framebuffer = [](int) {}, + }; + const auto sequence = plan_canvas_stroke_commit_sequence( + CanvasStrokeCommitRequest { + .erase_mode = false, + .alpha_locked = false, + .selection_mask_active = true, + .dual_stroke_enabled = true, + .pattern_enabled = true, + }); + const std::array faces { + pp::panopainter::LegacyCanvasStrokeCommitFace { .index = 0, .dirty = true }, + pp::panopainter::LegacyCanvasStrokeCommitFace { .index = 1, .dirty = true }, + pp::panopainter::LegacyCanvasStrokeCommitFace { .index = 2, .dirty = false }, + pp::panopainter::LegacyCanvasStrokeCommitFace { .index = 3, .dirty = false }, + pp::panopainter::LegacyCanvasStrokeCommitFace { .index = 4, .dirty = true }, + pp::panopainter::LegacyCanvasStrokeCommitFace { .index = 5, .dirty = false }, + }; + + const auto result = pp::panopainter::execute_legacy_canvas_stroke_commit_sequence( + pp::panopainter::make_legacy_canvas_stroke_commit_request(faces, sequence, callbacks)); + + PP_EXPECT(h, result.ok); + PP_EXPECT(h, result.committed_faces == 3); +} + void retained_stroke_commit_dilate_copy_uses_layer_scratch_slot(pp::tests::Harness& h) { const auto sequence = plan_canvas_stroke_commit_sequence(