summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc4
-rw-r--r--content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h3
-rw-r--r--ui/gfx/gl/gl_bindings_skia_in_process.cc262
-rw-r--r--ui/gfx/gl/gl_bindings_skia_in_process.h4
-rw-r--r--webkit/glue/gl_bindings_skia_cmd_buffer.cc202
-rw-r--r--webkit/glue/gl_bindings_skia_cmd_buffer.h4
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc4
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h3
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_impl.cc4
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_impl.h3
10 files changed, 244 insertions, 249 deletions
diff --git a/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc b/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc
index e894c12..72d1a57 100644
--- a/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc
+++ b/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc
@@ -1058,8 +1058,8 @@ void WebGraphicsContext3DCommandBufferImpl::
}
#if WEBKIT_USING_SKIA
-GrGLInterface* WebGraphicsContext3DCommandBufferImpl::grGLInterface() {
- return webkit_glue::GetCommandBufferSkiaGLBinding();
+GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() {
+ return webkit_glue::CreateCommandBufferSkiaGLBinding();
}
#endif
diff --git a/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h b/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h
index 537cf17..e2afb4f 100644
--- a/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h
+++ b/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h
@@ -437,8 +437,9 @@ class WebGraphicsContext3DCommandBufferImpl
WebGraphicsContext3D::
WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* callback);
+ protected:
#if WEBKIT_USING_SKIA
- virtual GrGLInterface* grGLInterface();
+ virtual GrGLInterface* onCreateGrGLInterface();
#endif
private:
diff --git a/ui/gfx/gl/gl_bindings_skia_in_process.cc b/ui/gfx/gl/gl_bindings_skia_in_process.cc
index cd31cf5..aa92603 100644
--- a/ui/gfx/gl/gl_bindings_skia_in_process.cc
+++ b/ui/gfx/gl/gl_bindings_skia_in_process.cc
@@ -469,140 +469,136 @@ GLvoid StubGLViewport(GLint x, GLint y, GLsizei width, GLsizei height) {
namespace gfx {
-GrGLInterface* GetInProcessSkiaGLBinding() {
- static SkAutoTUnref<GrGLInterface> host_gl_interface;
- if (NULL == host_gl_interface.get()) {
- GrGLBinding binding;
- switch (gfx::GetGLImplementation()) {
- case gfx::kGLImplementationNone:
- NOTREACHED();
- return NULL;
- case gfx::kGLImplementationDesktopGL:
- binding = kDesktop_GrGLBinding;
- break;
- case gfx::kGLImplementationOSMesaGL:
- binding = kDesktop_GrGLBinding;
- break;
- case gfx::kGLImplementationEGLGLES2:
- binding = kES2_GrGLBinding;
- break;
- case gfx::kGLImplementationMockGL:
- NOTREACHED();
- return NULL;
- default:
- NOTREACHED();
- return NULL;
- }
-
- GrGLInterface* interface = new GrGLInterface;
- host_gl_interface.reset(interface);
-
- interface->fBindingsExported = binding;
- interface->fActiveTexture = StubGLActiveTexture;
- interface->fAttachShader = StubGLAttachShader;
- interface->fBindAttribLocation = StubGLBindAttribLocation;
- interface->fBindBuffer = StubGLBindBuffer;
- interface->fBindTexture = StubGLBindTexture;
- interface->fBlendColor = StubGLBlendColor;
- interface->fBlendFunc = StubGLBlendFunc;
- interface->fBufferData = StubGLBufferData;
- interface->fBufferSubData = StubGLBufferSubData;
- interface->fClear = StubGLClear;
- interface->fClearColor = StubGLClearColor;
- interface->fClearStencil = StubGLClearStencil;
- interface->fColorMask = StubGLColorMask;
- interface->fCompileShader = StubGLCompileShader;
- interface->fCompressedTexImage2D = StubGLCompressedTexImage2D;
- interface->fCreateProgram = StubGLCreateProgram;
- interface->fCreateShader = StubGLCreateShader;
- interface->fCullFace = StubGLCullFace;
- interface->fDeleteBuffers = StubGLDeleteBuffers;
- interface->fDeleteProgram = StubGLDeleteProgram;
- interface->fDeleteShader = StubGLDeleteShader;
- interface->fDeleteTextures = StubGLDeleteTextures;
- interface->fDepthMask = StubGLDepthMask;
- interface->fDisable = StubGLDisable;
- interface->fDisableVertexAttribArray = StubGLDisableVertexAttribArray;
- interface->fDrawArrays = StubGLDrawArrays;
- interface->fDrawBuffer = StubGLDrawBuffer;
- interface->fDrawBuffers = StubGLDrawBuffers;
- interface->fDrawElements = StubGLDrawElements;
- interface->fEnable = StubGLEnable;
- interface->fEnableVertexAttribArray = StubGLEnableVertexAttribArray;
- interface->fFrontFace = StubGLFrontFace;
- interface->fGenBuffers = StubGLGenBuffers;
- interface->fGenTextures = StubGLGenTextures;
- interface->fGetBufferParameteriv = StubGLGetBufferParameteriv;
- interface->fGetError = StubGLGetError;
- interface->fGetIntegerv = StubGLGetIntegerv;
- interface->fGetProgramInfoLog = StubGLGetProgramInfoLog;
- interface->fGetProgramiv = StubGLGetProgramiv;
- interface->fGetShaderInfoLog = StubGLGetShaderInfoLog;
- interface->fGetShaderiv = StubGLGetShaderiv;
- interface->fGetString = StubGLGetString;
- interface->fGetTexLevelParameteriv = StubGLGetTexLevelParameteriv;
- interface->fGetUniformLocation = StubGLGetUniformLocation;
- interface->fLineWidth = StubGLLineWidth;
- interface->fLinkProgram = StubGLLinkProgram;
- interface->fPixelStorei = StubGLPixelStorei;
- interface->fReadBuffer = StubGLReadBuffer;
- interface->fReadPixels = StubGLReadPixels;
- interface->fScissor = StubGLScissor;
- interface->fShaderSource = StubGLShaderSource;
- interface->fStencilFunc = StubGLStencilFunc;
- interface->fStencilFuncSeparate = StubGLStencilFuncSeparate;
- interface->fStencilMask = StubGLStencilMask;
- interface->fStencilMaskSeparate = StubGLStencilMaskSeparate;
- interface->fStencilOp = StubGLStencilOp;
- interface->fStencilOpSeparate = StubGLStencilOpSeparate;
- interface->fTexImage2D = StubGLTexImage2D;
- interface->fTexParameteri = StubGLTexParameteri;
- interface->fTexSubImage2D = StubGLTexSubImage2D;
- interface->fUniform1f = StubGLUniform1f;
- interface->fUniform1i = StubGLUniform1i;
- interface->fUniform1fv = StubGLUniform1fv;
- interface->fUniform1iv = StubGLUniform1iv;
- interface->fUniform2f = StubGLUniform2f;
- interface->fUniform2i = StubGLUniform2i;
- interface->fUniform2fv = StubGLUniform2fv;
- interface->fUniform2iv = StubGLUniform2iv;
- interface->fUniform3f = StubGLUniform3f;
- interface->fUniform3i = StubGLUniform3i;
- interface->fUniform3fv = StubGLUniform3fv;
- interface->fUniform3iv = StubGLUniform3iv;
- interface->fUniform4f = StubGLUniform4f;
- interface->fUniform4i = StubGLUniform4i;
- interface->fUniform4fv = StubGLUniform4fv;
- interface->fUniform4iv = StubGLUniform4iv;
- interface->fUniformMatrix2fv = StubGLUniformMatrix2fv;
- interface->fUniformMatrix3fv = StubGLUniformMatrix3fv;
- interface->fUniformMatrix4fv = StubGLUniformMatrix4fv;
- interface->fUseProgram = StubGLUseProgram;
- interface->fVertexAttrib4fv = StubGLVertexAttrib4fv;
- interface->fVertexAttribPointer = StubGLVertexAttribPointer;
- interface->fViewport = StubGLViewport;
- interface->fBindFramebuffer = StubGLBindFramebuffer;
- interface->fBindRenderbuffer = StubGLBindRenderbuffer;
- interface->fCheckFramebufferStatus = StubGLCheckFramebufferStatus;
- interface->fDeleteFramebuffers = StubGLDeleteFramebuffers;
- interface->fDeleteRenderbuffers = StubGLDeleteRenderbuffers;
- interface->fFramebufferRenderbuffer = StubGLFramebufferRenderbuffer;
- interface->fFramebufferTexture2D = StubGLFramebufferTexture2D;
- interface->fGenFramebuffers = StubGLGenFramebuffers;
- interface->fGenRenderbuffers = StubGLGenRenderbuffers;
- interface->fGetFramebufferAttachmentParameteriv =
- StubGLGetFramebufferAttachmentParameteriv;
- interface->fGetRenderbufferParameteriv = StubGLGetRenderbufferParameteriv;
- interface->fRenderbufferStorage = StubGLRenderbufferStorage;
- interface->fRenderbufferStorageMultisample =
- StubGLRenderbufferStorageMultisample;
- interface->fBlitFramebuffer = StubGLBlitFramebuffer;
- interface->fMapBuffer = StubGLMapBuffer;
- interface->fUnmapBuffer = StubGLUnmapBuffer;
- interface->fBindFragDataLocationIndexed =
- StubBindFragDataLocationIndexedARB;
+GrGLInterface* CreateInProcessSkiaGLBinding() {
+ GrGLBinding binding;
+ switch (gfx::GetGLImplementation()) {
+ case gfx::kGLImplementationNone:
+ NOTREACHED();
+ return NULL;
+ case gfx::kGLImplementationDesktopGL:
+ binding = kDesktop_GrGLBinding;
+ break;
+ case gfx::kGLImplementationOSMesaGL:
+ binding = kDesktop_GrGLBinding;
+ break;
+ case gfx::kGLImplementationEGLGLES2:
+ binding = kES2_GrGLBinding;
+ break;
+ case gfx::kGLImplementationMockGL:
+ NOTREACHED();
+ return NULL;
+ default:
+ NOTREACHED();
+ return NULL;
}
- return host_gl_interface.get();
+
+ GrGLInterface* interface = new GrGLInterface;
+
+ interface->fBindingsExported = binding;
+ interface->fActiveTexture = StubGLActiveTexture;
+ interface->fAttachShader = StubGLAttachShader;
+ interface->fBindAttribLocation = StubGLBindAttribLocation;
+ interface->fBindBuffer = StubGLBindBuffer;
+ interface->fBindTexture = StubGLBindTexture;
+ interface->fBlendColor = StubGLBlendColor;
+ interface->fBlendFunc = StubGLBlendFunc;
+ interface->fBufferData = StubGLBufferData;
+ interface->fBufferSubData = StubGLBufferSubData;
+ interface->fClear = StubGLClear;
+ interface->fClearColor = StubGLClearColor;
+ interface->fClearStencil = StubGLClearStencil;
+ interface->fColorMask = StubGLColorMask;
+ interface->fCompileShader = StubGLCompileShader;
+ interface->fCompressedTexImage2D = StubGLCompressedTexImage2D;
+ interface->fCreateProgram = StubGLCreateProgram;
+ interface->fCreateShader = StubGLCreateShader;
+ interface->fCullFace = StubGLCullFace;
+ interface->fDeleteBuffers = StubGLDeleteBuffers;
+ interface->fDeleteProgram = StubGLDeleteProgram;
+ interface->fDeleteShader = StubGLDeleteShader;
+ interface->fDeleteTextures = StubGLDeleteTextures;
+ interface->fDepthMask = StubGLDepthMask;
+ interface->fDisable = StubGLDisable;
+ interface->fDisableVertexAttribArray = StubGLDisableVertexAttribArray;
+ interface->fDrawArrays = StubGLDrawArrays;
+ interface->fDrawBuffer = StubGLDrawBuffer;
+ interface->fDrawBuffers = StubGLDrawBuffers;
+ interface->fDrawElements = StubGLDrawElements;
+ interface->fEnable = StubGLEnable;
+ interface->fEnableVertexAttribArray = StubGLEnableVertexAttribArray;
+ interface->fFrontFace = StubGLFrontFace;
+ interface->fGenBuffers = StubGLGenBuffers;
+ interface->fGenTextures = StubGLGenTextures;
+ interface->fGetBufferParameteriv = StubGLGetBufferParameteriv;
+ interface->fGetError = StubGLGetError;
+ interface->fGetIntegerv = StubGLGetIntegerv;
+ interface->fGetProgramInfoLog = StubGLGetProgramInfoLog;
+ interface->fGetProgramiv = StubGLGetProgramiv;
+ interface->fGetShaderInfoLog = StubGLGetShaderInfoLog;
+ interface->fGetShaderiv = StubGLGetShaderiv;
+ interface->fGetString = StubGLGetString;
+ interface->fGetTexLevelParameteriv = StubGLGetTexLevelParameteriv;
+ interface->fGetUniformLocation = StubGLGetUniformLocation;
+ interface->fLineWidth = StubGLLineWidth;
+ interface->fLinkProgram = StubGLLinkProgram;
+ interface->fPixelStorei = StubGLPixelStorei;
+ interface->fReadBuffer = StubGLReadBuffer;
+ interface->fReadPixels = StubGLReadPixels;
+ interface->fScissor = StubGLScissor;
+ interface->fShaderSource = StubGLShaderSource;
+ interface->fStencilFunc = StubGLStencilFunc;
+ interface->fStencilFuncSeparate = StubGLStencilFuncSeparate;
+ interface->fStencilMask = StubGLStencilMask;
+ interface->fStencilMaskSeparate = StubGLStencilMaskSeparate;
+ interface->fStencilOp = StubGLStencilOp;
+ interface->fStencilOpSeparate = StubGLStencilOpSeparate;
+ interface->fTexImage2D = StubGLTexImage2D;
+ interface->fTexParameteri = StubGLTexParameteri;
+ interface->fTexSubImage2D = StubGLTexSubImage2D;
+ interface->fUniform1f = StubGLUniform1f;
+ interface->fUniform1i = StubGLUniform1i;
+ interface->fUniform1fv = StubGLUniform1fv;
+ interface->fUniform1iv = StubGLUniform1iv;
+ interface->fUniform2f = StubGLUniform2f;
+ interface->fUniform2i = StubGLUniform2i;
+ interface->fUniform2fv = StubGLUniform2fv;
+ interface->fUniform2iv = StubGLUniform2iv;
+ interface->fUniform3f = StubGLUniform3f;
+ interface->fUniform3i = StubGLUniform3i;
+ interface->fUniform3fv = StubGLUniform3fv;
+ interface->fUniform3iv = StubGLUniform3iv;
+ interface->fUniform4f = StubGLUniform4f;
+ interface->fUniform4i = StubGLUniform4i;
+ interface->fUniform4fv = StubGLUniform4fv;
+ interface->fUniform4iv = StubGLUniform4iv;
+ interface->fUniformMatrix2fv = StubGLUniformMatrix2fv;
+ interface->fUniformMatrix3fv = StubGLUniformMatrix3fv;
+ interface->fUniformMatrix4fv = StubGLUniformMatrix4fv;
+ interface->fUseProgram = StubGLUseProgram;
+ interface->fVertexAttrib4fv = StubGLVertexAttrib4fv;
+ interface->fVertexAttribPointer = StubGLVertexAttribPointer;
+ interface->fViewport = StubGLViewport;
+ interface->fBindFramebuffer = StubGLBindFramebuffer;
+ interface->fBindRenderbuffer = StubGLBindRenderbuffer;
+ interface->fCheckFramebufferStatus = StubGLCheckFramebufferStatus;
+ interface->fDeleteFramebuffers = StubGLDeleteFramebuffers;
+ interface->fDeleteRenderbuffers = StubGLDeleteRenderbuffers;
+ interface->fFramebufferRenderbuffer = StubGLFramebufferRenderbuffer;
+ interface->fFramebufferTexture2D = StubGLFramebufferTexture2D;
+ interface->fGenFramebuffers = StubGLGenFramebuffers;
+ interface->fGenRenderbuffers = StubGLGenRenderbuffers;
+ interface->fGetFramebufferAttachmentParameteriv =
+ StubGLGetFramebufferAttachmentParameteriv;
+ interface->fGetRenderbufferParameteriv = StubGLGetRenderbufferParameteriv;
+ interface->fRenderbufferStorage = StubGLRenderbufferStorage;
+ interface->fRenderbufferStorageMultisample =
+ StubGLRenderbufferStorageMultisample;
+ interface->fBlitFramebuffer = StubGLBlitFramebuffer;
+ interface->fMapBuffer = StubGLMapBuffer;
+ interface->fUnmapBuffer = StubGLUnmapBuffer;
+ interface->fBindFragDataLocationIndexed =
+ StubBindFragDataLocationIndexedARB;
+ return interface;
}
} // namespace gfx
diff --git a/ui/gfx/gl/gl_bindings_skia_in_process.h b/ui/gfx/gl/gl_bindings_skia_in_process.h
index 9fa90495..4ae208c 100644
--- a/ui/gfx/gl/gl_bindings_skia_in_process.h
+++ b/ui/gfx/gl/gl_bindings_skia_in_process.h
@@ -13,8 +13,8 @@ struct GrGLInterface;
namespace gfx {
// The GPU back-end for skia requires pointers to GL functions. This function
-// binds skia-gpu to the in-process GL
-GL_EXPORT GrGLInterface* GetInProcessSkiaGLBinding();
+// creates a binding for skia-gpu to the in-process GL
+GL_EXPORT GrGLInterface* CreateInProcessSkiaGLBinding();
}
diff --git a/webkit/glue/gl_bindings_skia_cmd_buffer.cc b/webkit/glue/gl_bindings_skia_cmd_buffer.cc
index d2cf9d1..bad2877 100644
--- a/webkit/glue/gl_bindings_skia_cmd_buffer.cc
+++ b/webkit/glue/gl_bindings_skia_cmd_buffer.cc
@@ -15,109 +15,105 @@
namespace webkit_glue {
-GrGLInterface* GetCommandBufferSkiaGLBinding() {
- static SkAutoTUnref<GrGLInterface> cmd_buffer_interface;
- if (NULL == cmd_buffer_interface.get()) {
- GrGLInterface* interface = new GrGLInterface;
- cmd_buffer_interface.reset(interface);
- interface->fBindingsExported = kES2_GrGLBinding;
- interface->fActiveTexture = glActiveTexture;
- interface->fAttachShader = glAttachShader;
- interface->fBindAttribLocation = glBindAttribLocation;
- interface->fBindBuffer = glBindBuffer;
- interface->fBindTexture = glBindTexture;
- interface->fBlendColor = glBlendColor;
- interface->fBlendFunc = glBlendFunc;
- interface->fBufferData = glBufferData;
- interface->fBufferSubData = glBufferSubData;
- interface->fClear = glClear;
- interface->fClearColor = glClearColor;
- interface->fClearStencil = glClearStencil;
- interface->fColorMask = glColorMask;
- interface->fCompileShader = glCompileShader;
- interface->fCompressedTexImage2D = glCompressedTexImage2D;
- interface->fCreateProgram = glCreateProgram;
- interface->fCreateShader = glCreateShader;
- interface->fCullFace = glCullFace;
- interface->fDeleteBuffers = glDeleteBuffers;
- interface->fDeleteProgram = glDeleteProgram;
- interface->fDeleteShader = glDeleteShader;
- interface->fDeleteTextures = glDeleteTextures;
- interface->fDepthMask = glDepthMask;
- interface->fDisable = glDisable;
- interface->fDisableVertexAttribArray = glDisableVertexAttribArray;
- interface->fDrawArrays = glDrawArrays;
- interface->fDrawElements = glDrawElements;
- interface->fEnable = glEnable;
- interface->fEnableVertexAttribArray = glEnableVertexAttribArray;
- interface->fFrontFace = glFrontFace;
- interface->fGenBuffers = glGenBuffers;
- interface->fGenTextures = glGenTextures;
- interface->fGetBufferParameteriv = glGetBufferParameteriv;
- interface->fGetError = glGetError;
- interface->fGetIntegerv = glGetIntegerv;
- interface->fGetProgramInfoLog = glGetProgramInfoLog;
- interface->fGetProgramiv = glGetProgramiv;
- interface->fGetShaderInfoLog = glGetShaderInfoLog;
- interface->fGetShaderiv = glGetShaderiv;
- interface->fGetString = glGetString;
- interface->fGetUniformLocation = glGetUniformLocation;
- interface->fLineWidth = glLineWidth;
- interface->fLinkProgram = glLinkProgram;
- interface->fPixelStorei = glPixelStorei;
- interface->fReadPixels = glReadPixels;
- interface->fScissor = glScissor;
- interface->fShaderSource = glShaderSource;
- interface->fStencilFunc = glStencilFunc;
- interface->fStencilFuncSeparate = glStencilFuncSeparate;
- interface->fStencilMask = glStencilMask;
- interface->fStencilMaskSeparate = glStencilMaskSeparate;
- interface->fStencilOp = glStencilOp;
- interface->fStencilOpSeparate = glStencilOpSeparate;
- interface->fTexImage2D = glTexImage2D;
- interface->fTexParameteri = glTexParameteri;
- interface->fTexSubImage2D = glTexSubImage2D;
- interface->fUniform1f = glUniform1f;
- interface->fUniform1i = glUniform1i;
- interface->fUniform1fv = glUniform1fv;
- interface->fUniform1iv = glUniform1iv;
- interface->fUniform2f = glUniform2f;
- interface->fUniform2i = glUniform2i;
- interface->fUniform2fv = glUniform2fv;
- interface->fUniform2iv = glUniform2iv;
- interface->fUniform3f = glUniform3f;
- interface->fUniform3i = glUniform3i;
- interface->fUniform3fv = glUniform3fv;
- interface->fUniform3iv = glUniform3iv;
- interface->fUniform4f = glUniform4f;
- interface->fUniform4i = glUniform4i;
- interface->fUniform4fv = glUniform4fv;
- interface->fUniform4iv = glUniform4iv;
- interface->fUniformMatrix2fv = glUniformMatrix2fv;
- interface->fUniformMatrix3fv = glUniformMatrix3fv;
- interface->fUniformMatrix4fv = glUniformMatrix4fv;
- interface->fUseProgram = glUseProgram;
- interface->fVertexAttrib4fv = glVertexAttrib4fv;
- interface->fVertexAttribPointer = glVertexAttribPointer;
- interface->fViewport = glViewport;
- interface->fBindFramebuffer = glBindFramebuffer;
- interface->fBindRenderbuffer = glBindRenderbuffer;
- interface->fCheckFramebufferStatus = glCheckFramebufferStatus;
- interface->fDeleteFramebuffers = glDeleteFramebuffers;
- interface->fDeleteRenderbuffers = glDeleteRenderbuffers;
- interface->fFramebufferRenderbuffer = glFramebufferRenderbuffer;
- interface->fFramebufferTexture2D = glFramebufferTexture2D;
- interface->fGenFramebuffers = glGenFramebuffers;
- interface->fGenRenderbuffers = glGenRenderbuffers;
- interface->fGetFramebufferAttachmentParameteriv =
- glGetFramebufferAttachmentParameteriv;
- interface->fGetRenderbufferParameteriv = glGetRenderbufferParameteriv;
- interface->fRenderbufferStorage = glRenderbufferStorage;
- interface->fRenderbufferStorageMultisample =
- glRenderbufferStorageMultisampleEXT;
- interface->fBlitFramebuffer = glBlitFramebufferEXT;
- }
- return cmd_buffer_interface.get();
+GrGLInterface* CreateCommandBufferSkiaGLBinding() {
+ GrGLInterface* interface = new GrGLInterface;
+ interface->fBindingsExported = kES2_GrGLBinding;
+ interface->fActiveTexture = glActiveTexture;
+ interface->fAttachShader = glAttachShader;
+ interface->fBindAttribLocation = glBindAttribLocation;
+ interface->fBindBuffer = glBindBuffer;
+ interface->fBindTexture = glBindTexture;
+ interface->fBlendColor = glBlendColor;
+ interface->fBlendFunc = glBlendFunc;
+ interface->fBufferData = glBufferData;
+ interface->fBufferSubData = glBufferSubData;
+ interface->fClear = glClear;
+ interface->fClearColor = glClearColor;
+ interface->fClearStencil = glClearStencil;
+ interface->fColorMask = glColorMask;
+ interface->fCompileShader = glCompileShader;
+ interface->fCompressedTexImage2D = glCompressedTexImage2D;
+ interface->fCreateProgram = glCreateProgram;
+ interface->fCreateShader = glCreateShader;
+ interface->fCullFace = glCullFace;
+ interface->fDeleteBuffers = glDeleteBuffers;
+ interface->fDeleteProgram = glDeleteProgram;
+ interface->fDeleteShader = glDeleteShader;
+ interface->fDeleteTextures = glDeleteTextures;
+ interface->fDepthMask = glDepthMask;
+ interface->fDisable = glDisable;
+ interface->fDisableVertexAttribArray = glDisableVertexAttribArray;
+ interface->fDrawArrays = glDrawArrays;
+ interface->fDrawElements = glDrawElements;
+ interface->fEnable = glEnable;
+ interface->fEnableVertexAttribArray = glEnableVertexAttribArray;
+ interface->fFrontFace = glFrontFace;
+ interface->fGenBuffers = glGenBuffers;
+ interface->fGenTextures = glGenTextures;
+ interface->fGetBufferParameteriv = glGetBufferParameteriv;
+ interface->fGetError = glGetError;
+ interface->fGetIntegerv = glGetIntegerv;
+ interface->fGetProgramInfoLog = glGetProgramInfoLog;
+ interface->fGetProgramiv = glGetProgramiv;
+ interface->fGetShaderInfoLog = glGetShaderInfoLog;
+ interface->fGetShaderiv = glGetShaderiv;
+ interface->fGetString = glGetString;
+ interface->fGetUniformLocation = glGetUniformLocation;
+ interface->fLineWidth = glLineWidth;
+ interface->fLinkProgram = glLinkProgram;
+ interface->fPixelStorei = glPixelStorei;
+ interface->fReadPixels = glReadPixels;
+ interface->fScissor = glScissor;
+ interface->fShaderSource = glShaderSource;
+ interface->fStencilFunc = glStencilFunc;
+ interface->fStencilFuncSeparate = glStencilFuncSeparate;
+ interface->fStencilMask = glStencilMask;
+ interface->fStencilMaskSeparate = glStencilMaskSeparate;
+ interface->fStencilOp = glStencilOp;
+ interface->fStencilOpSeparate = glStencilOpSeparate;
+ interface->fTexImage2D = glTexImage2D;
+ interface->fTexParameteri = glTexParameteri;
+ interface->fTexSubImage2D = glTexSubImage2D;
+ interface->fUniform1f = glUniform1f;
+ interface->fUniform1i = glUniform1i;
+ interface->fUniform1fv = glUniform1fv;
+ interface->fUniform1iv = glUniform1iv;
+ interface->fUniform2f = glUniform2f;
+ interface->fUniform2i = glUniform2i;
+ interface->fUniform2fv = glUniform2fv;
+ interface->fUniform2iv = glUniform2iv;
+ interface->fUniform3f = glUniform3f;
+ interface->fUniform3i = glUniform3i;
+ interface->fUniform3fv = glUniform3fv;
+ interface->fUniform3iv = glUniform3iv;
+ interface->fUniform4f = glUniform4f;
+ interface->fUniform4i = glUniform4i;
+ interface->fUniform4fv = glUniform4fv;
+ interface->fUniform4iv = glUniform4iv;
+ interface->fUniformMatrix2fv = glUniformMatrix2fv;
+ interface->fUniformMatrix3fv = glUniformMatrix3fv;
+ interface->fUniformMatrix4fv = glUniformMatrix4fv;
+ interface->fUseProgram = glUseProgram;
+ interface->fVertexAttrib4fv = glVertexAttrib4fv;
+ interface->fVertexAttribPointer = glVertexAttribPointer;
+ interface->fViewport = glViewport;
+ interface->fBindFramebuffer = glBindFramebuffer;
+ interface->fBindRenderbuffer = glBindRenderbuffer;
+ interface->fCheckFramebufferStatus = glCheckFramebufferStatus;
+ interface->fDeleteFramebuffers = glDeleteFramebuffers;
+ interface->fDeleteRenderbuffers = glDeleteRenderbuffers;
+ interface->fFramebufferRenderbuffer = glFramebufferRenderbuffer;
+ interface->fFramebufferTexture2D = glFramebufferTexture2D;
+ interface->fGenFramebuffers = glGenFramebuffers;
+ interface->fGenRenderbuffers = glGenRenderbuffers;
+ interface->fGetFramebufferAttachmentParameteriv =
+ glGetFramebufferAttachmentParameteriv;
+ interface->fGetRenderbufferParameteriv = glGetRenderbufferParameteriv;
+ interface->fRenderbufferStorage = glRenderbufferStorage;
+ interface->fRenderbufferStorageMultisample =
+ glRenderbufferStorageMultisampleEXT;
+ interface->fBlitFramebuffer = glBlitFramebufferEXT;
+ return interface;
}
} // namespace webkit_glue
diff --git a/webkit/glue/gl_bindings_skia_cmd_buffer.h b/webkit/glue/gl_bindings_skia_cmd_buffer.h
index 7518492..d7cfc47 100644
--- a/webkit/glue/gl_bindings_skia_cmd_buffer.h
+++ b/webkit/glue/gl_bindings_skia_cmd_buffer.h
@@ -11,8 +11,8 @@ struct GrGLInterface;
namespace webkit_glue {
// The GPU back-end for skia requires pointers to GL functions. This function
-// binds skia-gpu to the cmd buffers GL.
-GrGLInterface* GetCommandBufferSkiaGLBinding();
+// returns a binding for skia-gpu to the cmd buffers GL.
+GrGLInterface* CreateCommandBufferSkiaGLBinding();
} // namespace webkit_glue
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
index 40a5957..833360a 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
@@ -1578,8 +1578,8 @@ WGC3Denum WebGraphicsContext3DInProcessCommandBufferImpl::
#if WEBKIT_USING_SKIA
GrGLInterface* WebGraphicsContext3DInProcessCommandBufferImpl::
- grGLInterface() {
- return webkit_glue::GetCommandBufferSkiaGLBinding();
+ onCreateGrGLInterface() {
+ return webkit_glue::CreateCommandBufferSkiaGLBinding();
}
#endif
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
index 6b4f276..ae162e7 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
+++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
@@ -430,8 +430,9 @@ class WebGraphicsContext3DInProcessCommandBufferImpl
WebGraphicsContext3D::WebGraphicsContextLostCallback* callback);
virtual WGC3Denum getGraphicsResetStatusARB();
+ protected:
#if WEBKIT_USING_SKIA
- virtual GrGLInterface* grGLInterface();
+ virtual GrGLInterface* onCreateGrGLInterface();
#endif
private:
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
index f149813..909cabe 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
@@ -1552,8 +1552,8 @@ WGC3Denum WebGraphicsContext3DInProcessImpl::getGraphicsResetStatusARB() {
}
#if WEBKIT_USING_SKIA
-GrGLInterface* WebGraphicsContext3DInProcessImpl::grGLInterface() {
- return gfx::GetInProcessSkiaGLBinding();
+GrGLInterface* WebGraphicsContext3DInProcessImpl::onCreateGrGLInterface() {
+ return gfx::CreateInProcessSkiaGLBinding();
}
#endif
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.h b/webkit/gpu/webgraphicscontext3d_in_process_impl.h
index 81f1b74..eb7cc5d 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_impl.h
+++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.h
@@ -412,8 +412,9 @@ class WebGraphicsContext3DInProcessImpl : public WebGraphicsContext3D {
WebGraphicsContext3D::
WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* callback) {}
+ protected:
#if WEBKIT_USING_SKIA
- virtual GrGLInterface* grGLInterface();
+ virtual GrGLInterface* onCreateGrGLInterface();
#endif
private: