Extract stroke destination dispatch helper

This commit is contained in:
2026-06-13 17:42:40 +02:00
parent 38a73fc6f0
commit 6bb1268edb
4 changed files with 51 additions and 11 deletions

View File

@@ -564,17 +564,17 @@ glm::vec4 Canvas::stroke_draw_samples(
.slot = 1,
},
};
const pp::panopainter::LegacyCanvasStrokeTextureInputDispatch destination_texture_dispatch {
.activate_texture_unit = [&](int texture_slot) {
set_active_texture_unit(texture_slot);
},
.bind_stroke_destination = [&] {
m_tex[i].bind(); // bg, copy of framebuffer (copied before drawing)
},
.unbind_stroke_destination = [&] {
m_tex[i].unbind();
},
};
const auto destination_texture_dispatch =
pp::panopainter::make_legacy_canvas_stroke_destination_texture_dispatch(
[&](int texture_slot) {
set_active_texture_unit(texture_slot);
},
[&] {
m_tex[i].bind(); // bg, copy of framebuffer (copied before drawing)
},
[&] {
m_tex[i].unbind();
});
const auto result = pp::panopainter::execute_legacy_canvas_stroke_face_sample_polygon(
pp::panopainter::LegacyStrokeFaceSamplePolygonExecutionRequest {
.context = "Canvas::stroke_draw_samples",