Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Unified Diff: src/core/SkRasterClip.cpp

Issue 1657333002: Fix for rounded-rect clips with filters. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: picture GM fix Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkRasterClip.h ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRasterClip.cpp
diff --git a/src/core/SkRasterClip.cpp b/src/core/SkRasterClip.cpp
index ea1a7db429b468be96c59980de30c4eea6daa874..5afe279b9565a27bef9bd0ded096d6730b248faa 100644
--- a/src/core/SkRasterClip.cpp
+++ b/src/core/SkRasterClip.cpp
@@ -161,18 +161,18 @@ 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) {
+bool SkRasterClip::op(const SkRRect& rrect, const SkIRect& bounds, SkRegion::Op op, bool doAA) {
if (fForceConservativeRects) {
- return this->op(rrect.getBounds(), size, op, doAA);
+ return this->op(rrect.getBounds(), bounds, op, doAA);
}
SkPath path;
path.addRRect(rrect);
- return this->op(path, size, op, doAA);
+ return this->op(path, bounds, op, doAA);
}
-bool SkRasterClip::op(const SkPath& path, const SkISize& size, SkRegion::Op op, bool doAA) {
+bool SkRasterClip::op(const SkPath& path, const SkIRect& bounds, SkRegion::Op op, bool doAA) {
AUTO_RASTERCLIP_VALIDATE(*this);
if (fForceConservativeRects) {
@@ -181,7 +181,7 @@ bool SkRasterClip::op(const SkPath& path, const SkISize& size, SkRegion::Op op,
case kDoNothing_MutateResult:
return !this->isEmpty();
case kReplaceClippedAgainstGlobalBounds_MutateResult:
- ir = SkIRect::MakeSize(size);
+ ir = bounds;
break;
case kContinue_MutateResult:
ir = path.getBounds().roundOut();
@@ -210,7 +210,7 @@ bool SkRasterClip::op(const SkPath& path, const SkISize& size, SkRegion::Op op,
return this->op(clip, op);
}
} else {
- base.setRect(0, 0, size.width(), size.height());
+ base.setRect(bounds);
if (SkRegion::kReplace_Op == op) {
return this->setPath(path, base, doAA);
@@ -285,7 +285,7 @@ static bool nearly_integral(SkScalar x) {
return x - SkScalarFloorToScalar(x) < domain;
}
-bool SkRasterClip::op(const SkRect& r, const SkISize& size, SkRegion::Op op, bool doAA) {
+bool SkRasterClip::op(const SkRect& r, const SkIRect& bounds, SkRegion::Op op, bool doAA) {
AUTO_RASTERCLIP_VALIDATE(*this);
if (fForceConservativeRects) {
@@ -294,7 +294,7 @@ bool SkRasterClip::op(const SkRect& r, const SkISize& size, SkRegion::Op op, boo
case kDoNothing_MutateResult:
return !this->isEmpty();
case kReplaceClippedAgainstGlobalBounds_MutateResult:
- ir = SkIRect::MakeSize(size);
+ ir = bounds;
break;
case kContinue_MutateResult:
ir = r.roundOut();
« no previous file with comments | « src/core/SkRasterClip.h ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698