summaryrefslogtreecommitdiff
path: root/core/SkMatrix.cpp
diff options
context:
space:
mode:
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-16 14:17:40 +0000
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-16 14:17:40 +0000
commitceb7526c2f715f49a47e902a642fea7eb61153ec (patch)
treebda3955a944b3a7f14637e10c1dcf155397adba4 /core/SkMatrix.cpp
parentd792ad3d24c6be82161aa32da107f6c1b953878a (diff)
downloadsrc-ceb7526c2f715f49a47e902a642fea7eb61153ec.tar.gz
remove SkFP.h and replace SkFP with SkScalar stop respecting SK_SOFTWARE_FLOAT, assume its always false stop respecting SK_SCALAR_SLOW_COMPARES, assume its always false
BUG= R=caryclark@google.com Review URL: https://codereview.chromium.org/116183002 git-svn-id: http://skia.googlecode.com/svn/trunk/src@12686 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'core/SkMatrix.cpp')
-rw-r--r--core/SkMatrix.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/core/SkMatrix.cpp b/core/SkMatrix.cpp
index d9c2677a..fd6290fd 100644
--- a/core/SkMatrix.cpp
+++ b/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]);