Extract preview final composite wrapper
This commit is contained in:
@@ -18,6 +18,9 @@ agent or engineer to remove them without reconstructing context from chat.
|
|||||||
|
|
||||||
## Recent Reductions
|
## 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
|
- 2026-06-13: `LATER-003` was narrowed again. `Canvas::stroke_draw()` now
|
||||||
routes dual-brush tip dispatch through retained helper overloads, so the
|
routes dual-brush tip dispatch through retained helper overloads, so the
|
||||||
face-index callback wiring is no longer built inline in the dual-pass
|
face-index callback wiring is no longer built inline in the dual-pass
|
||||||
|
|||||||
@@ -575,6 +575,9 @@ Done Checks:
|
|||||||
|
|
||||||
Progress Notes:
|
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
|
- 2026-06-13: `Canvas::stroke_draw()` now routes dual-brush tip dispatch
|
||||||
through retained helper overloads, so the face-index callback wiring is no
|
through retained helper overloads, so the face-index callback wiring is no
|
||||||
longer built inline in the dual-pass branch.
|
longer built inline in the dual-pass branch.
|
||||||
|
|||||||
@@ -205,10 +205,21 @@ void execute_stroke_preview_final_composite_pass(const StrokePreviewCompositePas
|
|||||||
.draw_composite = [&] {
|
.draw_composite = [&] {
|
||||||
inputs.draw_composite();
|
inputs.draw_composite();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
assert(composite_ok);
|
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(
|
void copy_stroke_preview_framebuffer_to_texture(
|
||||||
Texture2D& texture,
|
Texture2D& texture,
|
||||||
glm::vec2 size,
|
glm::vec2 size,
|
||||||
@@ -838,7 +849,7 @@ void NodeStrokePreview::draw_stroke_immediate()
|
|||||||
},
|
},
|
||||||
.finish_main_pass = [&] {},
|
.finish_main_pass = [&] {},
|
||||||
.execute_final_composite = [&] {
|
.execute_final_composite = [&] {
|
||||||
execute_stroke_preview_final_composite_pass(
|
execute_stroke_preview_final_composite_and_copy(
|
||||||
StrokePreviewCompositePassInputs {
|
StrokePreviewCompositePassInputs {
|
||||||
.resolution = size,
|
.resolution = size,
|
||||||
.pattern_scale = patt_scale,
|
.pattern_scale = patt_scale,
|
||||||
@@ -852,11 +863,11 @@ void NodeStrokePreview::draw_stroke_immediate()
|
|||||||
.draw_composite = [&] {
|
.draw_composite = [&] {
|
||||||
m_plane.draw_fill();
|
m_plane.draw_fill();
|
||||||
},
|
},
|
||||||
});
|
},
|
||||||
},
|
m_tex_preview,
|
||||||
.copy_preview_result = [&] {
|
size);
|
||||||
copy_stroke_preview_result_to_texture(m_tex_preview, size);
|
|
||||||
},
|
},
|
||||||
|
.copy_preview_result = [&] {},
|
||||||
});
|
});
|
||||||
assert(sequence_ok);
|
assert(sequence_ok);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user