Generate shaders to cover all possible cases.

With this change, all the vertex and fragment shaders used by the GL
renderer are now generated based on a program description supplied
by the caller. This allows the renderer to generate a large number
of shaders without having to write all the possible combinations by
hand. The generated shaders are stored in a program cache.

Change-Id: If54d286e77ae021c724d42090da476df12a18ebb
diff --git a/libs/hwui/Program.h b/libs/hwui/Program.h
index 824aa05..2cdd905 100644
--- a/libs/hwui/Program.h
+++ b/libs/hwui/Program.h
@@ -53,6 +53,16 @@
     virtual void remove();
 
     /**
+     * Returns the OpenGL name of the specified attribute.
+     */
+    int getAttrib(const char* name);
+
+    /**
+     * Returns the OpenGL name of the specified uniform.
+     */
+    int getUniform(const char* name);
+
+    /**
      * Indicates whether this program is currently in use with
      * the GL context.
      */
@@ -67,10 +77,6 @@
      * @return The OpenGL name of the attribute.
      */
     int addAttrib(const char* name);
-    /**
-     * Returns the OpenGL name of the specified attribute.
-     */
-    int getAttrib(const char* name);
 
     /**
      * Adds a uniform with the specified name.
@@ -78,10 +84,6 @@
      * @return The OpenGL name of the uniform.
      */
     int addUniform(const char* name);
-    /**
-     * Returns the OpenGL name of the specified uniform.
-     */
-    int getUniform(const char* name);
 
 private:
     /**
@@ -145,6 +147,11 @@
     int position;
 
     /**
+     * Name of the texture coordinates attribute.
+     */
+    int texCoords;
+
+    /**
      * Name of the color uniform.
      */
     int color;
@@ -184,11 +191,6 @@
      * Name of the texture sampler uniform.
      */
     int sampler;
-
-    /**
-     * Name of the texture coordinates attribute.
-     */
-    int texCoords;
 };
 
 class DrawTextProgram: public DrawTextureProgram {