Add optional per-gl-func client callback.
Review URL: http://codereview.appspot.com/4964055/



git-svn-id: http://skia.googlecode.com/svn/trunk@2207 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrGLInterface.cpp b/gpu/src/GrGLInterface.cpp
index ec00f16..9bee806 100644
--- a/gpu/src/GrGLInterface.cpp
+++ b/gpu/src/GrGLInterface.cpp
@@ -13,6 +13,12 @@
 
 #include <stdio.h>
 
+#if GR_GL_PER_GL_FUNC_CALLBACK
+namespace {
+void GrGLDefaultInterfaceCallback(const GrGLInterface*) {}
+}
+#endif
+
 static SkAutoTUnref<const GrGLInterface> gDefaultGLInterface;
 
 void gl_version_from_string(int* major, int* minor,
@@ -26,7 +32,7 @@
 
     int n = sscanf(versionString, "%d.%d", major, minor);
     if (2 == n) {
-      return;
+        return;
     }
 
     char profile[2];
@@ -234,6 +240,11 @@
     fMapBuffer = NULL;
     fUnmapBuffer = NULL;
     fBindFragDataLocationIndexed = NULL;
+
+#if GR_GL_PER_GL_FUNC_CALLBACK
+    fCallback = GrGLDefaultInterfaceCallback;
+    fCallbackData = 0;
+#endif
 }