Chromium Code Reviews| Index: src/core/SkDraw.cpp |
| diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp |
| index 3532efd7e5e5e7d9fd27fd57754fea2610760465..6f885689ba69090f4afec46b0c2fb1bba7cc61f6 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 = paint.getStrokeWidth() / 2; |
|
reed1
2014/09/09 18:24:44
nit: SkScalarHalf(paint.getStrokeWIdth());
|
| + ir.outset(radius, radius); |
| + } |
| } |
| if (fRC->quickReject(ir)) { |
| return; |