Chromium Code Reviews| Index: src/gpu/SkGpuDevice.cpp |
| =================================================================== |
| --- src/gpu/SkGpuDevice.cpp (revision 11177) |
| +++ src/gpu/SkGpuDevice.cpp (working copy) |
| @@ -636,11 +636,11 @@ |
| 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 && |
|
bsalomon
2013/09/17 14:43:49
Can the logic about using a path b/c of stroking b
yunchao
2013/09/22 08:36:37
GrContext::drawRect will not fallback to drawPath.
|
| - 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; |
| @@ -678,7 +678,11 @@ |
| if (!skPaint2GrPaintShader(this, paint, true, &grPaint)) { |
| return; |
| } |
| - fContext->drawRect(grPaint, rect, doStroke ? width : -1); |
| + bool miterStroke = true; |
| + if (paint.getStrokeJoin() != SkPaint::kMiter_Join) { |
| + miterStroke = false; |
| + } |
| + fContext->drawRect(grPaint, rect, doStroke ? width : -1, NULL, miterStroke); |
| } |
| /////////////////////////////////////////////////////////////////////////////// |