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

Unified Diff: include/core/SkScalar.h

Issue 856723003: use log2(scale) to compute mip level (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | « include/core/SkFloatingPoint.h ('k') | src/core/SkMipMap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkScalar.h
diff --git a/include/core/SkScalar.h b/include/core/SkScalar.h
index 94c3ce15c04e20d8e7808be4a3b48caef6a53d47..e8c7a7fb651b1aa7643b14aa322f10e26e605356 100644
--- a/include/core/SkScalar.h
+++ b/include/core/SkScalar.h
@@ -58,6 +58,7 @@ typedef float SkScalar;
#define SkScalarATan2(y, x) (float)sk_float_atan2(y,x)
#define SkScalarExp(x) (float)sk_float_exp(x)
#define SkScalarLog(x) (float)sk_float_log(x)
+#define SkScalarLog2(x) (float)sk_float_log2(x)
#else // SK_SCALAR_IS_DOUBLE
@@ -100,6 +101,7 @@ typedef double SkScalar;
#define SkScalarATan2(y, x) atan2(y,x)
#define SkScalarExp(x) exp(x)
#define SkScalarLog(x) log(x)
+#define SkScalarLog2(x) log2(x)
#endif
« no previous file with comments | « include/core/SkFloatingPoint.h ('k') | src/core/SkMipMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698