diff options
author | 2015-07-06 12:15:34 -0700 | |
---|---|---|
committer | 2015-07-06 12:15:34 -0700 | |
commit | 07abbbec4b3104d24b2c6465761d9385b631feca (patch) | |
tree | 618de4ab112acfa5872ccd680f83c2bdac70f447 | |
parent | 27c8eb8ffd7e221693d840c2b9279d53fe6f03d4 (diff) |
Fix up SkMatrix::isFinite call
Review URL: https://codereview.chromium.org/1228473004
-rw-r--r-- | include/core/SkMatrix.h | 2 | ||||
-rw-r--r-- | src/core/SkMatrix.cpp | 10 |
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; |