Extract pad stroke face orchestration
This commit is contained in:
@@ -248,6 +248,9 @@ struct LegacyCanvasStrokePadExecutionResult {
|
||||
std::size_t padded_faces = 0;
|
||||
};
|
||||
|
||||
[[nodiscard]] inline LegacyCanvasStrokePadExecutionResult execute_legacy_canvas_stroke_pad_faces(
|
||||
const LegacyCanvasStrokePadExecutionRequest& request);
|
||||
|
||||
struct LegacyCanvasStrokeMixPassPlane {
|
||||
int index = 0;
|
||||
bool visible = true;
|
||||
@@ -368,6 +371,35 @@ std::size_t execute_legacy_canvas_stroke_main_pass_frame_callbacks(
|
||||
pass_dirty_faces);
|
||||
}
|
||||
|
||||
template <typename Faces, typename UploadPadVertices, typename BeginFace, typename BindDestinationTexture, typename CopyFramebufferToDestinationTexture, typename UnbindDestinationTexture, typename DrawPad, typename FinishFace>
|
||||
std::size_t execute_legacy_canvas_stroke_pad_face_callbacks(
|
||||
Faces&& faces,
|
||||
pp::renderer::Extent2D extent,
|
||||
bool copy_stroke_destination,
|
||||
UploadPadVertices&& upload_pad_vertices,
|
||||
BeginFace&& begin_face,
|
||||
BindDestinationTexture&& bind_destination_texture,
|
||||
CopyFramebufferToDestinationTexture&& copy_framebuffer_to_destination_texture,
|
||||
UnbindDestinationTexture&& unbind_destination_texture,
|
||||
DrawPad&& draw_pad,
|
||||
FinishFace&& finish_face)
|
||||
{
|
||||
return execute_legacy_canvas_stroke_pad_faces(
|
||||
LegacyCanvasStrokePadExecutionRequest {
|
||||
.context = "Canvas::stroke_draw",
|
||||
.extent = extent,
|
||||
.faces = std::forward<Faces>(faces),
|
||||
.copy_stroke_destination = copy_stroke_destination,
|
||||
.upload_pad_vertices = std::forward<UploadPadVertices>(upload_pad_vertices),
|
||||
.begin_face = std::forward<BeginFace>(begin_face),
|
||||
.bind_destination_texture = std::forward<BindDestinationTexture>(bind_destination_texture),
|
||||
.copy_framebuffer_to_destination_texture = std::forward<CopyFramebufferToDestinationTexture>(copy_framebuffer_to_destination_texture),
|
||||
.unbind_destination_texture = std::forward<UnbindDestinationTexture>(unbind_destination_texture),
|
||||
.draw_pad = std::forward<DrawPad>(draw_pad),
|
||||
.finish_face = std::forward<FinishFace>(finish_face),
|
||||
}).padded_faces;
|
||||
}
|
||||
|
||||
[[nodiscard]] inline LegacyCanvasStrokeDualPassResult execute_legacy_canvas_stroke_dual_pass(
|
||||
const LegacyCanvasStrokeDualPassRequest& request)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user