diff options
author | 2012-11-07 16:17:24 +0000 | |
---|---|---|
committer | 2012-11-07 16:17:24 +0000 | |
commit | 7b7cdd147f5528865238e5ed98c79e6d319fde9b (patch) | |
tree | 8d42e48f75699dbeb53f7ed7a6a4f3f820abe988 /src/core/SkClipStack.cpp | |
parent | 8f0a7b8e7334187a5d7d5ab7fde5a3c3009555f5 (diff) |
Some improvements to reduce the number of pixels touched in generating alpha clip masks
Review URL: https://codereview.appspot.com/6828043
git-svn-id: http://skia.googlecode.com/svn/trunk@6329 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkClipStack.cpp')
-rw-r--r-- | src/core/SkClipStack.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/SkClipStack.cpp b/src/core/SkClipStack.cpp index 0f2d632a84..a5b591e72a 100644 --- a/src/core/SkClipStack.cpp +++ b/src/core/SkClipStack.cpp @@ -724,6 +724,17 @@ bool operator!=(const SkClipStack::Iter::Clip& a, return !(a == b); } +const SkRect& SkClipStack::Iter::Clip::getBounds() const { + if (NULL != fRect) { + return *fRect; + } else if (NULL != fPath) { + return fPath->getBounds(); + } else { + static const SkRect kEmpty = {0, 0, 0, 0}; + return kEmpty; + } +} + SkClipStack::Iter::Iter(const SkClipStack& stack, IterStart startLoc) : fStack(&stack) { this->reset(stack, startLoc); |