Extract pad stroke copy region helper
This commit is contained in:
@@ -1080,13 +1080,9 @@ void Canvas::stroke_draw()
|
||||
face_index));
|
||||
},
|
||||
[&](const pp::paint_renderer::CanvasStrokeCopyRegion& copy_region) {
|
||||
copy_framebuffer_to_texture_2d(
|
||||
copy_region.x,
|
||||
copy_region.y,
|
||||
copy_region.x,
|
||||
copy_region.y,
|
||||
copy_region.width,
|
||||
copy_region.height);
|
||||
pp::panopainter::execute_legacy_canvas_stroke_pad_copy_region(
|
||||
copy_region,
|
||||
copy_framebuffer_to_texture_2d);
|
||||
},
|
||||
[&](int face_index) {
|
||||
pp::panopainter::unbind_legacy_canvas_stroke_texture_inputs(
|
||||
|
||||
@@ -311,6 +311,19 @@ struct LegacyCanvasStrokePadExecutionResult {
|
||||
[[nodiscard]] inline LegacyCanvasStrokePadExecutionResult execute_legacy_canvas_stroke_pad_faces(
|
||||
const LegacyCanvasStrokePadExecutionRequest& request);
|
||||
|
||||
inline void execute_legacy_canvas_stroke_pad_copy_region(
|
||||
const pp::paint_renderer::CanvasStrokeCopyRegion& copy_region,
|
||||
const std::function<void(int, int, int, int, int, int)>& copy_framebuffer_to_texture_2d)
|
||||
{
|
||||
copy_framebuffer_to_texture_2d(
|
||||
copy_region.x,
|
||||
copy_region.y,
|
||||
copy_region.x,
|
||||
copy_region.y,
|
||||
copy_region.width,
|
||||
copy_region.height);
|
||||
}
|
||||
|
||||
struct LegacyCanvasStrokeMixPassPlane {
|
||||
int index = 0;
|
||||
bool visible = true;
|
||||
|
||||
Reference in New Issue
Block a user