diff options
author | 2013-04-25 13:34:40 +0000 | |
---|---|---|
committer | 2013-04-25 13:34:40 +0000 | |
commit | 45a75fb4d0ca5daa0ac5e634238970306e3b5838 (patch) | |
tree | 20ec83c238e15edc4e76f57b54030cb671abf864 /include/core | |
parent | 32c1b66a2c4f26935ba59f3afe3e81600fade78d (diff) |
path ops : make it real
Add an option to SkCanvas to turn on path
ops when combining clips.
Allow Op() to use one of the input paths
as an output path.
Fix a bug in Op() when the minuend is empty
and the subtrahend is not (for difference).
Change the build to allow core to depend on pathops.
Review URL: https://codereview.chromium.org/14474002
git-svn-id: http://skia.googlecode.com/svn/trunk@8855 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkCanvas.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 930bdb6fbc..2bf5a54a51 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -381,6 +381,13 @@ public: fAllowSoftClip = allow; } + /** EXPERIMENTAL -- only used for testing + Set to simplify clip stack using path ops. + */ + void setAllowSimplifyClip(bool allow) { + fAllowSimplifyClip = allow; + } + /** Modify the current clip with the specified region. Note that unlike clipRect() and clipPath() which transform their arguments by the current matrix, clipRegion() assumes its argument is already in device @@ -1064,6 +1071,7 @@ private: mutable SkRectCompareType fLocalBoundsCompareType; mutable bool fLocalBoundsCompareTypeDirty; bool fAllowSoftClip; + bool fAllowSimplifyClip; const SkRectCompareType& getLocalClipBoundsCompareType() const { if (fLocalBoundsCompareTypeDirty) { @@ -1074,6 +1082,7 @@ private: } void computeLocalClipBoundsCompareType() const; + class AutoValidateClip : ::SkNoncopyable { public: explicit AutoValidateClip(SkCanvas* canvas) : fCanvas(canvas) { |