diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-31 16:50:38 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-31 16:50:38 +0000 |
commit | 683c3c76cfd2cc71621e570889a16548f8cc88c6 (patch) | |
tree | 32be84fe748fd030bbfba37b0d69bc68d917de6b /src | |
parent | 4177ef4b229b5fb67f355569654981bb4bf8eb9c (diff) |
Shortcut inverting the identity matrix.
Review URL: https://codereview.appspot.com/6775087/
git-svn-id: http://skia.googlecode.com/svn/trunk@6218 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkMatrix.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp index 4cd27e42ee..8dee0cb229 100644 --- a/src/core/SkMatrix.cpp +++ b/src/core/SkMatrix.cpp @@ -848,7 +848,8 @@ bool SkMatrix::asAffine(SkScalar affine[6]) const { return true; } -bool SkMatrix::invert(SkMatrix* inv) const { +bool SkMatrix::invertNonIdentity(SkMatrix* inv) const { + SkASSERT(!this->isIdentity()); int isPersp = this->hasPerspective(); int shift; SkDetScalar scale = sk_inv_determinant(fMat, isPersp, &shift); |