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

Unified Diff: ui/gl/gl_bindings_autogen_gl.cc

Issue 940523003: Make gl_bindings_skia_in_process work with OpenGL ES3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix Created 5 years, 10 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
Index: ui/gl/gl_bindings_autogen_gl.cc
diff --git a/ui/gl/gl_bindings_autogen_gl.cc b/ui/gl/gl_bindings_autogen_gl.cc
index f1100e8986f665755fdb0f0544820b9846300a7c..83e329ba34f179999897df5113e91749ad7ddabf 100644
--- a/ui/gl/gl_bindings_autogen_gl.cc
+++ b/ui/gl/gl_bindings_autogen_gl.cc
@@ -232,6 +232,7 @@ void DriverGL::InitializeStaticBindings() {
GetGLProcAddress("glGetShaderSource"));
fn.glGetStringFn =
reinterpret_cast<glGetStringProc>(GetGLProcAddress("glGetString"));
+ fn.glGetStringiFn = 0;
fn.glGetSyncivFn = 0;
fn.glGetTexLevelParameterfvFn = 0;
fn.glGetTexLevelParameterivFn = 0;
@@ -1387,6 +1388,13 @@ void DriverGL::InitializeDynamicBindings(GLContext* context) {
DCHECK(fn.glGetShaderPrecisionFormatFn);
}
+ debug_fn.glGetStringiFn = 0;
+ if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u)) {
+ fn.glGetStringiFn =
+ reinterpret_cast<glGetStringiProc>(GetGLProcAddress("glGetStringi"));
+ DCHECK(fn.glGetStringiFn);
+ }
+
debug_fn.glGetSyncivFn = 0;
if (ver->IsAtLeastGL(3u, 2u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_sync) {
@@ -3391,6 +3399,16 @@ static const GLubyte* GL_BINDING_CALL Debug_glGetString(GLenum name) {
return result;
}
+static const GLubyte* GL_BINDING_CALL
+Debug_glGetStringi(GLenum name, GLuint index) {
+ GL_SERVICE_LOG("glGetStringi"
+ << "(" << GLEnums::GetStringEnum(name) << ", " << index
+ << ")");
+ const GLubyte* result = g_driver_gl.debug_fn.glGetStringiFn(name, index);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
static void GL_BINDING_CALL Debug_glGetSynciv(GLsync sync,
GLenum pname,
GLsizei bufSize,
@@ -5309,6 +5327,10 @@ void DriverGL::InitializeDebugBindings() {
debug_fn.glGetStringFn = fn.glGetStringFn;
fn.glGetStringFn = Debug_glGetString;
}
+ if (!debug_fn.glGetStringiFn) {
+ debug_fn.glGetStringiFn = fn.glGetStringiFn;
+ fn.glGetStringiFn = Debug_glGetStringi;
+ }
if (!debug_fn.glGetSyncivFn) {
debug_fn.glGetSyncivFn = fn.glGetSyncivFn;
fn.glGetSyncivFn = Debug_glGetSynciv;
@@ -6740,6 +6762,10 @@ const GLubyte* GLApiBase::glGetStringFn(GLenum name) {
return driver_->fn.glGetStringFn(name);
}
+const GLubyte* GLApiBase::glGetStringiFn(GLenum name, GLuint index) {
+ return driver_->fn.glGetStringiFn(name, index);
+}
+
void GLApiBase::glGetSyncivFn(GLsync sync,
GLenum pname,
GLsizei bufSize,
@@ -8559,6 +8585,11 @@ const GLubyte* TraceGLApi::glGetStringFn(GLenum name) {
return gl_api_->glGetStringFn(name);
}
+const GLubyte* TraceGLApi::glGetStringiFn(GLenum name, GLuint index) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetStringi")
+ return gl_api_->glGetStringiFn(name, index);
+}
+
void TraceGLApi::glGetSyncivFn(GLsync sync,
GLenum pname,
GLsizei bufSize,
@@ -10676,6 +10707,12 @@ const GLubyte* NoContextGLApi::glGetStringFn(GLenum name) {
return NULL;
}
+const GLubyte* NoContextGLApi::glGetStringiFn(GLenum name, GLuint index) {
+ NOTREACHED() << "Trying to call glGetStringi() without current GL context";
+ LOG(ERROR) << "Trying to call glGetStringi() without current GL context";
+ return NULL;
+}
+
void NoContextGLApi::glGetSyncivFn(GLsync sync,
GLenum pname,
GLsizei bufSize,

Powered by Google App Engine
This is Rietveld 408576698