Index: src/core/SkDraw.cpp |
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp |
index 3532efd7e5e5e7d9fd27fd57754fea2610760465..4b878ba2b1252e2711205cc1252e47aa84e01395 100644 |
--- a/src/core/SkDraw.cpp |
+++ b/src/core/SkDraw.cpp |
@@ -817,7 +817,12 @@ void SkDraw::drawRect(const SkRect& rect, const SkPaint& paint) const { |
devRect.roundOut(&ir); |
if (paint.getStyle() != SkPaint::kFill_Style) { |
// extra space for hairlines |
- ir.inset(-1, -1); |
+ if (paint.getStrokeWidth() == 0) { |
+ ir.outset(1, 1); |
+ } else { |
+ SkScalar radius = SkScalarHalf(paint.getStrokeWidth()); |
+ ir.outset(radius, radius); |
+ } |
} |
if (fRC->quickReject(ir)) { |
return; |