Extract dual stroke tip dispatch overload

This commit is contained in:
2026-06-13 18:51:43 +02:00
parent 6b12c520f0
commit b5b7bcc3cf
3 changed files with 24 additions and 20 deletions

View File

@@ -940,23 +940,23 @@ void Canvas::stroke_draw()
pp::panopainter::LegacyCanvasStrokeDualPassRequest {
.context = "Canvas::stroke_draw",
.bind_brush_tip = [&] {
pp::panopainter::bind_legacy_canvas_stroke_texture_inputs(
dual_pass_texture_bindings,
pp::panopainter::make_legacy_canvas_stroke_brush_tip_texture_dispatch(
[&](int texture_slot) {
set_active_texture_unit(texture_slot);
},
[&](int) {
dual_brush->m_tip_texture ?
dual_brush->m_tip_texture->bind() :
unbind_texture_2d();
},
[&](int) {
dual_brush->m_tip_texture ?
dual_brush->m_tip_texture->unbind() :
unbind_texture_2d();
},
0));
pp::panopainter::bind_legacy_canvas_stroke_texture_inputs(
dual_pass_texture_bindings,
pp::panopainter::make_legacy_canvas_stroke_brush_tip_texture_dispatch(
[&](int texture_slot) {
set_active_texture_unit(texture_slot);
},
[&](int) {
dual_brush->m_tip_texture ?
dual_brush->m_tip_texture->bind() :
unbind_texture_2d();
},
[&](int) {
dual_brush->m_tip_texture ?
dual_brush->m_tip_texture->unbind() :
unbind_texture_2d();
},
0));
},
.unbind_brush_tip = [&] {
pp::panopainter::unbind_legacy_canvas_stroke_texture_inputs(