 Chromium Code Reviews
 Chromium Code Reviews Issue 8686010:
  <video> decode in hardware!  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 8686010:
  <video> decode in hardware!  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| Index: content/common/gpu/media/gpu_video_decode_accelerator.cc | 
| diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc | 
| index c07ee0bdcefef2583c2572039472f0be3064f67c..de423512cb5c3bdcc6f3fb3d6444efb87d4969f6 100644 | 
| --- a/content/common/gpu/media/gpu_video_decode_accelerator.cc | 
| +++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc | 
| @@ -20,8 +20,11 @@ | 
| #include "ui/gfx/gl/gl_context.h" | 
| #include "ui/gfx/gl/gl_surface_egl.h" | 
| #endif | 
| +#include "gpu/command_buffer/service/texture_manager.h" | 
| #include "ui/gfx/size.h" | 
| +using gpu::gles2::TextureManager; | 
| + | 
| GpuVideoDecodeAccelerator::GpuVideoDecodeAccelerator( | 
| IPC::Message::Sender* sender, | 
| int32 host_route_id, | 
| @@ -109,16 +112,16 @@ void GpuVideoDecodeAccelerator::Initialize( | 
| DCHECK(!video_decode_accelerator_.get()); | 
| DCHECK(!init_done_msg_); | 
| DCHECK(init_done_msg); | 
| + init_done_msg_ = init_done_msg; | 
| #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) | 
| DCHECK(stub_ && stub_->decoder()); | 
| - init_done_msg_ = init_done_msg; | 
| OmxVideoDecodeAccelerator* omx_decoder = new OmxVideoDecodeAccelerator(this); | 
| omx_decoder->SetEglState( | 
| gfx::GLSurfaceEGL::GetHardwareDisplay(), | 
| stub_->decoder()->GetGLContext()->GetHandle()); | 
| video_decode_accelerator_ = omx_decoder; | 
| video_decode_accelerator_->Initialize(profile); | 
| -#else | 
| +#else // Update RenderViewImpl::createMediaPlayer when adding clauses. | 
| NOTIMPLEMENTED() << "HW video decode acceleration not available."; | 
| NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); | 
| #endif // defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) | 
| @@ -136,9 +139,19 @@ void GpuVideoDecodeAccelerator::OnAssignPictureBuffers( | 
| const std::vector<gfx::Size>& sizes) { | 
| DCHECK(stub_ && stub_->decoder()); // Ensure already Initialize()'d. | 
| gpu::gles2::GLES2Decoder* command_decoder = stub_->decoder(); | 
| + gpu::gles2::TextureManager* texture_manager = | 
| + command_decoder->GetContextGroup()->texture_manager(); | 
| std::vector<media::PictureBuffer> buffers; | 
| for (uint32 i = 0; i < buffer_ids.size(); ++i) { | 
| + gpu::gles2::TextureManager::TextureInfo* info = | 
| 
Ami GONE FROM CHROMIUM
2011/11/30 00:08:37
The changes in this file are pulled out to http://
 | 
| + texture_manager->GetTextureInfo(texture_ids[i]); | 
| + if (!info || | 
| + !texture_manager->ClearRenderableLevels(command_decoder, info)) { | 
| + // TODO(fischman): send an error for invalid textures. | 
| + DLOG(DFATAL) << "Failed to Clear texture!"; | 
| + return; | 
| + } | 
| uint32 service_texture_id; | 
| if (!command_decoder->GetServiceTextureId( | 
| texture_ids[i], &service_texture_id)) { |