Extract preview main live sample wrapping
This commit is contained in:
@@ -205,6 +205,10 @@ agent or engineer to remove them without reconstructing context from chat.
|
||||
now routes the mix-pass execution request through
|
||||
`make_stroke_draw_mix_execution_request(...)`; the retained path still owns
|
||||
the concrete framebuffer, viewport, and draw ordering.
|
||||
- 2026-06-14: DEBT-0036 was narrowed again. `NodeStrokePreview::make_stroke_draw_immediate_main_live_pass_request()`
|
||||
now routes sample shader setup through
|
||||
`execute_stroke_draw_immediate_main_live_sample_pass(...)`; the retained path
|
||||
still owns the concrete preview frame mutation and copy behavior.
|
||||
- 2026-06-13: DEBT-0036 was narrowed again. `Canvas::draw_merge()` temporary
|
||||
composite setup now routes through `execute_canvas_draw_merge_temporary_composite(...)`;
|
||||
setup, sampler, texture, draw, and unbind callbacks still remain retained in
|
||||
|
||||
@@ -1901,7 +1901,7 @@ cmake --build --preset windows-msvc-default --config Debug --target PanoPainter
|
||||
|
||||
### STR-042 - Extract Preview Main Live Sample Callback Wrapping
|
||||
|
||||
Status: Ready
|
||||
Status: Done
|
||||
Score: no score movement
|
||||
Debt: `DEBT-0036`
|
||||
Scope: `src/node_stroke_preview.cpp`, `tests/paint_renderer/compositor_tests.cpp`
|
||||
@@ -1912,6 +1912,8 @@ Move the remaining `NodeStrokePreview::make_stroke_draw_immediate_main_live_pass
|
||||
sample/copy callback wrapping into retained helpers so the request builder only
|
||||
forwards concrete preview state.
|
||||
|
||||
Closeout: `2053c55b`
|
||||
|
||||
Done Checks:
|
||||
|
||||
- `make_stroke_draw_immediate_main_live_pass_request()` no longer owns the
|
||||
|
||||
@@ -745,13 +745,11 @@ NodeStrokePreview::make_stroke_draw_immediate_main_live_pass_request(
|
||||
frame.flow = glm::max(frame.flow, m_min_flow);
|
||||
},
|
||||
.setup_sample_shader = [&](auto& frame) {
|
||||
pp::panopainter::use_legacy_stroke_shader();
|
||||
pp::panopainter::apply_legacy_stroke_sample_uniforms(
|
||||
pp::panopainter::LegacyStrokeSampleUniforms {
|
||||
.color = frame.col,
|
||||
.alpha = frame.flow,
|
||||
.opacity = frame.opacity,
|
||||
});
|
||||
execute_stroke_draw_immediate_main_live_sample_pass(
|
||||
brush,
|
||||
copy_stroke_destination,
|
||||
frame,
|
||||
size);
|
||||
},
|
||||
.draw_sample = [&](auto& frame) {
|
||||
/*auto rect =*/ stroke_draw_samples(frame.shapes, m_tex, copy_stroke_destination);
|
||||
@@ -762,10 +760,7 @@ NodeStrokePreview::make_stroke_draw_immediate_main_live_pass_request(
|
||||
size,
|
||||
stroke_preview_composite_slots::kStroke);
|
||||
},
|
||||
.finish_main_pass = [&] {
|
||||
set_active_texture_unit(stroke_preview_live_slots::kMixer);
|
||||
m_rtt_mixer.unbindTexture();
|
||||
},
|
||||
.finish_main_pass = [&] { set_active_texture_unit(stroke_preview_live_slots::kMixer); m_rtt_mixer.unbindTexture(); },
|
||||
};
|
||||
}
|
||||
|
||||
@@ -878,6 +873,24 @@ NodeStrokePreview::make_stroke_draw_immediate_pass_sequence_request(
|
||||
};
|
||||
}
|
||||
|
||||
void NodeStrokePreview::execute_stroke_draw_immediate_main_live_sample_pass(
|
||||
const Brush& brush,
|
||||
bool copy_stroke_destination,
|
||||
const StrokeFrame& frame,
|
||||
const glm::vec2& size)
|
||||
{
|
||||
(void)brush;
|
||||
(void)copy_stroke_destination;
|
||||
(void)size;
|
||||
pp::panopainter::use_legacy_stroke_shader();
|
||||
pp::panopainter::apply_legacy_stroke_sample_uniforms(
|
||||
pp::panopainter::LegacyStrokeSampleUniforms {
|
||||
.color = frame.col,
|
||||
.alpha = frame.flow,
|
||||
.opacity = frame.opacity,
|
||||
});
|
||||
}
|
||||
|
||||
pp::panopainter::LegacyNodeStrokePreviewMixExecutionRequest
|
||||
NodeStrokePreview::make_stroke_draw_mix_execution_request(
|
||||
const pp::panopainter::LegacyNodeStrokePreviewMixPassPlan& mix_pass,
|
||||
|
||||
@@ -59,6 +59,11 @@ public:
|
||||
bool copy_stroke_destination,
|
||||
float zoom,
|
||||
const glm::vec2& size);
|
||||
void execute_stroke_draw_immediate_main_live_sample_pass(
|
||||
const Brush& brush,
|
||||
bool copy_stroke_destination,
|
||||
const StrokeFrame& frame,
|
||||
const glm::vec2& size);
|
||||
void execute_stroke_draw_immediate_dual_pass(
|
||||
const Brush& brush,
|
||||
const pp::panopainter::LegacyNodeStrokePreviewPassOrchestrationPlan& pass_orchestration,
|
||||
|
||||
Reference in New Issue
Block a user