aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar fmalita <fmalita@chromium.org>2015-02-04 07:39:34 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-04 07:39:34 -0800
commit1a481fe4bf632ed4f76cb337691236fabfd4ab03 (patch)
tree1dbb47d73d8565084c6edb664b75e986bcf8f4a2 /include
parentb9d4d279cd381392e69c6638457055264696f7eb (diff)
[SkSVGDevice] Initial clipping support
Implement SVG clips based on clip stack flattening - which is now exposed in SkClipStack::asPath() and shared with SkCanvas's simplify-clip code. R=reed@google.com,mtklein@google.com Review URL: https://codereview.chromium.org/876923003
Diffstat (limited to 'include')
-rw-r--r--include/core/SkClipStack.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/core/SkClipStack.h b/include/core/SkClipStack.h
index 95e41e6220..79789dcc26 100644
--- a/include/core/SkClipStack.h
+++ b/include/core/SkClipStack.h
@@ -323,6 +323,12 @@ public:
*/
bool quickContains(const SkRect& devRect) const;
+ /**
+ * Flattens the clip stack into a single SkPath. Returns true if any of
+ * the clip stack components requires anti-aliasing.
+ */
+ bool asPath(SkPath* path) const;
+
void clipDevRect(const SkIRect& ir, SkRegion::Op op) {
SkRect r;
r.set(ir);