summaryrefslogtreecommitdiff
path: root/core/SkMatrix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/SkMatrix.cpp')
-rw-r--r--core/SkMatrix.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/SkMatrix.cpp b/core/SkMatrix.cpp
index 474f2722..d9c2677a 100644
--- a/core/SkMatrix.cpp
+++ b/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);