Extract preview final composite wrapper

This commit is contained in:
2026-06-13 18:53:31 +02:00
parent b5b7bcc3cf
commit 718c9224b9
3 changed files with 23 additions and 6 deletions

View File

@@ -18,6 +18,9 @@ agent or engineer to remove them without reconstructing context from chat.
## Recent Reductions
- 2026-06-13: `DEBT-0036` was narrowed again. `NodeStrokePreview::draw_stroke_immediate()`
now routes final composite execution and preview copy-back through a retained
local wrapper, leaving the call site with only sequence wiring.
- 2026-06-13: `LATER-003` was narrowed again. `Canvas::stroke_draw()` now
routes dual-brush tip dispatch through retained helper overloads, so the
face-index callback wiring is no longer built inline in the dual-pass

View File

@@ -575,6 +575,9 @@ Done Checks:
Progress Notes:
- 2026-06-13: `NodeStrokePreview::draw_stroke_immediate()` now routes final
composite execution and preview copy-back through a retained local wrapper,
leaving the call site with only sequence wiring.
- 2026-06-13: `Canvas::stroke_draw()` now routes dual-brush tip dispatch
through retained helper overloads, so the face-index callback wiring is no
longer built inline in the dual-pass branch.

View File

@@ -205,10 +205,21 @@ void execute_stroke_preview_final_composite_pass(const StrokePreviewCompositePas
.draw_composite = [&] {
inputs.draw_composite();
},
});
});
assert(composite_ok);
}
void copy_stroke_preview_result_to_texture(Texture2D& texture, glm::vec2 size);
void execute_stroke_preview_final_composite_and_copy(
const StrokePreviewCompositePassInputs& inputs,
Texture2D& preview_texture,
glm::vec2 size)
{
execute_stroke_preview_final_composite_pass(inputs);
copy_stroke_preview_result_to_texture(preview_texture, size);
}
void copy_stroke_preview_framebuffer_to_texture(
Texture2D& texture,
glm::vec2 size,
@@ -838,7 +849,7 @@ void NodeStrokePreview::draw_stroke_immediate()
},
.finish_main_pass = [&] {},
.execute_final_composite = [&] {
execute_stroke_preview_final_composite_pass(
execute_stroke_preview_final_composite_and_copy(
StrokePreviewCompositePassInputs {
.resolution = size,
.pattern_scale = patt_scale,
@@ -852,11 +863,11 @@ void NodeStrokePreview::draw_stroke_immediate()
.draw_composite = [&] {
m_plane.draw_fill();
},
});
},
.copy_preview_result = [&] {
copy_stroke_preview_result_to_texture(m_tex_preview, size);
},
m_tex_preview,
size);
},
.copy_preview_result = [&] {},
});
assert(sequence_ok);