Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp

Issue 1138263002: Revert of stop calling SkScalarDiv (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkPerlinNoiseShader.cpp ('k') | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « src/effects/SkPerlinNoiseShader.cpp ('k') | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698