Fix a couple of rendering issues
Bug #7253839
1. Make sure we don't make GL calls while recording display lists
2. Disable an early and trivial clip optimization in font renderer
when a perspective transformation is used on the Canvas
Change-Id: I3f1052164239329346854f72d0a0d401fbfecf06
diff --git a/libs/hwui/Matrix.cpp b/libs/hwui/Matrix.cpp
index 87add17..a924362 100644
--- a/libs/hwui/Matrix.cpp
+++ b/libs/hwui/Matrix.cpp
@@ -73,6 +73,11 @@
return mIsIdentity;
}
+bool Matrix4::isPerspective() const {
+ return data[kPerspective0] != 0.0f || data[kPerspective1] != 0.0f ||
+ data[kPerspective2] != 1.0f;
+}
+
void Matrix4::load(const float* v) {
memcpy(data, v, sizeof(data));
// TODO: Do something smarter here