aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/sksg/SkSGGeometryNode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'experimental/sksg/SkSGGeometryNode.cpp')
-rw-r--r--experimental/sksg/SkSGGeometryNode.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/experimental/sksg/SkSGGeometryNode.cpp b/experimental/sksg/SkSGGeometryNode.cpp
index 6ac7eda6a4..cbc0d558e2 100644
--- a/experimental/sksg/SkSGGeometryNode.cpp
+++ b/experimental/sksg/SkSGGeometryNode.cpp
@@ -7,6 +7,8 @@
#include "SkSGGeometryNode.h"
+#include "SkPath.h"
+
namespace sksg {
void GeometryNode::draw(SkCanvas* canvas, const SkPaint& paint) const {
@@ -14,4 +16,9 @@ void GeometryNode::draw(SkCanvas* canvas, const SkPaint& paint) const {
this->onDraw(canvas, paint);
}
+SkPath GeometryNode::asPath() const {
+ SkASSERT(!this->hasInval());
+ return this->onAsPath();
+}
+
} // namespace sksg