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