Index: src/gpu/GrPathUtils.cpp |
diff --git a/src/gpu/GrPathUtils.cpp b/src/gpu/GrPathUtils.cpp |
index 2a906664f26c40d92784e2fd8a439c6bdadc9eca..3e2c3bfe6691655ebf4f6b56dea15d9c8e02af4b 100644 |
--- a/src/gpu/GrPathUtils.cpp |
+++ b/src/gpu/GrPathUtils.cpp |
@@ -29,8 +29,7 @@ SkScalar GrPathUtils::scaleToleranceToSrc(SkScalar devTol, |
stretch = SkMaxScalar(stretch, mat.mapRadius(SK_Scalar1)); |
} |
} |
- srcTol = SkScalarDiv(srcTol, stretch); |
- return srcTol; |
+ return srcTol / stretch; |
} |
static const int MAX_POINTS_PER_CURVE = 1 << 10; |
@@ -51,7 +50,7 @@ uint32_t GrPathUtils::quadraticPointCount(const SkPoint points[], |
// subdivide x = log4(d/tol) times. x subdivisions creates 2^(x) |
// points. |
// 2^(log4(x)) = sqrt(x); |
- SkScalar divSqrt = SkScalarSqrt(SkScalarDiv(d, tol)); |
+ SkScalar divSqrt = SkScalarSqrt(d / tol); |
if (((SkScalar)SK_MaxS32) <= divSqrt) { |
return MAX_POINTS_PER_CURVE; |
} else { |
@@ -107,11 +106,11 @@ uint32_t GrPathUtils::cubicPointCount(const SkPoint points[], |
if (d <= tol) { |
return 1; |
} else { |
- SkScalar divSqrt = SkScalarSqrt(SkScalarDiv(d, tol)); |
+ SkScalar divSqrt = SkScalarSqrt(d / tol); |
if (((SkScalar)SK_MaxS32) <= divSqrt) { |
return MAX_POINTS_PER_CURVE; |
} else { |
- int temp = SkScalarCeilToInt(SkScalarSqrt(SkScalarDiv(d, tol))); |
+ int temp = SkScalarCeilToInt(SkScalarSqrt(d / tol)); |
int pow2 = GrNextPow2(temp); |
// Because of NaNs & INFs we can wind up with a degenerate temp |
// such that pow2 comes out negative. Also, our point generator |