aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/android
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-23 20:55:46 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-23 20:55:46 +0000
commit726e621000582e4de7c9ce0f7e9950c3af4e5d9b (patch)
tree2d801b91afd37d6c6c5e4b06cb8462cd6035e74c /src/gpu/gl/android
parentcbe63fe1a8fc98a657b637b580e04518019ce021 (diff)
Use indexed extensions on ES3.
R=jvanverth@google.com Author: bsalomon@google.com Review URL: https://chromiumcodereview.appspot.com/23359002 git-svn-id: http://skia.googlecode.com/svn/trunk@10899 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/gl/android')
-rw-r--r--src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
index 5ad867c4d7..05c93a32a8 100644
--- a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
+++ b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
@@ -21,7 +21,14 @@ const GrGLInterface* GrGLCreateNativeInterface() {
static SkAutoTUnref<GrGLInterface> glInterface;
if (!glInterface.get()) {
GrGLExtensions extensions;
- if (!extensions.init(kES_GrGLBinding, glGetString, NULL, glGetIntegerv)) {
+ GrGLGetStringiProc getStringi;
+#if GL_ES_VERSION_3_0
+ getStringi = glGetStringi;
+#else
+ getStringi = (GrGLGetStringiProc) eglGetProcAddress("glGetStringi");
+#endif
+
+ if (!extensions.init(kES_GrGLBinding, glGetString, getStringi, glGetIntegerv)) {
return NULL;
}
const char* verStr = reinterpret_cast<const char*>(glGetString(GR_GL_VERSION));
@@ -80,6 +87,7 @@ const GrGLInterface* GrGLCreateNativeInterface() {
interface->fGetShaderInfoLog = glGetShaderInfoLog;
interface->fGetShaderiv = glGetShaderiv;
interface->fGetString = glGetString;
+ interface->fGetStringi = getStringi; // located above
interface->fGetUniformLocation = glGetUniformLocation;
interface->fLineWidth = glLineWidth;
interface->fLinkProgram = glLinkProgram;