Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Unified Diff: src/core/SkMatrix.cpp

Issue 116183002: remove SkFP.h and replace SkFP with SkScalar stop respecting SK_SOFTWARE_FLOAT, assume its always f… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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]);
« src/core/SkGeometry.cpp ('K') | « src/core/SkGeometry.cpp ('k') | src/core/SkRect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698