summaryrefslogtreecommitdiffstats
path: root/gpu/gles2_conform_support
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-01 21:50:59 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-01 21:50:59 +0000
commit78b514be30c67dad84bb8e2b6dfac3cfb15c79ff (patch)
treedd7d62dafa82bd6fbe087fb6f4de8148939c34ee /gpu/gles2_conform_support
parent107d6e00cece1fb1545f5403193576f822e93a09 (diff)
downloadchromium_src-78b514be30c67dad84bb8e2b6dfac3cfb15c79ff.zip
chromium_src-78b514be30c67dad84bb8e2b6dfac3cfb15c79ff.tar.gz
chromium_src-78b514be30c67dad84bb8e2b6dfac3cfb15c79ff.tar.bz2
Allow textures to be moved from one GL context group to another.
The function glProduceTexture(target, mailbox) removes a texture from a context group and puts it in a "mailbox" that is accessible to all context groups on the same channel. Then glConsumeTexture(target, mailbox) adds the texture to a context group, possibly a different one, if the caller knows the name of the mailbox. From the point of view of the caller, the texture objects themselves do not move, just the texels. In terms of the underlying GL, the TextureInfo service IDs are reassigned as necessary. A texture in a mailbox is destroyed when the context group that put it there is destroyed. Expected usage is: // Context 1 glBindTexture(GL_TEXTURE_2D, foo); glProduceTexture(GL_TEXTURE_2D, secret_name); glFlush(); // Context 2 glBindTexture(GL_TEXTURE_2D, bar); glConsumeTexture(GL_TEXTURE_2D, secret_name); Review URL: http://codereview.chromium.org/10106015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134791 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/gles2_conform_support')
-rw-r--r--gpu/gles2_conform_support/egl/display.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gpu/gles2_conform_support/egl/display.cc b/gpu/gles2_conform_support/egl/display.cc
index bc07fae..54912d2 100644
--- a/gpu/gles2_conform_support/egl/display.cc
+++ b/gpu/gles2_conform_support/egl/display.cc
@@ -87,7 +87,7 @@ EGLSurface Display::CreateWindowSurface(EGLConfig config,
if (!command_buffer->Initialize())
return NULL;
- gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(true));
+ gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(NULL, true));
decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get()));
if (!decoder_.get())