fix compiler error where SK_SCALAR_IS_FLOAT is not defined. (attempt 2)
R=reed@google.com
Review URL: https://codereview.chromium.org/81323002
git-svn-id: http://skia.googlecode.com/svn/trunk@12352 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp
index e9bbfb9..a640519 100644
--- a/src/core/SkMatrix.cpp
+++ b/src/core/SkMatrix.cpp
@@ -48,16 +48,18 @@
#ifdef SK_SCALAR_IS_FLOAT
static const int32_t kScalar1Int = 0x3f800000;
+ static const int32_t kPersp1Int = 0x3f800000;
#else
#define scalarAsInt(x) (x)
static const int32_t kScalar1Int = (1 << 16);
+ static const int32_t kPersp1Int = (1 << 30);
#endif
uint8_t SkMatrix::computePerspectiveTypeMask() const {
#ifdef SK_SCALAR_SLOW_COMPARES
if (SkScalarAs2sCompliment(fMat[kMPersp0]) |
SkScalarAs2sCompliment(fMat[kMPersp1]) |
- (SkScalarAs2sCompliment(fMat[kMPersp2]) - SK_Fract1)) {
+ (SkScalarAs2sCompliment(fMat[kMPersp2]) - kPersp1Int)) {
return SkToU8(kORableMasks);
}
#else
@@ -83,7 +85,7 @@
#ifdef SK_SCALAR_SLOW_COMPARES
if (SkScalarAs2sCompliment(fMat[kMPersp0]) |
SkScalarAs2sCompliment(fMat[kMPersp1]) |
- (SkScalarAs2sCompliment(fMat[kMPersp2]) - SK_Fract1)) {
+ (SkScalarAs2sCompliment(fMat[kMPersp2]) - kPersp1Int)) {
return SkToU8(kORableMasks);
}