SkPathView for ownerless (can live on stack) SkPaths
Follow-on CLs will push higher up in SkDraw, so that everywhere today
we have to cons-up (with the associated mallocs) a temp SkPath we can
replace it with a stack-based SPath...
- drawRect
- drawOval
- drawRRect
- drawLine(s)
(similar to how this CL already handled quads and triangles)
Bug: skia:10566
Change-Id: I882b4f4c60e80235ca83c86c926e905b269a7afd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307784
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/samplecode/SampleClip.cpp b/samplecode/SampleClip.cpp
index 4a6c25d..443e462 100644
--- a/samplecode/SampleClip.cpp
+++ b/samplecode/SampleClip.cpp
@@ -227,7 +227,7 @@
SkPoint fPrev = {0, 0};
} rec;
- SkEdgeClipper::ClipPath(rotated, clip, false,
+ SkEdgeClipper::ClipPath(rotated.view(), clip, false,
[](SkEdgeClipper* clipper, bool newCtr, void* ctx) {
Rec* rec = (Rec*)ctx;