diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-17 22:03:16 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-17 22:03:16 +0000 |
commit | 1318e92f70e240d7ae71320ea7e4fcae18f2ce3e (patch) | |
tree | 412ee9192a850d9867bea3a841d800f67081ebe3 /gpu/command_buffer | |
parent | 9fcd39385ae39a68d3509238bd9ef83af1868fc7 (diff) | |
download | chromium_src-1318e92f70e240d7ae71320ea7e4fcae18f2ce3e.zip chromium_src-1318e92f70e240d7ae71320ea7e4fcae18f2ce3e.tar.gz chromium_src-1318e92f70e240d7ae71320ea7e4fcae18f2ce3e.tar.bz2 |
Resubmit GpuVideoDecoder and related patches.
BUG=53714
TEST=Tree is green
Review URL: http://codereview.chromium.org/3442006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59860 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer')
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 13 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.h | 7 |
2 files changed, 20 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 139e1af..9c11bb5 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -537,6 +537,8 @@ class GLES2DecoderImpl : public base::SupportsWeakPtr<GLES2DecoderImpl>, virtual gfx::GLContext* GetGLContext() { return context_.get(); } virtual void SetSwapBuffersCallback(Callback0::Type* callback); + virtual bool GetServiceTextureId(uint32 client_texture_id, + uint32* service_texture_id); // Restores the current state to the user's settings. void RestoreCurrentFramebufferBindings(); @@ -2051,6 +2053,17 @@ void GLES2DecoderImpl::SetSwapBuffersCallback(Callback0::Type* callback) { swap_buffers_callback_.reset(callback); } +bool GLES2DecoderImpl::GetServiceTextureId(uint32 client_texture_id, + uint32* service_texture_id) { + TextureManager::TextureInfo* texture = + texture_manager()->GetTextureInfo(client_texture_id); + if (texture) { + *service_texture_id = texture->service_id(); + return true; + } + return false; +} + void GLES2DecoderImpl::Destroy() { if (context_.get()) { MakeCurrent(); diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.h b/gpu/command_buffer/service/gles2_cmd_decoder.h index e94df94..694fa37 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder.h @@ -82,6 +82,13 @@ class GLES2Decoder : public CommonDecoder { // Sets a callback which is called when a SwapBuffers command is processed. virtual void SetSwapBuffersCallback(Callback0::Type* callback) = 0; + // Get the service texture ID corresponding to a client texture ID. + // If no such record is found then return false. + virtual bool GetServiceTextureId(uint32 client_texture_id, + uint32* service_texture_id) { + return false; + } + protected: explicit GLES2Decoder(ContextGroup* group); |