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

Unified Diff: src/gpu/GrAAHairLinePathRenderer.cpp

Issue 117053002: remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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
Index: src/gpu/GrAAHairLinePathRenderer.cpp
diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp
index 2b5428c47d78077ace0eefeaf236fb4b90f000bd..830f513e6cf854a6a3f78ee53c8da535f526f5c5 100644
--- a/src/gpu/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/GrAAHairLinePathRenderer.cpp
@@ -300,19 +300,10 @@ int num_quad_subdivs(const SkPoint p[3]) {
// = log4(d*d/tol*tol)/2
// = log2(d*d/tol*tol)
-#ifdef SK_SCALAR_IS_FLOAT
// +1 since we're ignoring the mantissa contribution.
int log = get_float_exp(dsqd/(gSubdivTol*gSubdivTol)) + 1;
log = GrMin(GrMax(0, log), kMaxSub);
return log;
-#else
- SkScalar log = SkScalarLog(
- SkScalarDiv(dsqd,
- SkScalarMul(gSubdivTol, gSubdivTol)));
- static const SkScalar conv = SkScalarInvert(SkScalarLog(2));
- log = SkScalarMul(log, conv);
- return GrMin(GrMax(0, SkScalarCeilToInt(log)),kMaxSub);
-#endif
}
}

Powered by Google App Engine
This is Rietveld 408576698