Move max vertex attributes value to GL Caps

Review URL: http://codereview.appspot.com/6271043/



git-svn-id: http://skia.googlecode.com/svn/trunk@4123 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index ec535b8..7b44035 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -280,11 +280,6 @@
         fCaps.fShaderDerivativeSupport =
                             this->hasExtension("GL_OES_standard_derivatives");
     }
-
-    GR_GL_GetIntegerv(this->glInterface(),
-                      GR_GL_MAX_VERTEX_ATTRIBS,
-                      &fMaxVertexAttribs);
-
 }
 
 void GrGpuGL::fillInConfigRenderableTable() {
@@ -549,7 +544,7 @@
     int posAttrIdx = GrGLProgram::PositionAttributeIdx();
     GL_CALL(EnableVertexAttribArray(posAttrIdx));
     // Disable all other vertex attributes.
-    for  (int va = 0; va < fMaxVertexAttribs; ++va) {
+    for  (int va = 0; va < this->glCaps().maxVertexAttributes(); ++va) {
         if (va != posAttrIdx) {
             GL_CALL(DisableVertexAttribArray(va));
         }