diff options
author | Florin Malita <fmalita@chromium.org> | 2018-01-29 16:31:14 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-29 21:57:44 +0000 |
commit | 38ea40eb750596c75b8ffb5c8f94bcb84b94a7c3 (patch) | |
tree | 966c9416f99c784dd84dcc31d91fe3bf790bfd11 /experimental/sksg/geometry/SkSGPath.cpp | |
parent | eed48b66eb083f01638d1a2126a2b49f1e2ddc8f (diff) |
[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>
Diffstat (limited to 'experimental/sksg/geometry/SkSGPath.cpp')
-rw-r--r-- | experimental/sksg/geometry/SkSGPath.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/experimental/sksg/geometry/SkSGPath.cpp b/experimental/sksg/geometry/SkSGPath.cpp index 2b7dc94952..8d5a25373a 100644 --- a/experimental/sksg/geometry/SkSGPath.cpp +++ b/experimental/sksg/geometry/SkSGPath.cpp @@ -14,6 +14,10 @@ namespace sksg { 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); } |