aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-25 19:44:07 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-25 19:44:07 +0000
commit4b413c8bb123e42ca4b9c7bfa6bc2167283cb84c (patch)
treedae12c217068df2844c0ce18fb2c62311ae8c5e9 /include/core
parent2a1f4464d150d2dc8c3fe2f39e9fb3503b7f4f54 (diff)
remove SkFloatToScalar macro
BUG= R=reed@google.com, djsollen@google.com Author: caryclark@google.com Review URL: https://codereview.chromium.org/85463005 git-svn-id: http://skia.googlecode.com/svn/trunk@12385 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkDocument.h2
-rw-r--r--include/core/SkScalar.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/include/core/SkDocument.h b/include/core/SkDocument.h
index 83b4e7a3ee..dbf4bc5957 100644
--- a/include/core/SkDocument.h
+++ b/include/core/SkDocument.h
@@ -18,7 +18,7 @@ class SkWStream;
/** SK_ScalarDefaultDPI is 72 DPI.
*/
-#define SK_ScalarDefaultRasterDPI SkFloatToScalar(72.0f)
+#define SK_ScalarDefaultRasterDPI 72.0f
/**
* High-level API for creating a document-based canvas. To use..
diff --git a/include/core/SkScalar.h b/include/core/SkScalar.h
index 2dd7a6283f..cc1cf99ac8 100644
--- a/include/core/SkScalar.h
+++ b/include/core/SkScalar.h
@@ -78,7 +78,9 @@
#define SkScalarToFixed(x) SkFloatToFixed(x)
#define SkScalarToFloat(n) (n)
+#ifndef SK_SCALAR_TO_FLOAT_EXCLUDED
#define SkFloatToScalar(n) (n)
+#endif
#define SkScalarToDouble(n) (double)(n)
#define SkDoubleToScalar(n) (float)(n)
@@ -198,7 +200,9 @@
#define SkFixedToScalar(x) (x)
#define SkScalarToFixed(x) (x)
#define SkScalarToFloat(n) SkFixedToFloat(n)
+#ifndef SK_SCALAR_TO_FLOAT_EXCLUDED
#define SkFloatToScalar(n) SkFloatToFixed(n)
+#endif
#define SkScalarToDouble(n) SkFixedToDouble(n)
#define SkDoubleToScalar(n) SkDoubleToFixed(n)