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

Unified Diff: src/core/SkMatrix.cpp

Issue 113193004: remove SkScalarCompare type and header (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
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMatrix.cpp
diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp
index 474f272255d284a218e13ee368d53d699c5f281a..d9c2677a57782e072eb6f00ca4c57efb514dc4d6 100644
--- a/src/core/SkMatrix.cpp
+++ b/src/core/SkMatrix.cpp
@@ -9,7 +9,6 @@
#include "Sk64.h"
#include "SkFloatBits.h"
#include "SkOnce.h"
-#include "SkScalarCompare.h"
#include "SkString.h"
#ifdef SK_SCALAR_IS_FLOAT
@@ -251,7 +250,7 @@ bool SkMatrix::preservesRightAngles(SkScalar tol) const {
///////////////////////////////////////////////////////////////////////////////
void SkMatrix::setTranslate(SkScalar dx, SkScalar dy) {
- if (SkScalarToCompareType(dx) || SkScalarToCompareType(dy)) {
+ if (dx || dy) {
fMat[kMTransX] = dx;
fMat[kMTransY] = dy;
@@ -273,7 +272,7 @@ bool SkMatrix::preTranslate(SkScalar dx, SkScalar dy) {
return this->preConcat(m);
}
- if (SkScalarToCompareType(dx) || SkScalarToCompareType(dy)) {
+ if (dx || dy) {
fMat[kMTransX] += SkScalarMul(fMat[kMScaleX], dx) +
SkScalarMul(fMat[kMSkewX], dy);
fMat[kMTransY] += SkScalarMul(fMat[kMSkewY], dx) +
@@ -291,7 +290,7 @@ bool SkMatrix::postTranslate(SkScalar dx, SkScalar dy) {
return this->postConcat(m);
}
- if (SkScalarToCompareType(dx) || SkScalarToCompareType(dy)) {
+ if (dx || dy) {
fMat[kMTransX] += dx;
fMat[kMTransY] += dy;
this->setTypeMask(kUnknown_Mask | kOnlyPerspectiveValid_Mask);
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698