Index: src/effects/SkCornerPathEffect.cpp |
diff --git a/src/effects/SkCornerPathEffect.cpp b/src/effects/SkCornerPathEffect.cpp |
index 4b81f261fe669416f260f9b50669ec3a87878ffd..79d4c4cbd3a1710d1bea4f3e56a10a5d1328d834 100644 |
--- a/src/effects/SkCornerPathEffect.cpp |
+++ b/src/effects/SkCornerPathEffect.cpp |
@@ -20,12 +20,13 @@ |
SkPoint* step) { |
SkScalar dist = SkPoint::Distance(a, b); |
- *step = b - a; |
+ step->set(b.fX - a.fX, b.fY - a.fY); |
+ |
if (dist <= radius * 2) { |
- *step *= SK_ScalarHalf; |
+ step->scale(SK_ScalarHalf); |
return false; |
} else { |
- *step *= radius / dist; |
+ step->scale(SkScalarDiv(radius, dist)); |
return true; |
} |
} |
@@ -46,7 +47,6 @@ |
bool prevIsValid = true; |
// to avoid warnings |
- step.set(0, 0); |
moveTo.set(0, 0); |
firstStep.set(0, 0); |
lastCorner.set(0, 0); |