diff options
-rw-r--r-- | src/utils/SkMatrix44.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/utils/SkMatrix44.cpp b/src/utils/SkMatrix44.cpp index a59c91b60d..f00e399191 100644 --- a/src/utils/SkMatrix44.cpp +++ b/src/utils/SkMatrix44.cpp @@ -84,10 +84,14 @@ void SkMatrix44::asRowMajord(double dst[]) const { /////////////////////////////////////////////////////////////////////////////// -static const SkMatrix44 gIdentity44; - bool SkMatrix44::isIdentity() const { - return *this == gIdentity44; + static const SkMScalar sIdentityMat[4][4] = { + { 1, 0, 0, 0 }, + { 0, 1, 0, 0 }, + { 0, 0, 1, 0 }, + { 0, 0, 0, 1 }, + }; + return !memcmp(fMat, sIdentityMat, sizeof(fMat)); } /////////////////////////////////////////////////////////////////////////////// |