Extract stroke commit sequence invocation
This commit is contained in:
@@ -119,6 +119,9 @@ agent or engineer to remove them without reconstructing context from chat.
|
|||||||
now routes the retained commit request assembly through
|
now routes the retained commit request assembly through
|
||||||
`make_legacy_canvas_stroke_commit_request(...)`, leaving the callsite with
|
`make_legacy_canvas_stroke_commit_request(...)`, leaving the callsite with
|
||||||
only concrete faces, sequence, and callbacks.
|
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()`
|
- 2026-06-13: `DEBT-0036` was narrowed again. `NodeStrokePreview::draw_stroke_immediate()`
|
||||||
now routes final composite execution and preview copy-back through a retained
|
now routes final composite execution and preview copy-back through a retained
|
||||||
local wrapper, leaving the call site with only sequence wiring.
|
local wrapper, leaving the call site with only sequence wiring.
|
||||||
|
|||||||
@@ -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
|
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
|
### STR-011 - Extract Preview Main Pass Orchestration
|
||||||
|
|
||||||
Status: Done
|
Status: Done
|
||||||
|
|||||||
@@ -790,6 +790,14 @@ glm::vec4 Canvas::stroke_draw_samples(
|
|||||||
return result.dirty_bounds;
|
return result.dirty_bounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename BuildRequest>
|
||||||
|
static auto execute_canvas_stroke_commit_sequence(
|
||||||
|
BuildRequest&& build_request)
|
||||||
|
{
|
||||||
|
return pp::panopainter::execute_legacy_canvas_stroke_commit_sequence(
|
||||||
|
build_request());
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<Canvas::StrokeFrame> Canvas::stroke_draw_compute(Stroke& stroke) const
|
std::vector<Canvas::StrokeFrame> Canvas::stroke_draw_compute(Stroke& stroke) const
|
||||||
{
|
{
|
||||||
auto samples = stroke.compute_samples();
|
auto samples = stroke.compute_samples();
|
||||||
@@ -1339,8 +1347,10 @@ void Canvas::stroke_commit()
|
|||||||
pp::panopainter::LegacyCanvasStrokeCommitFace { .index = 5, .dirty = m_dirty_face[5] },
|
pp::panopainter::LegacyCanvasStrokeCommitFace { .index = 5, .dirty = m_dirty_face[5] },
|
||||||
};
|
};
|
||||||
|
|
||||||
[[maybe_unused]] const auto commit_result = pp::panopainter::execute_legacy_canvas_stroke_commit_sequence(
|
[[maybe_unused]] const auto commit_result = execute_canvas_stroke_commit_sequence(
|
||||||
pp::panopainter::make_legacy_canvas_stroke_commit_request(faces, sequence, commit_callbacks));
|
[&]() {
|
||||||
|
return pp::panopainter::make_legacy_canvas_stroke_commit_request(faces, sequence, commit_callbacks);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void Canvas::stroke_commit_timelapse()
|
void Canvas::stroke_commit_timelapse()
|
||||||
|
|||||||
@@ -2021,6 +2021,50 @@ void retained_stroke_commit_request_helper_preserves_dirty_face_order(pp::tests:
|
|||||||
PP_EXPECT(h, request.faces[4].dirty);
|
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<pp::panopainter::LegacyCanvasStrokeCommitFace, 6> 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)
|
void retained_stroke_commit_dilate_copy_uses_layer_scratch_slot(pp::tests::Harness& h)
|
||||||
{
|
{
|
||||||
const auto sequence = plan_canvas_stroke_commit_sequence(
|
const auto sequence = plan_canvas_stroke_commit_sequence(
|
||||||
|
|||||||
Reference in New Issue
Block a user