Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: include/private/SkFixed.h

Issue 1841123002: Reverse dependency between SkScalar.h and SkFixed.h (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkWriteBuffer.h ('k') | include/utils/SkRandom.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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))
« no previous file with comments | « include/core/SkWriteBuffer.h ('k') | include/utils/SkRandom.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698