Index: include/private/SkFixed.h |
diff --git a/include/private/SkFixed.h b/include/private/SkFixed.h |
index be3bb5d6045d9b24fd98096295b3385be409d5d3..cdde0930073d3136eeb7be1be55186494432e0f0 100644 |
--- a/include/private/SkFixed.h |
+++ b/include/private/SkFixed.h |
@@ -69,9 +69,15 @@ typedef int32_t SkFixed; |
#define SkFixedCeilToInt(x) (((x) + SK_Fixed1 - 1) >> 16) |
#define SkFixedFloorToInt(x) ((x) >> 16) |
-#define SkFixedRoundToFixed(x) (((x) + SK_FixedHalf) & 0xFFFF0000) |
-#define SkFixedCeilToFixed(x) (((x) + SK_Fixed1 - 1) & 0xFFFF0000) |
-#define SkFixedFloorToFixed(x) ((x) & 0xFFFF0000) |
+static inline SkFixed SkFixedRoundToFixed(SkFixed x) { |
+ return (x + SK_FixedHalf) & 0xFFFF0000; |
+} |
+static inline SkFixed SkFixedCeilToFixed(SkFixed x) { |
+ return (x + SK_Fixed1 - 1) & 0xFFFF0000; |
+} |
+static inline SkFixed SkFixedFloorToFixed(SkFixed x) { |
+ return x & 0xFFFF0000; |
+} |
#define SkFixedAbs(x) SkAbs32(x) |
#define SkFixedAve(a, b) (((a) + (b)) >> 1) |