| Index: src/gpu/SkGpuDevice.cpp
|
| diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
|
| index 8cf2e4b664320dea8444be7a3d6da899ae21ee17..fb27fc04ae634a648485192c676f2bbbb0efd8da 100644
|
| --- a/src/gpu/SkGpuDevice.cpp
|
| +++ b/src/gpu/SkGpuDevice.cpp
|
| @@ -653,11 +653,11 @@ void SkGpuDevice::drawRect(const SkDraw& draw, const SkRect& rect,
|
| SkScalar width = paint.getStrokeWidth();
|
|
|
| /*
|
| - We have special code for hairline strokes, miter-strokes, and fills.
|
| - Anything else we just call our path code.
|
| + We have special code for hairline strokes, miter-strokes, bevel-stroke
|
| + and fills. Anything else we just call our path code.
|
| */
|
| bool usePath = doStroke && width > 0 &&
|
| - paint.getStrokeJoin() != SkPaint::kMiter_Join;
|
| + paint.getStrokeJoin() == SkPaint::kRound_Join;
|
| // another two reasons we might need to call drawPath...
|
| if (paint.getMaskFilter() || paint.getPathEffect()) {
|
| usePath = true;
|
| @@ -673,12 +673,6 @@ void SkGpuDevice::drawRect(const SkDraw& draw, const SkRect& rect,
|
| }
|
| #endif
|
| }
|
| - // small miter limit means right angles show bevel...
|
| - if (SkPaint::kMiter_Join == paint.getStrokeJoin() &&
|
| - paint.getStrokeMiter() < SK_ScalarSqrt2)
|
| - {
|
| - usePath = true;
|
| - }
|
| // until we can both stroke and fill rectangles
|
| if (paint.getStyle() == SkPaint::kStrokeAndFill_Style) {
|
| usePath = true;
|
| @@ -695,7 +689,13 @@ void SkGpuDevice::drawRect(const SkDraw& draw, const SkRect& rect,
|
| if (!skPaint2GrPaintShader(this, paint, true, &grPaint)) {
|
| return;
|
| }
|
| - fContext->drawRect(grPaint, rect, doStroke ? width : -1);
|
| +
|
| + if (!doStroke) {
|
| + fContext->drawRect(grPaint, rect);
|
| + } else {
|
| + SkStrokeRec stroke(paint);
|
| + fContext->drawRect(grPaint, rect, &stroke);
|
| + }
|
| }
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|