summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Matrix.h
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-08-12 14:34:44 -0700
committerRomain Guy <romainguy@google.com>2010-08-12 14:34:44 -0700
commitaf28b514964861d81b48902f942f706050936d38 (patch)
treee0e279b9911c216a76f0a840e1bf95e06733406c /libs/hwui/Matrix.h
parent81a81f02d6d1ec7527d62189b6708c1d17f4c5dd (diff)
downloadframeworks_base-af28b514964861d81b48902f942f706050936d38.zip
frameworks_base-af28b514964861d81b48902f942f706050936d38.tar.gz
frameworks_base-af28b514964861d81b48902f942f706050936d38.tar.bz2
Better support for rotation and perspective matrices.
Change-Id: I56b5ae3321735ba5ee42aafc9bc0eb399b9e75b5
Diffstat (limited to 'libs/hwui/Matrix.h')
-rw-r--r--libs/hwui/Matrix.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/hwui/Matrix.h b/libs/hwui/Matrix.h
index b8a4da7..ebc8b29 100644
--- a/libs/hwui/Matrix.h
+++ b/libs/hwui/Matrix.h
@@ -32,6 +32,20 @@ class Matrix4 {
public:
float data[16];
+ enum Entry {
+ kScaleX = 0,
+ kSkewY = 1,
+ kPerspective0 = 3,
+ kSkewX = 4,
+ kScaleY = 5,
+ kPerspective1 = 7,
+ kScaleZ = 10,
+ kTranslateX = 12,
+ kTranslateY = 13,
+ kTranslateZ = 14,
+ kPerspective2 = 15
+ };
+
Matrix4() {
loadIdentity();
}
@@ -101,6 +115,8 @@ public:
void dump() const;
private:
+ bool mSimpleMatrix;
+
inline float get(int i, int j) const {
return data[i * 4 + j];
}