Index: include/core/SkFixed.h |
diff --git a/include/core/SkFixed.h b/include/core/SkFixed.h |
index 8cf7a5679ce28358e994114204aba92162bc4332..f920fea7361b6d08312d3900e197ecdc7bfb95b9 100644 |
--- a/include/core/SkFixed.h |
+++ b/include/core/SkFixed.h |
@@ -78,7 +78,10 @@ typedef int32_t SkFixed; |
#define SkFixedAbs(x) SkAbs32(x) |
#define SkFixedAve(a, b) (((a) + (b)) >> 1) |
-#define SkFixedDiv(numer, denom) SkDivBits(numer, denom, 16) |
+static inline int32_t SkFixedDiv(int32_t numer, int32_t denom) { |
+ int64_t tmp = ((int64_t)numer << 16) / denom; |
+ return (int32_t)tmp; |
+} |
////////////////////////////////////////////////////////////////////////////////////////////////////// |
// Now look for ASM overrides for our portable versions (should consider putting this in its own file) |