Index: src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp |
diff --git a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp |
index f7b3eb89b28af3247d65440c5523816a6102a2d8..bc70d6bca400b99b3d59c339979fc9f7cebef73e 100644 |
--- a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp |
+++ b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp |
@@ -357,7 +357,7 @@ |
// Scale factor 1 / (1 - focalX * focalX) |
SkScalar oneMinusF2 = 1.f - SkScalarMul(*focalX, *focalX); |
- SkScalar s = SkScalarInvert(oneMinusF2); |
+ SkScalar s = SkScalarDiv(1.f, oneMinusF2); |
if (s >= 0.f) { |
@@ -1115,7 +1115,8 @@ |
: INHERITED(ctx, shader, matrix, tm), fInfo(info) { |
this->initClassID<CircleOutside2PtConicalEffect>(); |
if (shader.getStartRadius() != shader.getEndRadius()) { |
- fTLimit = shader.getStartRadius() / (shader.getStartRadius() - shader.getEndRadius()); |
+ fTLimit = SkScalarDiv(shader.getStartRadius(), |
+ (shader.getStartRadius() - shader.getEndRadius())); |
} else { |
fTLimit = SK_ScalarMin; |
} |