Trim stroke pad texture dispatch
This commit is contained in:
@@ -509,6 +509,11 @@ Done Checks:
|
|||||||
|
|
||||||
Progress Notes:
|
Progress Notes:
|
||||||
|
|
||||||
|
- 2026-06-13: `Canvas::stroke_draw()` now routes the pad-stroke destination
|
||||||
|
texture dispatch through a local helper lambda, so the repeated bind/unbind
|
||||||
|
callback construction is centralized while the pad executor still owns the
|
||||||
|
face loop and copy timing. Next slice should target another narrow canvas
|
||||||
|
stroke execution seam without reopening landed pad or sample helpers.
|
||||||
- 2026-06-13: `Canvas::stroke_draw_mix()` now routes mix-pass plane planning
|
- 2026-06-13: `Canvas::stroke_draw_mix()` now routes mix-pass plane planning
|
||||||
through `plan_legacy_canvas_stroke_mix_pass_planes(...)` and wraps retained
|
through `plan_legacy_canvas_stroke_mix_pass_planes(...)` and wraps retained
|
||||||
framebuffer setup/teardown with
|
framebuffer setup/teardown with
|
||||||
|
|||||||
@@ -846,6 +846,19 @@ void Canvas::stroke_draw()
|
|||||||
.slot = 1,
|
.slot = 1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
const auto make_pad_destination_texture_dispatch = [&](int face_index) {
|
||||||
|
return pp::panopainter::LegacyCanvasStrokeTextureInputDispatch {
|
||||||
|
.activate_texture_unit = [&](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(
|
[[maybe_unused]] const auto pad_result = pp::panopainter::execute_legacy_canvas_stroke_pad_faces(
|
||||||
pp::panopainter::LegacyCanvasStrokePadExecutionRequest {
|
pp::panopainter::LegacyCanvasStrokePadExecutionRequest {
|
||||||
.context = "Canvas::stroke_draw",
|
.context = "Canvas::stroke_draw",
|
||||||
@@ -863,14 +876,7 @@ void Canvas::stroke_draw()
|
|||||||
.bind_destination_texture = [&](int face_index) {
|
.bind_destination_texture = [&](int face_index) {
|
||||||
pp::panopainter::bind_legacy_canvas_stroke_texture_inputs(
|
pp::panopainter::bind_legacy_canvas_stroke_texture_inputs(
|
||||||
pad_destination_texture_binding,
|
pad_destination_texture_binding,
|
||||||
pp::panopainter::LegacyCanvasStrokeTextureInputDispatch {
|
make_pad_destination_texture_dispatch(face_index));
|
||||||
.activate_texture_unit = [&](int texture_slot) {
|
|
||||||
set_active_texture_unit(texture_slot);
|
|
||||||
},
|
|
||||||
.bind_stroke_destination = [&] {
|
|
||||||
m_tex[face_index].bind();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
.copy_framebuffer_to_destination_texture =
|
.copy_framebuffer_to_destination_texture =
|
||||||
[&](const pp::paint_renderer::CanvasStrokeCopyRegion& copy_region) {
|
[&](const pp::paint_renderer::CanvasStrokeCopyRegion& copy_region) {
|
||||||
@@ -885,14 +891,7 @@ void Canvas::stroke_draw()
|
|||||||
.unbind_destination_texture = [&](int face_index) {
|
.unbind_destination_texture = [&](int face_index) {
|
||||||
pp::panopainter::unbind_legacy_canvas_stroke_texture_inputs(
|
pp::panopainter::unbind_legacy_canvas_stroke_texture_inputs(
|
||||||
pad_destination_texture_binding,
|
pad_destination_texture_binding,
|
||||||
pp::panopainter::LegacyCanvasStrokeTextureInputDispatch {
|
make_pad_destination_texture_dispatch(face_index));
|
||||||
.activate_texture_unit = [&](int texture_slot) {
|
|
||||||
set_active_texture_unit(texture_slot);
|
|
||||||
},
|
|
||||||
.unbind_stroke_destination = [&] {
|
|
||||||
m_tex[face_index].unbind();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
.draw_pad = [&] {
|
.draw_pad = [&] {
|
||||||
m_brush_shape.draw_fill();
|
m_brush_shape.draw_fill();
|
||||||
|
|||||||
Reference in New Issue
Block a user