Fix up SkMatrix::isFinite call
authorrobertphillips <robertphillips@google.com>
Mon, 6 Jul 2015 19:15:34 +0000 (12:15 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 6 Jul 2015 19:15:34 +0000 (12:15 -0700)
Review URL: https://codereview.chromium.org/1228473004

include/core/SkMatrix.h
src/core/SkMatrix.cpp

index 79ee001..1626750 100644 (file)
@@ -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);
 
index 4f94013..31ff4b1 100644 (file)
@@ -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;