| Index: src/core/SkDraw.cpp
|
| diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
|
| index 826c4ba12cea061a7a3b9f1ae5e0431e57f7a753..af4f1ca0474fdecee56f137092f606cf31317133 100644
|
| --- a/src/core/SkDraw.cpp
|
| +++ b/src/core/SkDraw.cpp
|
| @@ -987,12 +987,24 @@ static bool xfermodeSupportsCoverageAsAlpha(SkXfermode* xfer) {
|
| }
|
| }
|
|
|
| -bool SkDrawTreatAAStrokeAsHairline(SkScalar strokeWidth, const SkMatrix& matrix,
|
| - SkScalar* coverage) {
|
| +bool SkDrawTreatAsHairline(const SkPaint& paint, const SkMatrix& matrix,
|
| + SkScalar* coverage) {
|
| SkASSERT(coverage);
|
| - SkASSERT(strokeWidth > 0);
|
| - // We need to try to fake a thick-stroke with a modulated hairline.
|
| + if (SkPaint::kStroke_Style != paint.getStyle()) {
|
| + return false;
|
| + }
|
| + SkScalar strokeWidth = paint.getStrokeWidth();
|
| + if (0 == strokeWidth) {
|
| + *coverage = SK_Scalar1;
|
| + return true;
|
| + }
|
|
|
| + // if we get here, we need to try to fake a thick-stroke with a modulated
|
| + // hairline
|
| +
|
| + if (!paint.isAntiAlias()) {
|
| + return false;
|
| + }
|
| if (matrix.hasPerspective()) {
|
| return false;
|
| }
|
|
|