Extract pad destination texture dispatch helper

This commit is contained in:
2026-06-13 17:38:48 +02:00
parent 384db00015
commit 5c03b13078
3 changed files with 75 additions and 12 deletions

View File

@@ -847,17 +847,16 @@ void Canvas::stroke_draw()
},
};
const auto make_pad_destination_texture_dispatch = [&](int face_index) {
return pp::panopainter::LegacyCanvasStrokeTextureInputDispatch {
.activate_texture_unit = [&](int texture_slot) {
return pp::panopainter::make_legacy_canvas_stroke_pad_destination_texture_dispatch(
[&](int texture_slot) {
set_active_texture_unit(texture_slot);
},
.bind_stroke_destination = [&] {
[&] {
m_tex[face_index].bind();
},
.unbind_stroke_destination = [&] {
[&] {
m_tex[face_index].unbind();
},
};
});
};
[[maybe_unused]] const auto pad_result = pp::panopainter::execute_legacy_canvas_stroke_pad_faces(
pp::panopainter::LegacyCanvasStrokePadExecutionRequest {