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

Unified Diff: include/core/SkMatrix.h

Issue 117053002: remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats (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: include/core/SkMatrix.h
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h
index d7726f6d4dc7a1d6fcdf47ebac5cc995cc43b926..9bbbc1745b3d64118125a08af39c2be28040b6de 100644
--- a/include/core/SkMatrix.h
+++ b/include/core/SkMatrix.h
@@ -14,15 +14,10 @@
class SkString;
-#ifdef SK_SCALAR_IS_FLOAT
- typedef SkScalar SkPersp;
- #define SkScalarToPersp(x) (x)
- #define SkPerspToScalar(x) (x)
-#else
- typedef SkFract SkPersp;
- #define SkScalarToPersp(x) SkFixedToFract(x)
- #define SkPerspToScalar(x) SkFractToFixed(x)
-#endif
+// TODO: can we remove these 3 (need to check chrome/android)
+typedef SkScalar SkPersp;
+#define SkScalarToPersp(x) (x)
+#define SkPerspToScalar(x) (x)
/** \class SkMatrix
@@ -543,13 +538,7 @@ public:
return 0 == memcmp(fMat, m.fMat, sizeof(fMat));
}
-#ifdef SK_SCALAR_IS_FIXED
- friend bool operator==(const SkMatrix& a, const SkMatrix& b) {
- return a.cheapEqualTo(b);
- }
-#else
friend bool operator==(const SkMatrix& a, const SkMatrix& b);
-#endif
friend bool operator!=(const SkMatrix& a, const SkMatrix& b) {
return !(a == b);
}
« no previous file with comments | « include/core/SkFloatBits.h ('k') | include/core/SkPostConfig.h » ('j') | src/core/SkCanvas.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698