aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private
diff options
context:
space:
mode:
authorGravatar benjaminwagner <benjaminwagner@google.com>2016-04-07 08:49:31 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-07 08:49:31 -0700
commit6c71e0a065c2eb32139682bb1ca1cbbeb02ebcb9 (patch)
tree8ca1b92cf353a1393429b034e95da6ebc3b5eb55 /include/private
parent6f01104b1d86b861b366b3511c8f2567eca4a9f3 (diff)
Reverse dependency between SkScalar.h and SkFixed.h.
The following are unused in Chromium, Android, Mozilla, and Google3: - SkFixedToScalar - SkScalarToFixed The following are additionally unused in Skia: - SkStrAppendFixed - SkWriteBuffer::writeFixed BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1841123002 Review URL: https://codereview.chromium.org/1841123002
Diffstat (limited to 'include/private')
-rw-r--r--include/private/SkFixed.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/private/SkFixed.h b/include/private/SkFixed.h
index b504f2f94c..56821d4d82 100644
--- a/include/private/SkFixed.h
+++ b/include/private/SkFixed.h
@@ -8,6 +8,7 @@
#ifndef SkFixed_DEFINED
#define SkFixed_DEFINED
+#include "SkScalar.h"
#include "SkTypes.h"
/** \file SkFixed.h
@@ -142,6 +143,20 @@ inline SkFixed SkFixedMul_longlong(SkFixed a, SkFixed b) {
///////////////////////////////////////////////////////////////////////////////
+#if SK_SCALAR_IS_FLOAT
+
+#define SkFixedToScalar(x) SkFixedToFloat(x)
+#define SkScalarToFixed(x) SkFloatToFixed(x)
+
+#else // SK_SCALAR_IS_DOUBLE
+
+#define SkFixedToScalar(x) SkFixedToDouble(x)
+#define SkScalarToFixed(x) SkDoubleToFixed(x)
+
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+
typedef int64_t SkFixed3232; // 32.32
#define SkIntToFixed3232(x) (SkLeftShift((SkFixed3232)(x), 32))