Fix tons of bugs and add new text rendering support.

Change-Id: I326c66b10784006f6df2f12d38e120cef94cd0d7
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 5d30b1a..ff00ba6 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -435,6 +435,7 @@
         return;
     }
 
+    glActiveTexture(GL_TEXTURE0);
     const Texture* texture = mTextureCache.get(bitmap);
     if (!texture) return;
     const AutoTexture autoCleanup(texture);
@@ -451,6 +452,7 @@
         return;
     }
 
+    glActiveTexture(GL_TEXTURE0);
     const Texture* texture = mTextureCache.get(bitmap);
     if (!texture) return;
     const AutoTexture autoCleanup(texture);
@@ -466,6 +468,7 @@
         return;
     }
 
+    glActiveTexture(GL_TEXTURE0);
     const Texture* texture = mTextureCache.get(bitmap);
     if (!texture) return;
     const AutoTexture autoCleanup(texture);
@@ -491,6 +494,7 @@
         return;
     }
 
+    glActiveTexture(GL_TEXTURE0);
     const Texture* texture = mTextureCache.get(bitmap);
     if (!texture) return;
     const AutoTexture autoCleanup(texture);