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

Unified Diff: third_party/mesa/MesaLib/src/mesa/main/imports.h

Issue 10825442: Fix the compile errors for mesa on Android (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 years, 4 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 | « third_party/mesa/MesaLib/src/mesa/main/debug.c ('k') | third_party/mesa/MesaLib/src/mesa/main/imports.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/mesa/MesaLib/src/mesa/main/imports.h
diff --git a/third_party/mesa/MesaLib/src/mesa/main/imports.h b/third_party/mesa/MesaLib/src/mesa/main/imports.h
index 751f2065011ea986a01d74c0fac300285be1ff49..3136b1e1a9d3caa0c5489462d8fcd2f4ae6c805c 100644
--- a/third_party/mesa/MesaLib/src/mesa/main/imports.h
+++ b/third_party/mesa/MesaLib/src/mesa/main/imports.h
@@ -134,7 +134,13 @@ typedef union { GLfloat f; GLint i; } fi_type;
#define exp2f(f) ((float) exp2(f))
#define floorf(f) ((float) floor(f))
#define logf(f) ((float) log(f))
+
+#if defined(ANDROID)
+#define log2f(f) (logf(f) * (float) (1.0 / M_LN2))
+#else
#define log2f(f) ((float) log2(f))
+#endif
+
#define powf(x,y) ((float) pow(x,y))
#define sinf(f) ((float) sin(f))
#define sinhf(f) ((float) sinh(f))
« no previous file with comments | « third_party/mesa/MesaLib/src/mesa/main/debug.c ('k') | third_party/mesa/MesaLib/src/mesa/main/imports.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698