Commit b6dbdc0d authored by kbr@chromium.org's avatar kbr@chromium.org

Add GL_CHROMIUM_framebuffer_multisample support to Chromium's

WebGraphicsContext3D implementations. (The
GL_EXT_framebuffer_multisample and GL_ANGLE_framebuffer_multisample
extensions are advertised in Chrome's command buffer implementation as
GL_CHROMIUM_framebuffer_multisample.)

Tested manually in WebKit with accelerated 2D canvas with
multisampling turned on. This must land before the associated WebKit
patch.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6369016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72596 0039d316-1c4b-4281-b951-d872f2087c98
parent 51dc466c
...@@ -387,6 +387,23 @@ void WebGraphicsContext3DCommandBufferImpl::requestExtensionCHROMIUM( ...@@ -387,6 +387,23 @@ void WebGraphicsContext3DCommandBufferImpl::requestExtensionCHROMIUM(
glRequestExtensionCHROMIUM(extension); glRequestExtensionCHROMIUM(extension);
} }
void WebGraphicsContext3DCommandBufferImpl::blitFramebufferCHROMIUM(
int srcX0, int srcY0, int srcX1, int srcY1,
int dstX0, int dstY0, int dstX1, int dstY1,
unsigned mask, unsigned filter) {
glBlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1,
dstX0, dstY0, dstX1, dstY1,
mask, filter);
}
void WebGraphicsContext3DCommandBufferImpl::
renderbufferStorageMultisampleCHROMIUM(
unsigned long target, int samples, unsigned internalformat,
unsigned width, unsigned height) {
glRenderbufferStorageMultisampleEXT(target, samples, internalformat,
width, height);
}
// Helper macros to reduce the amount of code. // Helper macros to reduce the amount of code.
#define DELEGATE_TO_GL(name, glname) \ #define DELEGATE_TO_GL(name, glname) \
......
...@@ -364,6 +364,14 @@ class WebGraphicsContext3DCommandBufferImpl ...@@ -364,6 +364,14 @@ class WebGraphicsContext3DCommandBufferImpl
virtual WebKit::WebString getRequestableExtensionsCHROMIUM(); virtual WebKit::WebString getRequestableExtensionsCHROMIUM();
virtual void requestExtensionCHROMIUM(const char*); virtual void requestExtensionCHROMIUM(const char*);
virtual void blitFramebufferCHROMIUM(
int srcX0, int srcY0, int srcX1, int srcY1,
int dstX0, int dstY0, int dstX1, int dstY1,
unsigned mask, unsigned filter);
virtual void renderbufferStorageMultisampleCHROMIUM(
unsigned long target, int samples, unsigned internalformat,
unsigned width, unsigned height);
virtual unsigned createCompositorTexture(unsigned width, unsigned height); virtual unsigned createCompositorTexture(unsigned width, unsigned height);
virtual void deleteCompositorTexture(unsigned parent_texture); virtual void deleteCompositorTexture(unsigned parent_texture);
virtual void copyTextureToCompositor(unsigned texture, virtual void copyTextureToCompositor(unsigned texture,
......
...@@ -672,6 +672,17 @@ WebString WebGraphicsContext3DInProcessImpl:: ...@@ -672,6 +672,17 @@ WebString WebGraphicsContext3DInProcessImpl::
void WebGraphicsContext3DInProcessImpl::requestExtensionCHROMIUM(const char*) { void WebGraphicsContext3DInProcessImpl::requestExtensionCHROMIUM(const char*) {
} }
void WebGraphicsContext3DInProcessImpl::blitFramebufferCHROMIUM(
int srcX0, int srcY0, int srcX1, int srcY1,
int dstX0, int dstY0, int dstX1, int dstY1,
unsigned mask, unsigned filter) {
}
void WebGraphicsContext3DInProcessImpl::renderbufferStorageMultisampleCHROMIUM(
unsigned long target, int samples, unsigned internalformat,
unsigned width, unsigned height) {
}
// Helper macros to reduce the amount of code. // Helper macros to reduce the amount of code.
#define DELEGATE_TO_GL(name, glname) \ #define DELEGATE_TO_GL(name, glname) \
......
...@@ -75,6 +75,14 @@ class WebGraphicsContext3DInProcessImpl : public WebKit::WebGraphicsContext3D { ...@@ -75,6 +75,14 @@ class WebGraphicsContext3DInProcessImpl : public WebKit::WebGraphicsContext3D {
virtual WebKit::WebString getRequestableExtensionsCHROMIUM(); virtual WebKit::WebString getRequestableExtensionsCHROMIUM();
virtual void requestExtensionCHROMIUM(const char*); virtual void requestExtensionCHROMIUM(const char*);
virtual void blitFramebufferCHROMIUM(
int srcX0, int srcY0, int srcX1, int srcY1,
int dstX0, int dstY0, int dstX1, int dstY1,
unsigned mask, unsigned filter);
virtual void renderbufferStorageMultisampleCHROMIUM(
unsigned long target, int samples, unsigned internalformat,
unsigned width, unsigned height);
virtual void activeTexture(unsigned long texture); virtual void activeTexture(unsigned long texture);
virtual void attachShader(WebKit::WebGLId program, WebKit::WebGLId shader); virtual void attachShader(WebKit::WebGLId program, WebKit::WebGLId shader);
virtual void bindAttribLocation( virtual void bindAttribLocation(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment