aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-06-09 11:47:01 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-09 11:47:01 -0700
commit1831f990c31bad0d84641663c96aa8eebf846ab9 (patch)
treeb6924d3cef071f5c56a37c43cd1de1e45ba7466e /include
parent1aca86490410434020eefd2a27ee61a002871391 (diff)
A bunch of little SkMScalar-as-float build fixes.
Landing this before http://crrev.com/1169813006 so the test changes needed there are clearer. This just lets things build with floats, and is a no-op for doubles. No public API changes we didn't intend to already have... TBR=reed@google.com BUG=skia: Review URL: https://codereview.chromium.org/1173673003
Diffstat (limited to 'include')
-rw-r--r--include/core/SkFloatingPoint.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/core/SkFloatingPoint.h b/include/core/SkFloatingPoint.h
index 9fb343261b..432f53d22a 100644
--- a/include/core/SkFloatingPoint.h
+++ b/include/core/SkFloatingPoint.h
@@ -91,6 +91,8 @@ static inline float sk_float_copysign(float x, float y) {
#define sk_float_log(x) logf(x)
#endif
+#define sk_float_round(x) sk_float_floor((x) + 0.5f)
+
// can't find log2f on android, but maybe that just a tool bug?
#ifdef SK_BUILD_FOR_ANDROID
static inline float sk_float_log2(float x) {