Index: include/private/SkFixed.h |
diff --git a/include/private/SkFixed.h b/include/private/SkFixed.h |
index b504f2f94cd17a53c446b3525d6cdc8a0b7d4d26..56821d4d8268989045dbb98fce1db0557bf21468 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)) |