diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-01 21:50:59 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-01 21:50:59 +0000 |
commit | 78b514be30c67dad84bb8e2b6dfac3cfb15c79ff (patch) | |
tree | dd7d62dafa82bd6fbe087fb6f4de8148939c34ee /gpu/gpu_common.gypi | |
parent | 107d6e00cece1fb1545f5403193576f822e93a09 (diff) | |
download | chromium_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/gpu_common.gypi')
-rw-r--r-- | gpu/gpu_common.gypi | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gpu/gpu_common.gypi b/gpu/gpu_common.gypi index 43646c8..0de1c3e 100644 --- a/gpu/gpu_common.gypi +++ b/gpu/gpu_common.gypi @@ -223,6 +223,7 @@ 'command_buffer/tests/gl_tests_main.cc', 'command_buffer/tests/gl_manager.cc', 'command_buffer/tests/gl_manager.h', + 'command_buffer/tests/gl_texture_mailbox_unittests.cc', 'command_buffer/tests/gl_unittests.cc', ], }, |