[svg] Refactor <path> to use new parsing
Change-Id: Ib33111e1b00f05d32f8c6add512c38b5a6197af8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367884
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
diff --git a/modules/svg/include/SkSVGPath.h b/modules/svg/include/SkSVGPath.h
index 7723bfd..24f97d4 100644
--- a/modules/svg/include/SkSVGPath.h
+++ b/modules/svg/include/SkSVGPath.h
@@ -15,10 +15,10 @@
public:
static sk_sp<SkSVGPath> Make() { return sk_sp<SkSVGPath>(new SkSVGPath()); }
- void setPath(const SkPath& path) { fPath = path; }
+ SVG_ATTR(Path, SkPath, SkPath())
protected:
- void onSetAttribute(SkSVGAttribute, const SkSVGValue&) override;
+ bool parseAndSetAttribute(const char*, const char*) override;
void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&,
SkPathFillType) const override;
@@ -30,8 +30,6 @@
private:
SkSVGPath();
- mutable SkPath fPath; // mutated in onDraw(), to apply inherited fill types.
-
using INHERITED = SkSVGShape;
};