Skip to content

Commit

Permalink
Set vertex array object function pointers in GL interfaces used by Skia.
Browse files Browse the repository at this point in the history
Review URL: https://codereview.chromium.org/12391072

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186172 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
bsalomon@google.com committed Mar 5, 2013
1 parent e0774ec commit 5fc973f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ui/gl/gl_bindings_skia_in_process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ GLvoid StubGLBindTexture(GLenum target, GLuint texture) {
glBindTexture(target, texture);
}

GLvoid StubGLBindVertexArray(GLuint array) {
glBindVertexArrayOES(array);
}

GLvoid StubGLBlendColor(GLclampf red, GLclampf green, GLclampf blue,
GLclampf alpha) {
glBlendColor(red, green, blue, alpha);
Expand Down Expand Up @@ -160,6 +164,10 @@ GLvoid StubGLDeleteTextures(GLsizei n, const GLuint* textures) {
glDeleteTextures(n, textures);
}

GLvoid StubGLDeleteVertexArrays(GLsizei n, const GLuint* arrays) {
glDeleteVertexArraysOES(n, arrays);
}

GLvoid StubGLDepthMask(GLboolean flag) {
glDepthMask(flag);
}
Expand Down Expand Up @@ -246,6 +254,10 @@ GLvoid StubGLGenTextures(GLsizei n, GLuint* textures) {
glGenTextures(n, textures);
}

GLvoid StubGLGenVertexArrays(GLsizei n, GLuint* arrays) {
glGenVertexArraysOES(n, arrays);
}

GLvoid StubGLGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) {
glGetBufferParameteriv(target, pname, params);
}
Expand Down Expand Up @@ -564,6 +576,7 @@ GrGLInterface* CreateInProcessSkiaGLBinding() {
interface->fBindBuffer = StubGLBindBuffer;
interface->fBindFragDataLocation = StubGLBindFragDataLocation;
interface->fBindTexture = StubGLBindTexture;
interface->fBindVertexArray = StubGLBindVertexArray;
interface->fBlendColor = StubGLBlendColor;
interface->fBlendFunc = StubGLBlendFunc;
interface->fBufferData = StubGLBufferData;
Expand All @@ -582,6 +595,7 @@ GrGLInterface* CreateInProcessSkiaGLBinding() {
interface->fDeleteQueries = StubGLDeleteQueries;
interface->fDeleteShader = StubGLDeleteShader;
interface->fDeleteTextures = StubGLDeleteTextures;
interface->fDeleteVertexArrays = StubGLDeleteVertexArrays;
interface->fDepthMask = StubGLDepthMask;
interface->fDisable = StubGLDisable;
interface->fDisableVertexAttribArray = StubGLDisableVertexAttribArray;
Expand All @@ -598,6 +612,7 @@ GrGLInterface* CreateInProcessSkiaGLBinding() {
interface->fGenBuffers = StubGLGenBuffers;
interface->fGenQueries = StubGLGenQueries;
interface->fGenTextures = StubGLGenTextures;
interface->fGenVertexArrays = StubGLGenVertexArrays;
interface->fGetBufferParameteriv = StubGLGetBufferParameteriv;
interface->fGetError = StubGLGetError;
interface->fGetIntegerv = StubGLGetIntegerv;
Expand Down
3 changes: 3 additions & 0 deletions webkit/gpu/gl_bindings_skia_cmd_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ GrGLInterface* CreateCommandBufferSkiaGLBinding() {
interface->fBindAttribLocation = glBindAttribLocation;
interface->fBindBuffer = glBindBuffer;
interface->fBindTexture = glBindTexture;
interface->fBindVertexArray = glBindVertexArrayOES;
interface->fBlendColor = glBlendColor;
interface->fBlendFunc = glBlendFunc;
interface->fBufferData = glBufferData;
Expand All @@ -40,6 +41,7 @@ GrGLInterface* CreateCommandBufferSkiaGLBinding() {
interface->fDeleteProgram = glDeleteProgram;
interface->fDeleteShader = glDeleteShader;
interface->fDeleteTextures = glDeleteTextures;
interface->fDeleteVertexArrays = glDeleteVertexArraysOES;
interface->fDepthMask = glDepthMask;
interface->fDisable = glDisable;
interface->fDisableVertexAttribArray = glDisableVertexAttribArray;
Expand All @@ -52,6 +54,7 @@ GrGLInterface* CreateCommandBufferSkiaGLBinding() {
interface->fFrontFace = glFrontFace;
interface->fGenBuffers = glGenBuffers;
interface->fGenTextures = glGenTextures;
interface->fGenVertexArrays = glGenVertexArraysOES;
interface->fGetBufferParameteriv = glGetBufferParameteriv;
interface->fGetError = glGetError;
interface->fGetIntegerv = glGetIntegerv;
Expand Down

0 comments on commit 5fc973f

Please sign in to comment.