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

Unified Diff: src/core/SkRasterClip.cpp

Issue 742663002: add roundOut that returns its result (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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/SkMaskFilter.cpp ('k') | src/core/SkScalerContext.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 f820c5a0a44154389b5cea7521eaef7b1b3aad42..35197c1ad9bdd3371df62a7d7492ac3dc2fedaad 100644
--- a/src/core/SkRasterClip.cpp
+++ b/src/core/SkRasterClip.cpp
@@ -76,9 +76,6 @@ bool SkRasterClip::setRect(const SkIRect& rect) {
/////////////////////////////////////////////////////////////////////////////////////
bool SkRasterClip::setConservativeRect(const SkRect& r, const SkIRect& clipR, bool isInverse) {
- SkIRect ir;
- r.roundOut(&ir);
-
SkRegion::Op op;
if (isInverse) {
op = SkRegion::kDifference_Op;
@@ -86,7 +83,7 @@ bool SkRasterClip::setConservativeRect(const SkRect& r, const SkIRect& clipR, bo
op = SkRegion::kIntersect_Op;
}
fBW.setRect(clipR);
- fBW.op(ir, op);
+ fBW.op(r.roundOut(), op);
return this->updateCacheAndReturnNonEmpty();
}
@@ -178,7 +175,7 @@ bool SkRasterClip::op(const SkPath& path, const SkISize& size, SkRegion::Op op,
ir = SkIRect::MakeSize(size);
break;
case kContinue_MutateResult:
- path.getBounds().roundOut(&ir);
+ ir = path.getBounds().roundOut();
break;
}
return this->op(ir, op);
@@ -287,7 +284,7 @@ bool SkRasterClip::op(const SkRect& r, const SkISize& size, SkRegion::Op op, boo
ir = SkIRect::MakeSize(size);
break;
case kContinue_MutateResult:
- r.roundOut(&ir);
+ ir = r.roundOut();
break;
}
return this->op(ir, op);
« no previous file with comments | « src/core/SkMaskFilter.cpp ('k') | src/core/SkScalerContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698