Extract stroke mix shell setup helper
This commit is contained in:
@@ -94,6 +94,9 @@ agent or engineer to remove them without reconstructing context from chat.
|
|||||||
`retained_stroke_mix_pass_shell_executor_preserves_combined_wiring`.
|
`retained_stroke_mix_pass_shell_executor_preserves_combined_wiring`.
|
||||||
- 2026-06-13: `LATER-003` was narrowed again. `Canvas::stroke_draw_mix()`
|
- 2026-06-13: `LATER-003` was narrowed again. `Canvas::stroke_draw_mix()`
|
||||||
no longer computes an unused mix-plane plan in the live shell path.
|
no longer computes an unused mix-plane plan in the live shell path.
|
||||||
|
- 2026-06-13: `LATER-003` was narrowed again. `Canvas::stroke_draw_mix()`
|
||||||
|
now routes the remaining framebuffer setup callbacks through a local helper,
|
||||||
|
leaving the method with only shell assembly and executor dispatch.
|
||||||
- 2026-06-13: `DEBT-0036` was narrowed again. `NodeStrokePreview::draw_stroke_immediate()`
|
- 2026-06-13: `DEBT-0036` was narrowed again. `NodeStrokePreview::draw_stroke_immediate()`
|
||||||
now routes final composite execution and preview copy-back through a retained
|
now routes final composite execution and preview copy-back through a retained
|
||||||
local wrapper, leaving the call site with only sequence wiring.
|
local wrapper, leaving the call site with only sequence wiring.
|
||||||
|
|||||||
@@ -638,6 +638,9 @@ Progress Notes:
|
|||||||
- 2026-06-13: `Canvas::stroke_draw_mix()` no longer computes an unused mix-plane
|
- 2026-06-13: `Canvas::stroke_draw_mix()` no longer computes an unused mix-plane
|
||||||
plan in the live shell path; the remaining code is the retained shell setup
|
plan in the live shell path; the remaining code is the retained shell setup
|
||||||
and executor call.
|
and executor call.
|
||||||
|
- 2026-06-13: `Canvas::stroke_draw_mix()` now routes the remaining framebuffer
|
||||||
|
setup callbacks through a local helper, leaving the method with only shell
|
||||||
|
assembly and executor dispatch.
|
||||||
- 2026-06-13: `Canvas::stroke_draw_samples()` now reuses a retained destination
|
- 2026-06-13: `Canvas::stroke_draw_samples()` now reuses a retained destination
|
||||||
texture dispatch helper for the live sample path; `Canvas` still owns the
|
texture dispatch helper for the live sample path; `Canvas` still owns the
|
||||||
concrete face textures and callback execution.
|
concrete face textures and callback execution.
|
||||||
|
|||||||
@@ -392,24 +392,7 @@ void Canvas::stroke_draw_mix(const glm::vec2& bb_min, const glm::vec2& bb_sz)
|
|||||||
gl.save();
|
gl.save();
|
||||||
const auto layer_index = m_current_layer_idx;
|
const auto layer_index = m_current_layer_idx;
|
||||||
auto& current_layer = *m_layers[layer_index];
|
auto& current_layer = *m_layers[layer_index];
|
||||||
std::array<glm::mat4, 6> plane_transform {};
|
const auto mix_shell = make_canvas_stroke_mix_pass_shell(*this, bb_min, bb_sz);
|
||||||
std::copy(std::begin(m_plane_transform), std::end(m_plane_transform), plane_transform.begin());
|
|
||||||
const auto mix_shell = pp::panopainter::make_legacy_canvas_stroke_mix_pass_shell(
|
|
||||||
[&] {
|
|
||||||
m_mixer.bindFramebuffer();
|
|
||||||
apply_canvas_viewport(0, 0, m_mixer.getWidth(), m_mixer.getHeight());
|
|
||||||
apply_canvas_capability(depth_test_state(), false);
|
|
||||||
apply_canvas_capability(scissor_test_state(), true);
|
|
||||||
apply_canvas_capability(blend_state(), false);
|
|
||||||
apply_canvas_scissor(
|
|
||||||
static_cast<std::int32_t>(bb_min.x),
|
|
||||||
static_cast<std::int32_t>(bb_min.y),
|
|
||||||
static_cast<std::int32_t>(bb_sz.x),
|
|
||||||
static_cast<std::int32_t>(bb_sz.y));
|
|
||||||
},
|
|
||||||
[&] {
|
|
||||||
m_mixer.unbindFramebuffer();
|
|
||||||
});
|
|
||||||
[[maybe_unused]] const auto mix_result = pp::panopainter::execute_legacy_canvas_stroke_mix_pass_shell(
|
[[maybe_unused]] const auto mix_result = pp::panopainter::execute_legacy_canvas_stroke_mix_pass_shell(
|
||||||
mix_shell.setup.begin,
|
mix_shell.setup.begin,
|
||||||
mix_shell.setup.end,
|
mix_shell.setup.end,
|
||||||
@@ -527,6 +510,29 @@ static void execute_canvas_draw_merge_final_plane_composite(
|
|||||||
pp::panopainter::execute_legacy_canvas_draw_merge_final_plane_composite(uniforms, execution);
|
pp::panopainter::execute_legacy_canvas_draw_merge_final_plane_composite(uniforms, execution);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static auto make_canvas_stroke_mix_pass_shell(
|
||||||
|
Canvas& canvas,
|
||||||
|
const glm::vec2& bb_min,
|
||||||
|
const glm::vec2& bb_sz)
|
||||||
|
{
|
||||||
|
return pp::panopainter::make_legacy_canvas_stroke_mix_pass_shell(
|
||||||
|
[&] {
|
||||||
|
canvas.m_mixer.bindFramebuffer();
|
||||||
|
canvas.apply_canvas_viewport(0, 0, canvas.m_mixer.getWidth(), canvas.m_mixer.getHeight());
|
||||||
|
canvas.apply_canvas_capability(canvas.depth_test_state(), false);
|
||||||
|
canvas.apply_canvas_capability(canvas.scissor_test_state(), true);
|
||||||
|
canvas.apply_canvas_capability(canvas.blend_state(), false);
|
||||||
|
canvas.apply_canvas_scissor(
|
||||||
|
static_cast<std::int32_t>(bb_min.x),
|
||||||
|
static_cast<std::int32_t>(bb_min.y),
|
||||||
|
static_cast<std::int32_t>(bb_sz.x),
|
||||||
|
static_cast<std::int32_t>(bb_sz.y));
|
||||||
|
},
|
||||||
|
[&] {
|
||||||
|
canvas.m_mixer.unbindFramebuffer();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
glm::vec4 Canvas::stroke_draw_samples(
|
glm::vec4 Canvas::stroke_draw_samples(
|
||||||
int i,
|
int i,
|
||||||
std::vector<vertex_t>& P,
|
std::vector<vertex_t>& P,
|
||||||
|
|||||||
Reference in New Issue
Block a user