Index: src/core/SkScan_Hairline.cpp |
diff --git a/src/core/SkScan_Hairline.cpp b/src/core/SkScan_Hairline.cpp |
index 9b21c421edf6c8d8dc57f3df7afa63c953085c69..76cd0328f393c7c6d39d419af782e1adbf0aa484 100644 |
--- a/src/core/SkScan_Hairline.cpp |
+++ b/src/core/SkScan_Hairline.cpp |
@@ -147,12 +147,11 @@ void SkScan::HairRect(const SkRect& rect, const SkRasterClip& clip, |
SkBlitter* blitter) { |
SkAAClipBlitterWrapper wrapper; |
SkBlitterClipper clipper; |
- SkIRect r; |
- r.set(SkScalarToFixed(rect.fLeft) >> 16, |
- SkScalarToFixed(rect.fTop) >> 16, |
- (SkScalarToFixed(rect.fRight) >> 16) + 1, |
- (SkScalarToFixed(rect.fBottom) >> 16) + 1); |
+ const SkIRect r = SkIRect::MakeLTRB(SkScalarTruncToInt(rect.fLeft), |
+ SkScalarTruncToInt(rect.fTop), |
+ SkScalarTruncToInt(rect.fRight) + 1, |
+ SkScalarTruncToInt(rect.fBottom) + 1); |
if (clip.quickReject(r)) { |
return; |
@@ -473,11 +472,11 @@ void hair_path(const SkPath& path, const SkRasterClip& rclip, SkBlitter* blitter |
{ |
const int capOut = SkPaint::kButt_Cap == capStyle ? 1 : 2; |
- const SkIRect ibounds = path.getBounds().roundOut().makeOutset(capOut, capOut); |
- if (rclip.quickReject(ibounds)) { |
+ const SkRect bounds = path.getBounds().makeOutset(capOut, capOut); |
+ if (rclip.quickReject(bounds)) { |
return; |
} |
- if (!rclip.quickContains(ibounds)) { |
+ if (!rclip.quickContains(bounds)) { |
if (rclip.isBW()) { |
clip = &rclip.bwRgn(); |
} else { |