From 4b413c8bb123e42ca4b9c7bfa6bc2167283cb84c Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Mon, 25 Nov 2013 19:44:07 +0000 Subject: 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 --- include/core/SkDocument.h | 2 +- include/core/SkScalar.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'include/core') 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) -- cgit v1.2.3