diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-23 20:55:46 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-23 20:55:46 +0000 |
commit | 726e621000582e4de7c9ce0f7e9950c3af4e5d9b (patch) | |
tree | 2d801b91afd37d6c6c5e4b06cb8462cd6035e74c /src/gpu/gl/android | |
parent | cbe63fe1a8fc98a657b637b580e04518019ce021 (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.cpp | 10 |
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; |