diff options
author | caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-11-07 14:54:49 +0000 |
---|---|---|
committer | caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-11-07 14:54:49 +0000 |
commit | 8f0a7b8e7334187a5d7d5ab7fde5a3c3009555f5 (patch) | |
tree | b66449131d0761413e7f15f3f83f193a05879c33 /include | |
parent | bb094b947bb53374f5ad3df1b0cc71f41d43d9bf (diff) |
Add temporary interfaces in blur and clip to
permit testing if it is to our advantage
to selectively disable soft clipping and
high quality blurs during animations.
Review URL: https://codereview.appspot.com/6812092
git-svn-id: http://skia.googlecode.com/svn/trunk@6328 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkCanvas.h | 9 | ||||
-rw-r--r-- | include/core/SkMaskFilter.h | 8 |
2 files changed, 17 insertions, 0 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 0d7b899c73..5c0738c5ac 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -363,6 +363,14 @@ public: SkRegion::Op op = SkRegion::kIntersect_Op, bool doAntiAlias = false); + /** EXPERIMENTAL -- only used for testing + Set to false to force clips to be hard, even if doAntiAlias=true is + passed to clipRect or clipPath. + */ + void setAllowSoftClip(bool allow) { + fAllowSoftClip = 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 @@ -1027,6 +1035,7 @@ private: */ mutable SkRectCompareType fLocalBoundsCompareType; mutable bool fLocalBoundsCompareTypeDirty; + bool fAllowSoftClip; const SkRectCompareType& getLocalClipBoundsCompareType() const { if (fLocalBoundsCompareTypeDirty) { diff --git a/include/core/SkMaskFilter.h b/include/core/SkMaskFilter.h index 47cf516f2f..8dc7a6ab69 100644 --- a/include/core/SkMaskFilter.h +++ b/include/core/SkMaskFilter.h @@ -81,6 +81,14 @@ public: virtual BlurType asABlur(BlurInfo*) const; /** + * TEMPORARY HACK -- SkMaskFilters are designed to be immutable + * Optional method for maskfilters that can be described as a blur. If so, + * set the current blur to respect the [radius / ignore-transform / + * quality] settings. + */ + virtual void setAsABlur(const BlurInfo& ); + + /** * The fast bounds function is used to enable the paint to be culled early * in the drawing pipeline. This function accepts the current bounds of the * paint as its src param and the filter adjust those bounds using its |