commit | 38ea40eb750596c75b8ffb5c8f94bcb84b94a7c3 | [log] [tgz] |
---|---|---|
author | Florin Malita <fmalita@chromium.org> | Mon Jan 29 16:31:14 2018 -0500 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Mon Jan 29 21:57:44 2018 +0000 |
tree | 966c9416f99c784dd84dcc31d91fe3bf790bfd11 | |
parent | eed48b66eb083f01638d1a2126a2b49f1e2ddc8f [diff] [blame] |
[skottie] Layer clip support TBR= Change-Id: Ibf65efc69031f8f6e19f4f28cccab29c357e704d Reviewed-on: https://skia-review.googlesource.com/101540 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
diff --git a/experimental/sksg/geometry/SkSGPath.cpp b/experimental/sksg/geometry/SkSGPath.cpp index 2b7dc94..8d5a253 100644 --- a/experimental/sksg/geometry/SkSGPath.cpp +++ b/experimental/sksg/geometry/SkSGPath.cpp
@@ -14,6 +14,10 @@ Path::Path(const SkPath& path) : fPath(path) {} +void Path::onClip(SkCanvas* canvas, bool antiAlias) const { + canvas->clipPath(fPath, SkClipOp::kIntersect, antiAlias); +} + void Path::onDraw(SkCanvas* canvas, const SkPaint& paint) const { canvas->drawPath(fPath, paint); }