diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-28 00:48:56 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-28 00:48:56 +0000 |
commit | a3a93e7bbb8275069f319e0807c43f7395502abf (patch) | |
tree | f5424f889285ff09f930ffc30ed16c0203ad1827 /gpu/GLES2 | |
parent | 9117fb714da99c44319cc8e56909d0a48bf7da02 (diff) | |
download | chromium_src-a3a93e7bbb8275069f319e0807c43f7395502abf.zip chromium_src-a3a93e7bbb8275069f319e0807c43f7395502abf.tar.gz chromium_src-a3a93e7bbb8275069f319e0807c43f7395502abf.tar.bz2 |
Add way to create a texture in parent's context and copy into it
For canvas we need a way to create multiple offscreen render targets within
the same OpenGL context and expose them all to the compositor, which exists
as a parent context. ggl currently provides a single framebuffer and texture
pair per offscreen context and implements swapBuffers() to copy to the parent
texture. This generalizes that to let clients create as many parent textures
as necessary and do the equivalent of swapBuffers() for each without the
service side needing to keep track of the mapping.
We'll want to change this in the future when we start using glBlitFramebuffer
to support multisampling. I think in that world we'll need a way to bind a
texture in the parent's context to the DRAW_FRAMEBUFFER context. For now,
I think this is OK.
TEST=open a page with multiple accelerated canvases in a shared context
BUG=52684
Review URL: http://codereview.chromium.org/3211005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57761 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/GLES2')
-rw-r--r-- | gpu/GLES2/gl2ext.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gpu/GLES2/gl2ext.h b/gpu/GLES2/gl2ext.h index cae6500..35ac011 100644 --- a/gpu/GLES2/gl2ext.h +++ b/gpu/GLES2/gl2ext.h @@ -896,6 +896,20 @@ typedef void* (GL_APIENTRYP PFNGLMAPTEXSUBIMAGE2D) (GLenum target, GLint level, typedef void (GL_APIENTRYP PFNGLUNMAPTEXSUBIMAGE2D) (const void* mem); #endif +/* GL_CHROMIUM_copy_texture_to_parent_texture */ +#ifndef GL_CHROMIUM_copy_texture_to_parent_texture +#define GL_CHROMIUM_copy_texture_to_parent_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +#define glCopyTextureToParentTexture GLES2_GET_FUN(CopyTextureToParentTexture) +#if !defined(GLES2_USE_CPP_BINDINGS) +GL_APICALL void* GL_APIENTRY glCopyTextureToParentTexture (GLuint id, GLuint id2); +#endif +#else +typedef void* (GL_APIENTRYP PFNGLCOPYTEXTURETOPARENTTEXTURE) (GLuint id, GLuint id2); +#endif +#endif + + #ifdef __cplusplus } #endif |