diff options
author | sievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-22 18:54:08 +0000 |
---|---|---|
committer | sievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-22 18:54:08 +0000 |
commit | 3a59bb92550acf8bf455007bb482f573a05d9448 (patch) | |
tree | adfb58aacf28aa0a4f4bde2e59df1839d89d4e34 /webkit | |
parent | b7d060862667150a87fc90939d79aec35a2c0c01 (diff) | |
download | chromium_src-3a59bb92550acf8bf455007bb482f573a05d9448.zip chromium_src-3a59bb92550acf8bf455007bb482f573a05d9448.tar.gz chromium_src-3a59bb92550acf8bf455007bb482f573a05d9448.tar.bz2 |
Support stream textures with the synchronous compositor
This adds a thread-safe StreamTextureManager for GLInProcessContext.
It further adds some plumbing for the webkit thread to be able
to create a StreamTextureFactory from the main thread (see render_view_impl.cc)
with the ability to extract the thread-safe SurfaceTexture(Bridge) for a given stream.
This is nothing but a crazy amount of plumbing to achieve this:
- StreamTexture::Update() i.e. SurfaceTexture::updateTexImage needs to happen on the GL thread
with a current context
- The StreamTextureFactory and Proxy are referenced from the WebmediaPlayer instance which lives on
the main thread
- The callback for invalidating the video is posted to the
compositor thread directly (here: UI thread) bypassing the main thread
BUG=239760
NOTRY=True
Review URL: https://chromiumcodereview.appspot.com/23234003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219057 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc | 5 | ||||
-rw-r--r-- | webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc index 66c7a53..9207ef9 100644 --- a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc +++ b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc @@ -1117,6 +1117,11 @@ DELEGATE_TO_GL_2(bindTexImage2DCHROMIUM, BindTexImage2DCHROMIUM, DELEGATE_TO_GL_2(releaseTexImage2DCHROMIUM, ReleaseTexImage2DCHROMIUM, WGC3Denum, WGC3Dint) +DELEGATE_TO_GL_1R(createStreamTextureCHROMIUM, CreateStreamTextureCHROMIUM, + WebGLId, WebGLId) +DELEGATE_TO_GL_1(destroyStreamTextureCHROMIUM, DestroyStreamTextureCHROMIUM, + WebGLId) + void* WebGraphicsContext3DInProcessCommandBufferImpl::mapBufferCHROMIUM( WGC3Denum target, WGC3Denum access) { ClearContext(); diff --git a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h index f96607d..d763e14 100644 --- a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h +++ b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h @@ -468,6 +468,9 @@ class WEBKIT_GPU_EXPORT WebGraphicsContext3DInProcessCommandBufferImpl virtual void bindTexImage2DCHROMIUM(WGC3Denum target, WGC3Dint imageId); virtual void releaseTexImage2DCHROMIUM(WGC3Denum target, WGC3Dint imageId); + virtual WebGLId createStreamTextureCHROMIUM(WebGLId texture); + virtual void destroyStreamTextureCHROMIUM(WebGLId texture); + virtual void texStorage2DEXT( WGC3Denum target, WGC3Dint levels, WGC3Duint internalformat, WGC3Dint width, WGC3Dint height); |