Index: src/core/SkDraw.cpp |
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp |
index e7bacab8ac7228b27ad8bfcdb68f0df3854f28e4..efc43d2e8080df0a7395ddb52b1c46400527c25e 100644 |
--- a/src/core/SkDraw.cpp |
+++ b/src/core/SkDraw.cpp |
@@ -1006,7 +1006,10 @@ SkScalar SkDraw::ComputeResScaleForStroking(const SkMatrix& matrix) { |
SkScalar sx = SkPoint::Length(matrix[SkMatrix::kMScaleX], matrix[SkMatrix::kMSkewY]); |
SkScalar sy = SkPoint::Length(matrix[SkMatrix::kMSkewX], matrix[SkMatrix::kMScaleY]); |
if (SkScalarsAreFinite(sx, sy)) { |
- return SkTMax(sx, sy); |
+ SkScalar scale = SkTMax(sx, sy); |
+ if (scale > 0) { |
+ return scale; |
+ } |
} |
} |
return 1; |