Share retained stroke temporary composite helper

This commit is contained in:
2026-06-13 11:08:02 +02:00
parent fae108d520
commit cf3b8e856d
6 changed files with 121 additions and 52 deletions

View File

@@ -656,6 +656,26 @@ std::size_t execute_legacy_canvas_stroke_live_pass_with_face_framebuffers(
pass_dirty_faces);
}
template <
typename SetupCompositeShader,
typename BindCompositeSamplers,
typename BindCompositeTextures,
typename DrawComposite,
typename UnbindCompositeTextures>
void execute_legacy_canvas_stroke_temporary_composite(
SetupCompositeShader&& setup_composite_shader,
BindCompositeSamplers&& bind_composite_samplers,
BindCompositeTextures&& bind_composite_textures,
DrawComposite&& draw_composite,
UnbindCompositeTextures&& unbind_composite_textures)
{
setup_composite_shader();
bind_composite_samplers();
bind_composite_textures();
draw_composite();
unbind_composite_textures();
}
[[nodiscard]] inline pp::paint_renderer::CanvasStrokeBox legacy_canvas_stroke_box(glm::vec4 box) noexcept
{
return pp::paint_renderer::CanvasStrokeBox {