Index: src/core/SkMatrix.cpp |
diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp |
index d9c2677a57782e072eb6f00ca4c57efb514dc4d6..fd6290fdd6a2bbc7d01bfa98f0107df00f9232a1 100644 |
--- a/src/core/SkMatrix.cpp |
+++ b/src/core/SkMatrix.cpp |
@@ -53,18 +53,7 @@ enum { |
static const int32_t kPersp1Int = (1 << 30); |
#endif |
-#ifdef SK_SCALAR_SLOW_COMPARES |
- static const int32_t kPersp1Int = 0x3f800000; |
-#endif |
- |
uint8_t SkMatrix::computePerspectiveTypeMask() const { |
-#ifdef SK_SCALAR_SLOW_COMPARES |
- if (SkScalarAs2sCompliment(fMat[kMPersp0]) | |
- SkScalarAs2sCompliment(fMat[kMPersp1]) | |
- (SkScalarAs2sCompliment(fMat[kMPersp2]) - kPersp1Int)) { |
- return SkToU8(kORableMasks); |
- } |
-#else |
// Benchmarking suggests that replacing this set of SkScalarAs2sCompliment |
// is a win, but replacing those below is not. We don't yet understand |
// that result. |
@@ -76,7 +65,6 @@ uint8_t SkMatrix::computePerspectiveTypeMask() const { |
// type mask computation. |
return SkToU8(kORableMasks); |
} |
-#endif |
return SkToU8(kOnlyPerspectiveValid_Mask | kUnknown_Mask); |
} |
@@ -84,18 +72,6 @@ uint8_t SkMatrix::computePerspectiveTypeMask() const { |
uint8_t SkMatrix::computeTypeMask() const { |
unsigned mask = 0; |
-#ifdef SK_SCALAR_SLOW_COMPARES |
- if (SkScalarAs2sCompliment(fMat[kMPersp0]) | |
- SkScalarAs2sCompliment(fMat[kMPersp1]) | |
- (SkScalarAs2sCompliment(fMat[kMPersp2]) - kPersp1Int)) { |
- return SkToU8(kORableMasks); |
- } |
- |
- if (SkScalarAs2sCompliment(fMat[kMTransX]) | |
- SkScalarAs2sCompliment(fMat[kMTransY])) { |
- mask |= kTranslate_Mask; |
- } |
-#else |
if (fMat[kMPersp0] != 0 || fMat[kMPersp1] != 0 || |
fMat[kMPersp2] != kMatrix22Elem) { |
// Once it is determined that that this is a perspective transform, |
@@ -106,7 +82,6 @@ uint8_t SkMatrix::computeTypeMask() const { |
if (fMat[kMTransX] != 0 || fMat[kMTransY] != 0) { |
mask |= kTranslate_Mask; |
} |
-#endif |
int m00 = SkScalarAs2sCompliment(fMat[SkMatrix::kMScaleX]); |
int m01 = SkScalarAs2sCompliment(fMat[SkMatrix::kMSkewX]); |