summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-17 12:46:54 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-17 12:46:54 +0000
commit9b98f084607bc1e9185be7f29b52f1e4c0fa498d (patch)
tree1a742541920858a5cc1d1bb8399a218f53e73392 /gpu/command_buffer
parentd63b5215c206da43ed352ff09459a0ba3622b727 (diff)
downloadchromium_src-9b98f084607bc1e9185be7f29b52f1e4c0fa498d.zip
chromium_src-9b98f084607bc1e9185be7f29b52f1e4c0fa498d.tar.gz
chromium_src-9b98f084607bc1e9185be7f29b52f1e4c0fa498d.tar.bz2
GpuVideoDecoder to use GpuVideoDevice and IPC messages to complete VideoFrame allocation
GpuVideoDecedoer now sends IPC messages to allocation GL textures. It also uses GpuVideoDevice to create VideoFrames from the GL textures. These GL textures are passed into VideoDecodeEngine. BUG=53714 TEST=Tree is green Review URL: http://codereview.chromium.org/3335019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59784 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer')
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc13
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.h7
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 183fb03..5b9fc40 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -550,6 +550,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();
@@ -2075,6 +2077,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 (vertex_compiler_ != NULL) {
ShDestruct(vertex_compiler_);
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);