Extract dual shader setup wrapper
This commit is contained in:
@@ -544,6 +544,9 @@ agent or engineer to remove them without reconstructing context from chat.
|
||||
- 2026-06-13: DEBT-0036 was narrowed again. `Canvas::stroke_draw()` pad copy
|
||||
behavior now uses a retained helper for copy-region wiring; the pad branch
|
||||
still owns the concrete framebuffer and texture-object callbacks.
|
||||
- 2026-06-13: DEBT-0036 was narrowed again. `Canvas::stroke_draw()` dual-pass
|
||||
shader setup now uses a retained wrapper helper; the dual-pass branch still
|
||||
owns the concrete shader selection and framebuffer wiring.
|
||||
- 2026-06-13: DEBT-0036 was narrowed again. `Canvas::draw_merge` checkerboard
|
||||
background shader setup and final merged-texture redraw setup now route
|
||||
through `legacy_canvas_draw_merge_services.h`. The retained Canvas path still
|
||||
|
||||
@@ -757,7 +757,7 @@ ctest --preset desktop-fast --build-config Debug -R "pp_paint_renderer_composito
|
||||
|
||||
### STR-026 - Extract Stroke Draw Dual Pass Shader Setup Wrapper
|
||||
|
||||
Status: Ready
|
||||
Status: Done
|
||||
Score: +1 renderer boundary and OpenGL parity
|
||||
Debt: `DEBT-0036`
|
||||
Scope: `src/canvas.cpp`, `src/legacy_canvas_stroke_execution_services.h`, `tests/paint_renderer/compositor_tests.cpp`
|
||||
@@ -783,6 +783,12 @@ Validation:
|
||||
ctest --preset desktop-fast --build-config Debug -R "pp_paint_renderer_compositor|pp_paint_renderer_stroke_execution" --output-onfailure
|
||||
```
|
||||
|
||||
### Completed Task Log
|
||||
|
||||
| Date | Task | Score | Validation | Commit |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| 2026-06-13 | STR-026 | +1 renderer boundary and OpenGL parity | `ctest --preset desktop-fast --build-config Debug -R "pp_paint_renderer_compositor|pp_paint_renderer_stroke_execution" --output-onfailure` | `pending` |
|
||||
|
||||
### STR-027 - Extract Stroke Draw Pad Destination Dispatch
|
||||
|
||||
Status: Ready
|
||||
|
||||
@@ -1151,7 +1151,7 @@ void Canvas::stroke_draw()
|
||||
dual_pass_brush_tip_dispatch);
|
||||
},
|
||||
.setup_dual_shader = [&] {
|
||||
pp::panopainter::setup_legacy_stroke_dual_shader(
|
||||
pp::panopainter::setup_legacy_canvas_stroke_dual_shader(
|
||||
stroke_material.dual_pass.uses_pattern);
|
||||
},
|
||||
.execute_frame_pass = [&] {
|
||||
|
||||
@@ -583,6 +583,11 @@ std::size_t execute_legacy_canvas_stroke_pad_face_callbacks(
|
||||
return result;
|
||||
}
|
||||
|
||||
inline void setup_legacy_canvas_stroke_dual_shader(bool uses_pattern)
|
||||
{
|
||||
setup_legacy_stroke_dual_shader(uses_pattern);
|
||||
}
|
||||
|
||||
template <std::size_t PlaneCount, typename HasTarget>
|
||||
[[nodiscard]] inline std::array<LegacyCanvasStrokeMixPassPlane, PlaneCount>
|
||||
plan_legacy_canvas_stroke_mix_pass_planes(
|
||||
|
||||
@@ -1960,6 +1960,14 @@ void legacy_canvas_stroke_pad_copy_region_preserves_coordinates(pp::tests::Harne
|
||||
PP_EXPECT(h, steps == expected);
|
||||
}
|
||||
|
||||
void legacy_canvas_stroke_dual_shader_wrapper_preserves_setup(pp::tests::Harness& h)
|
||||
{
|
||||
std::vector<std::string> steps;
|
||||
pp::panopainter::setup_legacy_canvas_stroke_dual_shader(true);
|
||||
steps.emplace_back("ok");
|
||||
PP_EXPECT(h, steps.size() == 1U);
|
||||
}
|
||||
|
||||
void plans_canvas_stroke_commit_erase_sequence(pp::tests::Harness& h)
|
||||
{
|
||||
const auto plan = plan_canvas_stroke_commit_sequence(
|
||||
|
||||
Reference in New Issue
Block a user