Index: src/animator/SkDrawGradient.cpp |
diff --git a/src/animator/SkDrawGradient.cpp b/src/animator/SkDrawGradient.cpp |
index 44086e4269d9b85ab7029a706f0392bbff159da6..1b158f23c108a273c4bbe505b345a70d85af1361 100644 |
--- a/src/animator/SkDrawGradient.cpp |
+++ b/src/animator/SkDrawGradient.cpp |
@@ -14,20 +14,12 @@ |
#include "SkUnitMapper.h" |
static SkScalar SkUnitToScalar(U16CPU x) { |
-#ifdef SK_SCALAR_IS_FLOAT |
return x / 65535.0f; |
-#else |
- return x + (x >> 8); |
-#endif |
} |
static U16CPU SkScalarToUnit(SkScalar x) { |
SkScalar pin = SkScalarPin(x, 0, SK_Scalar1); |
-#ifdef SK_SCALAR_IS_FLOAT |
return (int) (pin * 65535.0f); |
-#else |
- return pin - (pin >= 32768); |
-#endif |
} |
class SkDrawGradientUnitMapper : public SkUnitMapper { |