Add support to GrGLInterface for vertex array objects
Committed: https://code.google.com/p/skia/source/detail?r=7919
Review URL: https://codereview.chromium.org/12379025

git-svn-id: http://skia.googlecode.com/svn/trunk@7924 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index 6fcd6ab..ea9c29e 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -349,5 +349,25 @@
         }
     }
 
+    if (kDesktop_GrGLBinding == binding) {
+        if (glVer >= GR_GL_VER(3, 0) || extensions.has("GL_ARB_vertex_array_object")) {
+            if (NULL == fBindVertexArray ||
+                NULL == fDeleteVertexArrays ||
+                NULL == fGenVertexArrays) {
+                return false;
+            }
+        }
+    } else {
+#if 0 // Remove this #if once Chromium interfaces set these pointers
+        if (extensions.has("GL_OES_vertex_array_object")) {
+            if (NULL == fBindVertexArray ||
+                NULL == fDeleteVertexArrays ||
+                NULL == fGenVertexArrays) {
+                return false;
+            }
+        }
+#endif
+    }
+
     return true;
 }