Better support for rotation and perspective matrices.
Change-Id: I56b5ae3321735ba5ee42aafc9bc0eb399b9e75b5
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 @@
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 @@
void dump() const;
private:
+ bool mSimpleMatrix;
+
inline float get(int i, int j) const {
return data[i * 4 + j];
}