Index: src/core/SkPaint.cpp |
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp |
index d28168a58e9ea3c8fdbc248eeaa350e875031355..bc070e4f5e081977c1243dec81d47f346ac66dd6 100644 |
--- a/src/core/SkPaint.cpp |
+++ b/src/core/SkPaint.cpp |
@@ -2025,22 +2025,9 @@ const SkRect& SkPaint::doComputeFastBounds(const SkRect& origSrc, |
src = &tmpSrc; |
} |
- if (kFill_Style != style) { |
bsalomon
2016/04/28 20:39:01
Just noticed this uses the passed in style var rat
bsalomon
2016/04/28 20:49:29
Ok, fixed that.
|
- // since we're stroked, outset the rect by the radius (and join type) |
- SkScalar radius = SkScalarHalf(this->getStrokeWidth()); |
- if (0 == radius) { // hairline |
- radius = SK_Scalar1; |
- } else if (this->getStrokeJoin() == SkPaint::kMiter_Join) { |
- SkScalar scale = this->getStrokeMiter(); |
- if (scale > SK_Scalar1) { |
- radius = SkScalarMul(radius, scale); |
- } |
- } |
- storage->set(src->fLeft - radius, src->fTop - radius, |
- src->fRight + radius, src->fBottom + radius); |
- } else { |
- *storage = *src; |
- } |
+ SkScalar radius = SkStrokeRec::GetInflationBounds(*this); |
+ storage->set(src->fLeft - radius, src->fTop - radius, |
+ src->fRight + radius, src->fBottom + radius); |
if (this->getMaskFilter()) { |
this->getMaskFilter()->computeFastBounds(*storage, storage); |