aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkClipStack.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-07 16:17:24 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-07 16:17:24 +0000
commit7b7cdd147f5528865238e5ed98c79e6d319fde9b (patch)
tree8d42e48f75699dbeb53f7ed7a6a4f3f820abe988 /src/core/SkClipStack.cpp
parent8f0a7b8e7334187a5d7d5ab7fde5a3c3009555f5 (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.cpp11
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);