add SK_IGNORE_FAST_SCALEMATRIX_INVERT guard for new invert code

git-svn-id: http://skia.googlecode.com/svn/trunk@7025 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2013-01-04 18:52:16 +00:00
parent 34cccde630
commit 4a1362a3c9

View File

@ -1,4 +1,3 @@
/*
* Copyright 2006 The Android Open Source Project
*
@ -6,7 +5,6 @@
* found in the LICENSE file.
*/
#include "SkMatrix.h"
#include "Sk64.h"
#include "SkFloatBits.h"
@ -853,6 +851,7 @@ bool SkMatrix::invertNonIdentity(SkMatrix* inv) const {
TypeMask mask = this->getType();
#ifndef SK_IGNORE_FAST_SCALEMATRIX_INVERT
if (0 == (mask & ~(kScale_Mask | kTranslate_Mask))) {
if (inv) {
if (mask & kScale_Mask) {
@ -884,7 +883,8 @@ bool SkMatrix::invertNonIdentity(SkMatrix* inv) const {
}
return true;
}
#endif
int isPersp = mask & kPerspective_Mask;
int shift;
SkDetScalar scale = sk_inv_determinant(fMat, isPersp, &shift);