Rewrite glop texture asserts

bug:19641517

Also switch Glop VertexAttribFlags to use int for group of flags.

Change-Id: Ib7b1934197a62206a55baa6ab484ac59f5bec816
diff --git a/libs/hwui/renderstate/RenderState.cpp b/libs/hwui/renderstate/RenderState.cpp
index ca3a4c2..7b44d6d 100644
--- a/libs/hwui/renderstate/RenderState.cpp
+++ b/libs/hwui/renderstate/RenderState.cpp
@@ -259,7 +259,7 @@
     // indices
     meshState().bindIndicesBufferInternal(indices.bufferObject);
 
-    if (vertices.flags & VertexAttribFlags::kTextureCoord) {
+    if (vertices.attribFlags & VertexAttribFlags::kTextureCoord) {
         const Glop::Fill::TextureData& texture = fill.texture;
         // texture always takes slot 0, shader samplers increment from there
         mCaches->textureState().activateTexture(0);
@@ -283,13 +283,13 @@
         meshState().disableTexCoordsVertexArray();
     }
     int colorLocation = -1;
-    if (vertices.flags & VertexAttribFlags::kColor) {
+    if (vertices.attribFlags & VertexAttribFlags::kColor) {
         colorLocation = fill.program->getAttrib("colors");
         glEnableVertexAttribArray(colorLocation);
         glVertexAttribPointer(colorLocation, 4, GL_FLOAT, GL_FALSE, vertices.stride, vertices.color);
     }
     int alphaLocation = -1;
-    if (vertices.flags & VertexAttribFlags::kAlpha) {
+    if (vertices.attribFlags & VertexAttribFlags::kAlpha) {
         // NOTE: alpha vertex position is computed assuming no VBO
         const void* alphaCoords = ((const GLbyte*) vertices.position) + kVertexAlphaOffset;
         alphaLocation = fill.program->getAttrib("vtxAlpha");
@@ -317,7 +317,7 @@
 
             // rebind pointers without forcing, since initial bind handled above
             meshState().bindPositionVertexPointer(false, vertexData, vertices.stride);
-            if (vertices.flags & VertexAttribFlags::kTextureCoord) {
+            if (vertices.attribFlags & VertexAttribFlags::kTextureCoord) {
                 meshState().bindTexCoordsVertexPointer(false,
                         vertexData + kMeshTextureOffset, vertices.stride);
             }
@@ -335,10 +335,10 @@
     // -----------------------------------
     // ---------- Mesh teardown ----------
     // -----------------------------------
-    if (vertices.flags & VertexAttribFlags::kAlpha) {
+    if (vertices.attribFlags & VertexAttribFlags::kAlpha) {
         glDisableVertexAttribArray(alphaLocation);
     }
-    if (vertices.flags & VertexAttribFlags::kColor) {
+    if (vertices.attribFlags & VertexAttribFlags::kColor) {
         glDisableVertexAttribArray(colorLocation);
     }
 }