Extract dual stroke tip dispatch overload
This commit is contained in:
@@ -18,6 +18,10 @@ agent or engineer to remove them without reconstructing context from chat.
|
|||||||
|
|
||||||
## Recent Reductions
|
## Recent Reductions
|
||||||
|
|
||||||
|
- 2026-06-13: `LATER-003` was narrowed again. `Canvas::stroke_draw()` now
|
||||||
|
routes dual-brush tip dispatch through retained helper overloads, so the
|
||||||
|
face-index callback wiring is no longer built inline in the dual-pass
|
||||||
|
branch.
|
||||||
- 2026-06-13: `LATER-003` was narrowed again. `Canvas::stroke_draw()` now
|
- 2026-06-13: `LATER-003` was narrowed again. `Canvas::stroke_draw()` now
|
||||||
routes dual-brush tip dispatch through retained helper overloads, so the
|
routes dual-brush tip dispatch through retained helper overloads, so the
|
||||||
face-index callback wiring is no longer built inline in the dual-pass
|
face-index callback wiring is no longer built inline in the dual-pass
|
||||||
|
|||||||
@@ -940,23 +940,23 @@ void Canvas::stroke_draw()
|
|||||||
pp::panopainter::LegacyCanvasStrokeDualPassRequest {
|
pp::panopainter::LegacyCanvasStrokeDualPassRequest {
|
||||||
.context = "Canvas::stroke_draw",
|
.context = "Canvas::stroke_draw",
|
||||||
.bind_brush_tip = [&] {
|
.bind_brush_tip = [&] {
|
||||||
pp::panopainter::bind_legacy_canvas_stroke_texture_inputs(
|
pp::panopainter::bind_legacy_canvas_stroke_texture_inputs(
|
||||||
dual_pass_texture_bindings,
|
dual_pass_texture_bindings,
|
||||||
pp::panopainter::make_legacy_canvas_stroke_brush_tip_texture_dispatch(
|
pp::panopainter::make_legacy_canvas_stroke_brush_tip_texture_dispatch(
|
||||||
[&](int texture_slot) {
|
[&](int texture_slot) {
|
||||||
set_active_texture_unit(texture_slot);
|
set_active_texture_unit(texture_slot);
|
||||||
},
|
},
|
||||||
[&](int) {
|
[&](int) {
|
||||||
dual_brush->m_tip_texture ?
|
dual_brush->m_tip_texture ?
|
||||||
dual_brush->m_tip_texture->bind() :
|
dual_brush->m_tip_texture->bind() :
|
||||||
unbind_texture_2d();
|
unbind_texture_2d();
|
||||||
},
|
},
|
||||||
[&](int) {
|
[&](int) {
|
||||||
dual_brush->m_tip_texture ?
|
dual_brush->m_tip_texture ?
|
||||||
dual_brush->m_tip_texture->unbind() :
|
dual_brush->m_tip_texture->unbind() :
|
||||||
unbind_texture_2d();
|
unbind_texture_2d();
|
||||||
},
|
},
|
||||||
0));
|
0));
|
||||||
},
|
},
|
||||||
.unbind_brush_tip = [&] {
|
.unbind_brush_tip = [&] {
|
||||||
pp::panopainter::unbind_legacy_canvas_stroke_texture_inputs(
|
pp::panopainter::unbind_legacy_canvas_stroke_texture_inputs(
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ void retained_stroke_brush_tip_texture_dispatch_helper_builds_expected_face_wiri
|
|||||||
[&](int slot) { events.emplace_back("activate:" + std::to_string(slot)); },
|
[&](int slot) { events.emplace_back("activate:" + std::to_string(slot)); },
|
||||||
[&](int face_index) { events.emplace_back("bind:" + std::to_string(face_index)); },
|
[&](int face_index) { events.emplace_back("bind:" + std::to_string(face_index)); },
|
||||||
[&](int face_index) { events.emplace_back("unbind:" + std::to_string(face_index)); },
|
[&](int face_index) { events.emplace_back("unbind:" + std::to_string(face_index)); },
|
||||||
2);
|
3);
|
||||||
|
|
||||||
dispatch.activate_texture_unit(0);
|
dispatch.activate_texture_unit(0);
|
||||||
dispatch.bind_brush_tip();
|
dispatch.bind_brush_tip();
|
||||||
@@ -324,8 +324,8 @@ void retained_stroke_brush_tip_texture_dispatch_helper_builds_expected_face_wiri
|
|||||||
|
|
||||||
const std::vector<std::string> expected_events {
|
const std::vector<std::string> expected_events {
|
||||||
"activate:0",
|
"activate:0",
|
||||||
"bind:2",
|
"bind:3",
|
||||||
"unbind:2",
|
"unbind:3",
|
||||||
};
|
};
|
||||||
PP_EXPECT(h, events == expected_events);
|
PP_EXPECT(h, events == expected_events);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user