Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index 7025e53eb197611ef286c622597daa21d8d674aa..cffc46aed8c1819ba341b7511b4d6157e0057b2b 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -1236,12 +1236,28 @@ bool SkCanvas::clipRRect(const SkRRect& rrect, SkRegion::Op op, bool doAA) { |
if (rrect.isRect()) { |
// call the non-virtual version |
return this->SkCanvas::clipRect(rrect.getBounds(), op, doAA); |
- } else { |
- SkPath path; |
- path.addRRect(rrect); |
- // call the non-virtual version |
- return this->SkCanvas::clipPath(path, op, doAA); |
} |
+ |
+ SkRRect transformedRRect; |
+ if (rrect.transform(*fMCRec->fMatrix, &transformedRRect)) { |
+ AutoValidateClip avc(this); |
+ |
+ fDeviceCMDirty = true; |
+ fCachedLocalClipBoundsDirty = true; |
+ doAA &= fAllowSoftClip; |
+ |
+ fClipStack.clipDevRRect(transformedRRect, op, doAA); |
+ |
+ SkPath devPath; |
+ devPath.addRRect(transformedRRect); |
+ |
+ return clipPathHelper(this, fMCRec->fRasterClip, devPath, op, doAA); |
+ } |
+ |
+ SkPath path; |
+ path.addRRect(rrect); |
+ // call the non-virtual version |
+ return this->SkCanvas::clipPath(path, op, doAA); |
} |
bool SkCanvas::clipPath(const SkPath& path, SkRegion::Op op, bool doAA) { |