Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Unified Diff: src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp

Issue 23359002: Use indexed extensions on ES3. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLInterface.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
===================================================================
--- src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp (revision 10811)
+++ src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp (working copy)
@@ -20,7 +20,14 @@
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;
}
GrGLInterface* interface = new GrGLInterface;
@@ -73,6 +80,7 @@
interface->fGetShaderInfoLog = glGetShaderInfoLog;
interface->fGetShaderiv = glGetShaderiv;
interface->fGetString = glGetString;
+ interface->fGetStringi = getStringi; // located above
interface->fGetUniformLocation = glGetUniformLocation;
interface->fLineWidth = glLineWidth;
interface->fLinkProgram = glLinkProgram;
« no previous file with comments | « src/gpu/gl/GrGLInterface.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698