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

Unified Diff: src/core/SkScan_Hairline.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/SkScan_Antihair.cpp ('k') | src/effects/SkBitmapSource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkScan_Hairline.cpp
diff --git a/src/core/SkScan_Hairline.cpp b/src/core/SkScan_Hairline.cpp
index 1e7e762b5a867a905e88de377226ad4d26e39cb3..7ca54eac33dc6d8adef509588951fa81534a8bc1 100644
--- a/src/core/SkScan_Hairline.cpp
+++ b/src/core/SkScan_Hairline.cpp
@@ -377,14 +377,12 @@ void SkScan::HairLine(const SkPoint& p0, const SkPoint& p1,
} else {
const SkRegion* clipRgn = NULL;
SkRect r;
- SkIRect ir;
r.set(p0.fX, p0.fY, p1.fX, p1.fY);
r.sort();
r.inset(-SK_ScalarHalf, -SK_ScalarHalf);
- r.roundOut(&ir);
SkAAClipBlitterWrapper wrap;
- if (!clip.quickContains(ir)) {
+ if (!clip.quickContains(r.roundOut())) {
wrap.init(clip, blitter);
blitter = wrap.getBlitter();
clipRgn = &wrap.getRgn();
« no previous file with comments | « src/core/SkScan_Antihair.cpp ('k') | src/effects/SkBitmapSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698