Add main stroke texture dispatch helper coverage
This commit is contained in:
@@ -509,6 +509,10 @@ Done Checks:
|
|||||||
|
|
||||||
Progress Notes:
|
Progress Notes:
|
||||||
|
|
||||||
|
- 2026-06-13: `pp_paint_renderer_stroke_execution_tests` now also covers the
|
||||||
|
new retained main-pass texture dispatch helper builder and its pattern/mixer
|
||||||
|
wiring. Next slice should target another narrow `stroke_draw()` seam or stop
|
||||||
|
once the remaining inline code is just trivial binding glue.
|
||||||
- 2026-06-13: `pp_paint_renderer_stroke_execution_tests` now covers the new
|
- 2026-06-13: `pp_paint_renderer_stroke_execution_tests` now covers the new
|
||||||
retained sampler dispatch helper builder and its pattern bind/unbind wiring.
|
retained sampler dispatch helper builder and its pattern bind/unbind wiring.
|
||||||
Next slice should target another narrow `stroke_draw()` seam or another
|
Next slice should target another narrow `stroke_draw()` seam or another
|
||||||
|
|||||||
@@ -260,6 +260,33 @@ void retained_stroke_sampler_dispatch_helper_builds_expected_callback_wiring(pp:
|
|||||||
PP_EXPECT(h, events == expected_events);
|
PP_EXPECT(h, events == expected_events);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void retained_stroke_main_pass_texture_dispatch_helper_builds_expected_callback_wiring(pp::tests::Harness& h)
|
||||||
|
{
|
||||||
|
std::vector<std::string> events;
|
||||||
|
const auto dispatch = pp::panopainter::make_legacy_canvas_stroke_main_pass_texture_dispatch(
|
||||||
|
[&](int slot) { events.emplace_back("activate:" + std::to_string(slot)); },
|
||||||
|
[&] { events.emplace_back("bind:brush_tip"); },
|
||||||
|
[&] { events.emplace_back("unbind:brush_tip"); },
|
||||||
|
[&] { events.emplace_back("bind:pattern"); },
|
||||||
|
[&] { events.emplace_back("bind:mixer"); },
|
||||||
|
[&] { events.emplace_back("unbind:mixer"); });
|
||||||
|
|
||||||
|
pp::panopainter::bind_legacy_canvas_stroke_texture_input(
|
||||||
|
LegacyCanvasStrokeTextureInput::pattern,
|
||||||
|
dispatch);
|
||||||
|
pp::panopainter::unbind_legacy_canvas_stroke_texture_input(
|
||||||
|
LegacyCanvasStrokeTextureInput::mixer,
|
||||||
|
dispatch);
|
||||||
|
|
||||||
|
const std::vector<std::string> expected_events {
|
||||||
|
"activate:2",
|
||||||
|
"bind:pattern",
|
||||||
|
"activate:3",
|
||||||
|
"unbind:mixer",
|
||||||
|
};
|
||||||
|
PP_EXPECT(h, events == expected_events);
|
||||||
|
}
|
||||||
|
|
||||||
void retained_stroke_sample_executor_copies_destination_and_expands_quads(pp::tests::Harness& h)
|
void retained_stroke_sample_executor_copies_destination_and_expands_quads(pp::tests::Harness& h)
|
||||||
{
|
{
|
||||||
const auto vertices = make_quad_vertices();
|
const auto vertices = make_quad_vertices();
|
||||||
@@ -1340,6 +1367,9 @@ int main()
|
|||||||
harness.run(
|
harness.run(
|
||||||
"retained_stroke_sampler_dispatch_helper_builds_expected_callback_wiring",
|
"retained_stroke_sampler_dispatch_helper_builds_expected_callback_wiring",
|
||||||
retained_stroke_sampler_dispatch_helper_builds_expected_callback_wiring);
|
retained_stroke_sampler_dispatch_helper_builds_expected_callback_wiring);
|
||||||
|
harness.run(
|
||||||
|
"retained_stroke_main_pass_texture_dispatch_helper_builds_expected_callback_wiring",
|
||||||
|
retained_stroke_main_pass_texture_dispatch_helper_builds_expected_callback_wiring);
|
||||||
harness.run(
|
harness.run(
|
||||||
"retained_stroke_sample_executor_unbinds_and_skips_draw_when_bounds_are_empty",
|
"retained_stroke_sample_executor_unbinds_and_skips_draw_when_bounds_are_empty",
|
||||||
retained_stroke_sample_executor_unbinds_and_skips_draw_when_bounds_are_empty);
|
retained_stroke_sample_executor_unbinds_and_skips_draw_when_bounds_are_empty);
|
||||||
|
|||||||
Reference in New Issue
Block a user