aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-25 20:06:33 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-25 20:06:33 +0000
commite56513d2a9eebabf93d7824eebf9e64441c485ba (patch)
tree3d45d5a19b6d15433ba086f211ccaec1b2097fe8 /src
parentda4af24c9c52a80a0c9b4fbd2933f5939920c98c (diff)
if bounds don't intersect in DIFF mode, just return src (don't return empty)
Review URL: https://codereview.appspot.com/6337052 git-svn-id: http://skia.googlecode.com/svn/trunk@4331 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/core/SkAAClip.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/SkAAClip.cpp b/src/core/SkAAClip.cpp
index c4b15b6e2c..8936297231 100644
--- a/src/core/SkAAClip.cpp
+++ b/src/core/SkAAClip.cpp
@@ -1702,7 +1702,11 @@ bool SkAAClip::op(const SkRect& rOrig, SkRegion::Op op, bool doAA) {
case SkRegion::kIntersect_Op:
case SkRegion::kDifference_Op:
if (!rStorage.intersect(rOrig, boundsStorage)) {
- return this->setEmpty();
+ if (SkRegion::kIntersect_Op == op) {
+ return this->setEmpty();
+ } else { // kDifference
+ return !this->isEmpty();
+ }
}
r = &rStorage; // use the intersected bounds
break;