An identity matrix should be considered a pure translate matrix
Change-Id: I75e91797e8270f902f67bdd7bb526cccc23adc6b
diff --git a/libs/hwui/Matrix.cpp b/libs/hwui/Matrix.cpp
index 6a5ea51..65e7eae 100644
--- a/libs/hwui/Matrix.cpp
+++ b/libs/hwui/Matrix.cpp
@@ -72,7 +72,7 @@
return fabs(f) <= EPSILON;
}
-uint32_t Matrix4::getType() const {
+uint8_t Matrix4::getType() const {
if (mType & kTypeUnknown) {
mType = kTypeIdentity;
@@ -114,7 +114,7 @@
return mType;
}
-uint32_t Matrix4::getGeometryType() const {
+uint8_t Matrix4::getGeometryType() const {
return getType() & sGeometryMask;
}
@@ -127,7 +127,7 @@
}
bool Matrix4::isPureTranslate() const {
- return getGeometryType() == kTypeTranslate;
+ return getGeometryType() <= kTypeTranslate;
}
bool Matrix4::isSimple() const {