Index: src/core/SkRasterClip.cpp |
diff --git a/src/core/SkRasterClip.cpp b/src/core/SkRasterClip.cpp |
index 89c22e8601fe67da5f3811e77b5649fb8a554b02..ea1a7db429b468be96c59980de30c4eea6daa874 100644 |
--- a/src/core/SkRasterClip.cpp |
+++ b/src/core/SkRasterClip.cpp |
@@ -161,10 +161,19 @@ bool SkRasterClip::setPath(const SkPath& path, const SkRegion& clip, bool doAA) |
return this->updateCacheAndReturnNonEmpty(); |
} |
+bool SkRasterClip::op(const SkRRect& rrect, const SkISize& size, SkRegion::Op op, bool doAA) { |
+ if (fForceConservativeRects) { |
+ return this->op(rrect.getBounds(), size, op, doAA); |
+ } |
+ |
+ SkPath path; |
+ path.addRRect(rrect); |
+ |
+ return this->op(path, size, op, doAA); |
+} |
+ |
bool SkRasterClip::op(const SkPath& path, const SkISize& size, SkRegion::Op op, bool doAA) { |
- // base is used to limit the size (and therefore memory allocation) of the |
- // region that results from scan converting devPath. |
- SkRegion base; |
+ AUTO_RASTERCLIP_VALIDATE(*this); |
if (fForceConservativeRects) { |
SkIRect ir; |
@@ -181,6 +190,10 @@ bool SkRasterClip::op(const SkPath& path, const SkISize& size, SkRegion::Op op, |
return this->op(ir, op); |
} |
+ // base is used to limit the size (and therefore memory allocation) of the |
+ // region that results from scan converting devPath. |
+ SkRegion base; |
+ |
if (SkRegion::kIntersect_Op == op) { |
// since we are intersect, we can do better (tighter) with currRgn's |
// bounds, than just using the device. However, if currRgn is complex, |