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/Snapshot.cpp b/libs/hwui/Snapshot.cpp
index 4484676..fbc8455 100644
--- a/libs/hwui/Snapshot.cpp
+++ b/libs/hwui/Snapshot.cpp
@@ -178,6 +178,10 @@
     flags |= Snapshot::kFlagClipSet;
 }
 
+bool Snapshot::hasPerspectiveTransform() const {
+    return transform->isPerspective();
+}
+
 const Rect& Snapshot::getLocalClip() {
     mat4 inverse;
     inverse.loadInverse(*transform);