Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index 5b37e08b305aa0b68e1b03de25fc816d94a04a57..56cfb8d652ad1e43867e7304c820f809d654d5eb 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -1446,30 +1446,11 @@ void SkCanvas::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edg |
fClipStack.clipDevPath(devPath, op, kSoft_ClipEdgeStyle == edgeStyle); |
if (fAllowSimplifyClip) { |
- devPath.reset(); |
- devPath.setFillType(SkPath::kInverseEvenOdd_FillType); |
- const SkClipStack* clipStack = getClipStack(); |
- SkClipStack::Iter iter(*clipStack, SkClipStack::Iter::kBottom_IterStart); |
- const SkClipStack::Element* element; |
- while ((element = iter.next())) { |
- SkClipStack::Element::Type type = element->getType(); |
- SkPath operand; |
- if (type != SkClipStack::Element::kEmpty_Type) { |
- element->asPath(&operand); |
- } |
- SkRegion::Op elementOp = element->getOp(); |
- if (elementOp == SkRegion::kReplace_Op) { |
- devPath = operand; |
- } else { |
- Op(devPath, operand, (SkPathOp) elementOp, &devPath); |
- } |
- // if the prev and curr clips disagree about aa -vs- not, favor the aa request. |
- // perhaps we need an API change to avoid this sort of mixed-signals about |
- // clipping. |
- if (element->isAA()) { |
- edgeStyle = kSoft_ClipEdgeStyle; |
- } |
+ bool clipIsAA = getClipStack()->asPath(&devPath); |
+ if (clipIsAA) { |
+ edgeStyle = kSoft_ClipEdgeStyle; |
} |
+ |
op = SkRegion::kReplace_Op; |
} |