summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/client/gles2_implementation_autogen.h
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-28 00:48:56 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-28 00:48:56 +0000
commita3a93e7bbb8275069f319e0807c43f7395502abf (patch)
treef5424f889285ff09f930ffc30ed16c0203ad1827 /gpu/command_buffer/client/gles2_implementation_autogen.h
parent9117fb714da99c44319cc8e56909d0a48bf7da02 (diff)
downloadchromium_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/command_buffer/client/gles2_implementation_autogen.h')
-rw-r--r--gpu/command_buffer/client/gles2_implementation_autogen.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation_autogen.h b/gpu/command_buffer/client/gles2_implementation_autogen.h
index 872bcf63..f3fad49 100644
--- a/gpu/command_buffer/client/gles2_implementation_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_autogen.h
@@ -832,5 +832,10 @@ void* MapTexSubImage2D(
void UnmapTexSubImage2D(const void* mem);
+void CopyTextureToParentTexture(
+ GLuint client_child_id, GLuint client_parent_id) {
+ helper_->CopyTextureToParentTexture(client_child_id, client_parent_id);
+}
+
#endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_