summaryrefslogtreecommitdiffstats
path: root/app/gfx
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-09 20:45:07 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-09 20:45:07 +0000
commitce2d4128e2df25dbe6802243f0eba1956a0cd192 (patch)
tree5d4295176613a420871b16939d1ee689f85f0cc0 /app/gfx
parent15e857787595bdcb66875eb43ad6d12d059148e8 (diff)
downloadchromium_src-ce2d4128e2df25dbe6802243f0eba1956a0cd192.zip
chromium_src-ce2d4128e2df25dbe6802243f0eba1956a0cd192.tar.gz
chromium_src-ce2d4128e2df25dbe6802243f0eba1956a0cd192.tar.bz2
Added a couple of new GL extension bindings.
These are used by the default Chrome WebKit WebGL implementation. TEST=try BUG=none Review URL: http://codereview.chromium.org/3030053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55465 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/gfx')
-rw-r--r--app/gfx/gl/generate_bindings.py14
-rw-r--r--app/gfx/gl/gl_interface.h9
-rw-r--r--app/gfx/gl/gl_mock.h9
3 files changed, 30 insertions, 2 deletions
diff --git a/app/gfx/gl/generate_bindings.py b/app/gfx/gl/generate_bindings.py
index 0adf603..dd118833 100644
--- a/app/gfx/gl/generate_bindings.py
+++ b/app/gfx/gl/generate_bindings.py
@@ -28,6 +28,10 @@ GL_FUNCTIONS = [
['void', ['glBlendFunc'], 'GLenum sfactor, GLenum dfactor'],
['void', ['glBlendFuncSeparate'],
'GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha'],
+['void', ['glBlitFramebufferEXT', 'BlitFramebuffer'],
+ 'GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, '
+ 'GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, '
+ 'GLbitfield mask, GLenum filter'],
['void', ['glBufferData'],
'GLenum target, GLsizei size, const void* data, GLenum usage'],
['void', ['glBufferSubData'],
@@ -104,7 +108,8 @@ GL_FUNCTIONS = [
'GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders'],
['GLint', ['glGetAttribLocation'], 'GLuint program, const char* name'],
['void', ['glGetBooleanv'], 'GLenum pname, GLboolean* params'],
-['void', ['glGetBufferParameteriv'], 'GLenum target, GLenum pname, GLint* params'],
+['void', ['glGetBufferParameteriv'],
+ 'GLenum target, GLenum pname, GLint* params'],
['GLenum', ['glGetError'], 'void'],
['void', ['glGetFloatv'], 'GLenum pname, GLfloat* params'],
['void', ['glGetFramebufferAttachmentParameterivEXT',
@@ -151,6 +156,10 @@ GL_FUNCTIONS = [
'GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, '
'GLenum type, void* pixels'],
['void', ['glReleaseShaderCompiler'], 'void'],
+['void', ['glRenderbufferStorageMultisampleEXT',
+ 'glRenderbufferStorageMultisample'],
+ 'GLenum target, GLsizei samples, GLenum internalformat, '
+ 'GLsizei width, GLsizei height'],
['void', ['glRenderbufferStorageEXT', 'glRenderbufferStorage'],
'GLenum target, GLenum internalformat, GLsizei width, GLsizei height'],
['void', ['glSampleCoverage'], 'GLclampf value, GLboolean invert'],
@@ -260,7 +269,8 @@ EGL_FUNCTIONS = [
['EGLBoolean', ['eglGetConfigAttrib'],
'EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint* value'],
['EGLSurface', ['eglCreateWindowSurface'],
- 'EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint* attrib_list'],
+ 'EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, '
+ 'const EGLint* attrib_list'],
['EGLSurface', ['eglCreatePbufferSurface'],
'EGLDisplay dpy, EGLConfig config, const EGLint* attrib_list'],
['EGLSurface', ['eglCreatePixmapSurface'],
diff --git a/app/gfx/gl/gl_interface.h b/app/gfx/gl/gl_interface.h
index 9e1fc10..a13f406 100644
--- a/app/gfx/gl/gl_interface.h
+++ b/app/gfx/gl/gl_interface.h
@@ -50,6 +50,11 @@ class GLInterface {
virtual void BlendFuncSeparate(
GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) = 0;
+ virtual void BlitFramebufferEXT(
+ GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
+ GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
+ GLbitfield mask, GLenum filter) = 0;
+
virtual void BufferData(
GLenum target, GLsizeiptr size, const void* data, GLenum usage) = 0;
@@ -262,6 +267,10 @@ class GLInterface {
virtual void RenderbufferStorageEXT(
GLenum target, GLenum internalformat, GLsizei width, GLsizei height) = 0;
+ virtual void RenderbufferStorageMultisampleEXT(
+ GLenum target, GLsizei samples, GLenum internalformat,
+ GLsizei width, GLsizei height) = 0;
+
virtual void SampleCoverage(GLclampf value, GLboolean invert) = 0;
virtual void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) = 0;
diff --git a/app/gfx/gl/gl_mock.h b/app/gfx/gl/gl_mock.h
index 2a06fdf..70223d3 100644
--- a/app/gfx/gl/gl_mock.h
+++ b/app/gfx/gl/gl_mock.h
@@ -46,6 +46,11 @@ class MockGLInterface : public GLInterface {
MOCK_METHOD4(BlendFuncSeparate, void(
GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha));
+ MOCK_METHOD10(BlitFramebufferEXT, void(
+ GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
+ GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
+ GLbitfield mask, GLenum filter));
+
MOCK_METHOD4(BufferData, void(
GLenum target, GLsizeiptr size, const void* data, GLenum usage));
@@ -257,6 +262,10 @@ class MockGLInterface : public GLInterface {
MOCK_METHOD4(RenderbufferStorageEXT, void(
GLenum target, GLenum internalformat, GLsizei width, GLsizei height));
+ MOCK_METHOD5(RenderbufferStorageMultisampleEXT, void(
+ GLenum target, GLsizei samples, GLenum internalformat,
+ GLsizei width, GLsizei height));
+
MOCK_METHOD2(SampleCoverage, void(GLclampf value, GLboolean invert));
MOCK_METHOD4(Scissor, void(GLint x, GLint y, GLsizei width, GLsizei height));