aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-07-06 12:15:34 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-06 12:15:34 -0700
commit07abbbec4b3104d24b2c6465761d9385b631feca (patch)
tree618de4ab112acfa5872ccd680f83c2bdac70f447
parent27c8eb8ffd7e221693d840c2b9279d53fe6f03d4 (diff)
Fix up SkMatrix::isFinite call
-rw-r--r--include/core/SkMatrix.h2
-rw-r--r--src/core/SkMatrix.cpp10
2 files changed, 1 insertions, 11 deletions
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h
index 79ee001514..1626750208 100644
--- a/include/core/SkMatrix.h
+++ b/include/core/SkMatrix.h
@@ -725,7 +725,7 @@ private:
/** Are all elements of the matrix finite?
*/
- bool isFinite() const;
+ bool isFinite() const { return SkScalarsAreFinite(fMat, 9); }
static void ComputeInv(SkScalar dst[9], const SkScalar src[9], double invDet, bool isPersp);
diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp
index 4f94013d3c..31ff4b15e3 100644
--- a/src/core/SkMatrix.cpp
+++ b/src/core/SkMatrix.cpp
@@ -769,16 +769,6 @@ static double sk_inv_determinant(const float mat[9], int isPerspective) {
return 1.0 / det;
}
-bool SkMatrix::isFinite() const {
- for (int i = 0; i < 9; ++i) {
- if (!SkScalarIsFinite(fMat[i])) {
- return false;
- }
- }
-
- return true;
-}
-
void SkMatrix::SetAffineIdentity(SkScalar affine[6]) {
affine[kAScaleX] = 1;
affine[kASkewY] = 0;