aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-08-04 09:40:02 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-04 09:40:03 -0700
commit846b022f6b469cfde285372f26e0d5c593d122ac (patch)
tree1d2be9e13c2f3eff96be4417bd1c2c380d2a5356 /include
parent1c005e4a38e29d648ecebada25d3a718155043a3 (diff)
Break LCD and Bitmap text dependency on hardcoded atlas values
Diffstat (limited to 'include')
-rw-r--r--include/core/SkFloatingPoint.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/core/SkFloatingPoint.h b/include/core/SkFloatingPoint.h
index 7427562323..f7ee816b12 100644
--- a/include/core/SkFloatingPoint.h
+++ b/include/core/SkFloatingPoint.h
@@ -158,4 +158,13 @@ static inline float sk_float_rsqrt(const float x) {
#endif
}
+// This is the number of significant digits we can print in a string such that when we read that
+// string back we get the floating point number we expect. The minimum value C requires is 6, but
+// most compilers support 9
+#ifdef FLT_DECIMAL_DIG
+#define SK_FLT_DECIMAL_DIG FLT_DECIMAL_DIG
+#else
+#define SK_FLT_DECIMAL_DIG 9
+#endif
+
#endif