summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Matrix.cpp
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2013-06-20 17:52:07 -0700
committerRomain Guy <romainguy@google.com>2013-06-20 17:52:07 -0700
commitf6bed4f12a2c975678fc0bdea15054ab169aafb5 (patch)
treefbfc0e2154782601063f6b4a9e1dcd7e033b8fc5 /libs/hwui/Matrix.cpp
parent9e6f3ac109b5cd7736122d1bdf83ed38b9d739c6 (diff)
downloadframeworks_base-f6bed4f12a2c975678fc0bdea15054ab169aafb5.zip
frameworks_base-f6bed4f12a2c975678fc0bdea15054ab169aafb5.tar.gz
frameworks_base-f6bed4f12a2c975678fc0bdea15054ab169aafb5.tar.bz2
An identity matrix should be considered a pure translate matrix
Change-Id: I75e91797e8270f902f67bdd7bb526cccc23adc6b
Diffstat (limited to 'libs/hwui/Matrix.cpp')
-rw-r--r--libs/hwui/Matrix.cpp6
1 files changed, 3 insertions, 3 deletions
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 @@ static bool isZero(float f) {
return fabs(f) <= EPSILON;
}
-uint32_t Matrix4::getType() const {
+uint8_t Matrix4::getType() const {
if (mType & kTypeUnknown) {
mType = kTypeIdentity;
@@ -114,7 +114,7 @@ uint32_t Matrix4::getType() const {
return mType;
}
-uint32_t Matrix4::getGeometryType() const {
+uint8_t Matrix4::getGeometryType() const {
return getType() & sGeometryMask;
}
@@ -127,7 +127,7 @@ bool Matrix4::changesBounds() const {
}
bool Matrix4::isPureTranslate() const {
- return getGeometryType() == kTypeTranslate;
+ return getGeometryType() <= kTypeTranslate;
}
bool Matrix4::isSimple() const {