Switching allapps to use Mesh instead of SimpleMesh.

Change-Id: I678525439341d54e6841df3df2d7ab0c67c0b266
diff --git a/res/raw/allapps.rs b/res/raw/allapps.rs
index 1465308..aaf7c10 100644
--- a/res/raw/allapps.rs
+++ b/res/raw/allapps.rs
@@ -305,7 +305,7 @@
                     vpConstants->ImgSize.y = rsAllocationGetDimY(gSelectedIconTexture);
                     vpConstants->Position.y = y - (rsAllocationGetDimY(gSelectedIconTexture)
                                                 - rsAllocationGetDimY(gIconIDs[iconNum])) * 0.5f;
-                    rsgDrawSimpleMesh(gSMCell);
+                    rsgDrawMesh(gSMCell);
                 }
 
                 rsgBindProgramFragment(gPFTexMip);
@@ -313,14 +313,14 @@
                 vpConstants->ImgSize.y = rsAllocationGetDimY(gIconIDs[iconNum]);
                 vpConstants->Position.y = y - 0.2f;
                 rsgBindTexture(gPFTexMip, 0, gIconIDs[iconNum]);
-                rsgDrawSimpleMesh(gSMCell);
+                rsgDrawMesh(gSMCell);
 
                 rsgBindProgramFragment(gPFTexMipAlpha);
                 vpConstants->ImgSize.x = rsAllocationGetDimX(gLabelIDs[iconNum]);
                 vpConstants->ImgSize.y = rsAllocationGetDimY(gLabelIDs[iconNum]);
                 vpConstants->Position.y = y - 64.f - 0.2f;
                 rsgBindTexture(gPFTexMipAlpha, 0, gLabelIDs[iconNum]);
-                rsgDrawSimpleMesh(gSMCell);
+                rsgDrawMesh(gSMCell);
             }
             iconNum++;
         }
diff --git a/res/raw/allapps_bc.bc b/res/raw/allapps_bc.bc
index 59b0afb..e2341bd 100644
--- a/res/raw/allapps_bc.bc
+++ b/res/raw/allapps_bc.bc
Binary files differ
diff --git a/src/com/android/launcher2/AllApps3D.java b/src/com/android/launcher2/AllApps3D.java
index 9ef98fd..c17ad38 100644
--- a/src/com/android/launcher2/AllApps3D.java
+++ b/src/com/android/launcher2/AllApps3D.java
@@ -36,7 +36,7 @@
 import android.renderscript.RenderScript;
 import android.renderscript.RenderScriptGL;
 import android.renderscript.Sampler;
-import android.renderscript.SimpleMesh;
+import android.renderscript.Mesh;
 import android.renderscript.Type;
 import android.util.AttributeSet;
 import android.util.DisplayMetrics;
@@ -945,7 +945,7 @@
         private Resources mRes;
         ScriptC_Allapps mScript;
 
-        private SimpleMesh mMesh;
+        private Mesh mMesh;
         private ProgramVertex.MatrixAllocation mPVA;
 
         private ScriptField_VpConsts mUniformAlloc;
@@ -1018,7 +1018,7 @@
         }
 
         public void initMesh() {
-            SimpleMesh.TriangleMeshBuilder tm = new SimpleMesh.TriangleMeshBuilder(sRS, 2, 0);
+            Mesh.TriangleMeshBuilder tm = new Mesh.TriangleMeshBuilder(sRS, 2, 0);
 
             for (int ct=0; ct < 16; ct++) {
                 float pos = (1.f / (16.f - 1)) * ct;
@@ -1029,7 +1029,7 @@
                 tm.addTriangle(ct, ct+1, ct+2);
                 tm.addTriangle(ct+1, ct+3, ct+2);
             }
-            mMesh = tm.create();
+            mMesh = tm.create(true);
             mScript.set_gSMCell(mMesh);
         }
 
@@ -1112,7 +1112,7 @@
                     "}\n";
             sb.setShader(t);
             sb.addConstant(mUniformAlloc.getType());
-            sb.addInput(mMesh.getVertexType(0).getElement());
+            sb.addInput(mMesh.getVertexAllocation(0).getType().getElement());
             ProgramVertex pvc = sb.create();
             pvc.bindAllocation(mPVA);
             pvc.bindConstants(mUniformAlloc.getAllocation(), 1);
diff --git a/src/com/android/launcher2/ScriptC_Allapps.java b/src/com/android/launcher2/ScriptC_Allapps.java
index aeb1c26..cc1bb49 100644
--- a/src/com/android/launcher2/ScriptC_Allapps.java
+++ b/src/com/android/launcher2/ScriptC_Allapps.java
@@ -170,13 +170,13 @@
     }
 
     private final static int mExportVarIdx_gSMCell = 13;
-    private SimpleMesh mExportVar_gSMCell;
-    public void set_gSMCell(SimpleMesh v) {
+    private Mesh mExportVar_gSMCell;
+    public void set_gSMCell(Mesh v) {
         mExportVar_gSMCell = v;
         setVar(mExportVarIdx_gSMCell, (v == null) ? 0 : v.getID());
     }
 
-    public SimpleMesh get_gSMCell() {
+    public Mesh get_gSMCell() {
         return mExportVar_gSMCell;
     }