Remove the compile-time selection of the GL implementation based on the
GR_SUPPORT_GLDESKTOP family of macros.  

Support for the platform is configured dynamically, by querying the
fBindingsExported member of active GrGLInterface instance.

Review: http://codereview.appspot.com/4298048/ 



git-svn-id: http://skia.googlecode.com/svn/trunk@960 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrGLTexture.cpp b/gpu/src/GrGLTexture.cpp
index a57871b..3970e85 100644
--- a/gpu/src/GrGLTexture.cpp
+++ b/gpu/src/GrGLTexture.cpp
@@ -71,14 +71,24 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 
-const GrGLenum GrGLTexture::gWrapMode2GLWrap[] = {
-    GR_GL_CLAMP_TO_EDGE,
-    GR_GL_REPEAT,
-#if GR_SUPPORT_GLES1 && !GR_SUPPORT_GLES2
-    GR_GL_REPEAT            // GL_MIRRORED_REPEAT not supported :(
-#else 
-    GR_GL_MIRRORED_REPEAT
-#endif
+const GrGLenum* GrGLTexture::WrapMode2GLWrap() {
+    static const GrGLenum mirrorRepeatModes[] = {
+        GR_GL_CLAMP_TO_EDGE,
+        GR_GL_REPEAT,
+        GR_GL_MIRRORED_REPEAT
+    };
+
+    static const GrGLenum repeatModes[] = {
+        GR_GL_CLAMP_TO_EDGE,
+        GR_GL_REPEAT,
+        GR_GL_REPEAT
+    };
+
+    if (GR_GL_SUPPORT_ES1 && !GR_GL_SUPPORT_ES2) {
+        return repeatModes;  // GL_MIRRORED_REPEAT not supported.
+    } else {
+        return mirrorRepeatModes;
+    }
 };