diff options
Diffstat (limited to 'content')
18 files changed, 55 insertions, 173 deletions
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc index b7a8349..72d822b 100644 --- a/content/common/gpu/gpu_channel.cc +++ b/content/common/gpu/gpu_channel.cc @@ -18,7 +18,6 @@ #include "content/common/gpu/gpu_messages.h" #include "content/common/gpu/gpu_video_service.h" #include "content/common/gpu/transport_texture.h" -#include "ui/gfx/gl/gl_context.h" #include "ui/gfx/gl/gl_surface.h" #if defined(OS_POSIX) @@ -206,8 +205,6 @@ bool GpuChannel::OnControlMessageReceived(const IPC::Message& msg) { OnDestroyVideoDecoder) IPC_MESSAGE_HANDLER(GpuChannelMsg_CreateTransportTexture, OnCreateTransportTexture) - IPC_MESSAGE_HANDLER(GpuChannelMsg_AssignTexturesToVideoDecoder, - OnAssignTexturesToVideoDecoder) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() DCHECK(handled); @@ -298,26 +295,24 @@ void GpuChannel::OnDestroySurface(int route_id) { #endif } -void GpuChannel::OnCreateVideoDecoder(int32 decoder_host_id, - uint32 command_buffer_route_id, - const std::vector<uint32>& configs) { +void GpuChannel::OnCreateVideoDecoder( + int32 decoder_host_id, const std::vector<uint32>& configs) { +// TODO(cevans): do NOT re-enable this until GpuVideoService has been checked +// for integer overflows, including the classic "width * height" overflow. +#if 0 + VLOG(1) << "GpuChannel::OnCreateVideoDecoder"; GpuVideoService* service = GpuVideoService::GetInstance(); if (service == NULL) { // TODO(hclam): Need to send a failure message. return; } - GpuCommandBufferStub* stub = stubs_.Lookup(command_buffer_route_id); - // TODO(vrk): Need to notify renderer that given route is invalid. - if (!stub) - return; - int32 decoder_id = GenerateRouteID(); bool ret = service->CreateVideoDecoder( - this, &router_, decoder_host_id, decoder_id, stub->scheduler()->decoder(), - configs); + this, &router_, decoder_host_id, decoder_id, configs); DCHECK(ret) << "Failed to create a GpuVideoDecodeAccelerator"; +#endif } void GpuChannel::OnDestroyVideoDecoder(int32 decoder_id) { @@ -346,16 +341,7 @@ void GpuChannel::OnCreateTransportTexture(int32 context_route_id, host_id, route_id); Send(msg); #endif -} - -void GpuChannel::OnAssignTexturesToVideoDecoder( - int32 decoder_id, - const std::vector<int32>& buffer_ids, - const std::vector<uint32>& texture_ids, - const std::vector<gfx::Size>& sizes) { - GpuVideoService* service = GpuVideoService::GetInstance(); - service->AssignTexturesToDecoder(decoder_id, buffer_ids, texture_ids, sizes); -} + } bool GpuChannel::Init(base::MessageLoopProxy* io_message_loop, base::WaitableEvent* shutdown_event) { diff --git a/content/common/gpu/gpu_channel.h b/content/common/gpu/gpu_channel.h index a7bf112..d0632bd 100644 --- a/content/common/gpu/gpu_channel.h +++ b/content/common/gpu/gpu_channel.h @@ -127,16 +127,10 @@ class GpuChannel : public IPC::Channel::Listener, void OnDestroySurface(int route_id); void OnCreateVideoDecoder(int32 decoder_host_id, - uint32 command_buffer_route_id, const std::vector<uint32>& configs); void OnDestroyVideoDecoder(int32 decoder_id); void OnCreateTransportTexture(int32 context_route_id, int32 host_id); - void OnAssignTexturesToVideoDecoder(int32 decoder_id, - const std::vector<int32>& buffer_ids, - const std::vector<uint32>& texture_ids, - const std::vector<gfx::Size>& sizes); - // The lifetime of objects of this class is managed by a GpuChannelManager. // The GpuChannelManager destroy all the GpuChannels that they own when they // are destroyed. So a raw pointer is safe. diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h index bd390c2..98f838e 100644 --- a/content/common/gpu/gpu_messages.h +++ b/content/common/gpu/gpu_messages.h @@ -261,9 +261,8 @@ IPC_MESSAGE_CONTROL1(GpuChannelMsg_DestroySurface, // Create hardware video decoder && associate it with the output |decoder_id|; // We need this to be control message because we had to map the GpuChannel and // |decoder_id|. -IPC_MESSAGE_CONTROL3(GpuChannelMsg_CreateVideoDecoder, +IPC_MESSAGE_CONTROL2(GpuChannelMsg_CreateVideoDecoder, int32, /* decoder_id */ - uint32, /* command buffer route id*/ std::vector<uint32>) /* configs */ // Release all resource of the hardware video decoder which was assocaited @@ -277,13 +276,6 @@ IPC_MESSAGE_CONTROL2(GpuChannelMsg_CreateTransportTexture, int32, /* context_route_id */ int32 /* host_id */) -// Sent from Renderer process to the GPU process to give the texture IDs for -// the textures the decoder will use for output. -IPC_MESSAGE_CONTROL4(GpuChannelMsg_AssignTexturesToVideoDecoder, - int32, /* Decoder ID */ - std::vector<int32>, /* Picture buffer ID */ - std::vector<uint32>, /* Texture ID */ - std::vector<gfx::Size>) /* Size */ //------------------------------------------------------------------------------ // GPU Command Buffer Messages // These are messages between a renderer process to the GPU process relating to @@ -424,6 +416,14 @@ IPC_MESSAGE_ROUTED3(AcceleratedVideoDecoderMsg_Decode, base::SharedMemoryHandle, /* input_buffer_handle */ int32) /* size */ +// Sent from Renderer process to the GPU process to give the texture IDs for +// the textures the decoder will use for output. +IPC_MESSAGE_ROUTED4(AcceleratedVideoDecoderMsg_AssignGLESBuffers, + std::vector<int32>, /* Picture buffer ID */ + std::vector<uint32>, /* Texture ID */ + std::vector<uint32>, /* Context ID */ + std::vector<gfx::Size>) /* Size */ + // Sent from Renderer process to the GPU process to give the system memory // buffers that the decoder will use for output. // diff --git a/content/common/gpu/gpu_video_decode_accelerator.cc b/content/common/gpu/gpu_video_decode_accelerator.cc index 5a19b8a..646fd57 100644 --- a/content/common/gpu/gpu_video_decode_accelerator.cc +++ b/content/common/gpu/gpu_video_decode_accelerator.cc @@ -32,6 +32,8 @@ bool GpuVideoDecodeAccelerator::OnMessageReceived(const IPC::Message& msg) { IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_Decode, OnDecode) IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_AssignSysmemBuffers, OnAssignSysmemBuffers) + IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_AssignGLESBuffers, + OnAssignGLESBuffers) IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_ReusePictureBuffer, OnReusePictureBuffer) IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_Flush, OnFlush) @@ -120,11 +122,13 @@ void GpuVideoDecodeAccelerator::OnDecode(int32 id, video_decode_accelerator_->Decode(media::BitstreamBuffer(id, handle, size)); } -void GpuVideoDecodeAccelerator::AssignGLESBuffers( - const std::vector<media::GLESBuffer>& buffers) { - if (!video_decode_accelerator_.get()) - return; - video_decode_accelerator_->AssignGLESBuffers(buffers); +void GpuVideoDecodeAccelerator::OnAssignGLESBuffers( + const std::vector<int32> buffer_ids, + const std::vector<uint32> texture_ids, + const std::vector<uint32> context_ids, + const std::vector<gfx::Size> sizes) { + // TODO(vrk): Implement. + NOTIMPLEMENTED(); } void GpuVideoDecodeAccelerator::OnAssignSysmemBuffers( diff --git a/content/common/gpu/gpu_video_decode_accelerator.h b/content/common/gpu/gpu_video_decode_accelerator.h index ffa855a..383cbc9 100644 --- a/content/common/gpu/gpu_video_decode_accelerator.h +++ b/content/common/gpu/gpu_video_decode_accelerator.h @@ -50,14 +50,16 @@ class GpuVideoDecodeAccelerator video_decode_accelerator_.reset(accelerator); } - void AssignGLESBuffers(const std::vector<media::GLESBuffer>& buffers); - private: // Handlers for IPC messages. void OnGetConfigs(const std::vector<uint32>& config, std::vector<uint32>* configs); void OnInitialize(const std::vector<uint32>& configs); void OnDecode(int32 id, base::SharedMemoryHandle handle, int32 size); + void OnAssignGLESBuffers(const std::vector<int32> buffer_ids, + const std::vector<uint32> texture_ids, + const std::vector<uint32> context_ids, + const std::vector<gfx::Size> sizes); void OnAssignSysmemBuffers(const std::vector<int32> buffer_ids, const std::vector<base::SharedMemoryHandle> data, const std::vector<gfx::Size> sizes); diff --git a/content/common/gpu/gpu_video_service.cc b/content/common/gpu/gpu_video_service.cc index 9b5c0e6..26814f5 100644 --- a/content/common/gpu/gpu_video_service.cc +++ b/content/common/gpu/gpu_video_service.cc @@ -7,11 +7,9 @@ #include "content/common/gpu/gpu_channel.h" #include "content/common/gpu/gpu_messages.h" #include "content/common/gpu/gpu_video_decode_accelerator.h" -#include "gpu/command_buffer/service/gles2_cmd_decoder.h" #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) #include "content/common/gpu/omx_video_decode_accelerator.h" -#include "ui/gfx/gl/gl_surface_egl.h" #endif // defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) GpuVideoService::GpuVideoService() { @@ -59,23 +57,16 @@ bool GpuVideoService::CreateVideoDecoder( MessageRouter* router, int32 decoder_host_id, int32 decoder_id, - gpu::gles2::GLES2Decoder* command_decoder, const std::vector<uint32>& configs) { // Create GpuVideoDecodeAccelerator and add to map. scoped_refptr<GpuVideoDecodeAccelerator> decoder = new GpuVideoDecodeAccelerator(channel, decoder_host_id); - #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) - OmxVideoDecodeAccelerator* omx_decoder = - new OmxVideoDecodeAccelerator(decoder, MessageLoop::current()); - omx_decoder->SetEglState(gfx::GLSurfaceEGL::GetDisplay(), - command_decoder->GetGLContext()->GetHandle()); - decoder->set_video_decode_accelerator(omx_decoder); - + decoder->set_video_decode_accelerator( + new OmxVideoDecodeAccelerator(decoder, MessageLoop::current())); #endif // defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) - bool result = decoder_map_.insert(std::make_pair( - decoder_id, VideoDecoderInfo(decoder, command_decoder))).second; + bool result = decoder_map_.insert(std::make_pair(decoder_id, decoder)).second; // Decoder ID is a unique ID determined by GpuVideoServiceHost. // We should always be adding entries here. @@ -97,35 +88,3 @@ void GpuVideoService::DestroyVideoDecoder( router->RemoveRoute(decoder_id); decoder_map_.erase(decoder_id); } - -void GpuVideoService::AssignTexturesToDecoder( - int32 decoder_id, - const std::vector<int32>& buffer_ids, - const std::vector<uint32>& texture_ids, - const std::vector<gfx::Size>& sizes) { - std::vector<media::GLESBuffer> buffers; - for (uint32 i = 0; i < buffer_ids.size(); ++i) { - uint32 service_texture_id; - bool result = TranslateTextureForDecoder( - decoder_id, texture_ids[i], &service_texture_id); - // TODO(vrk): Send an error for invalid GLES buffers. - if (!result) - return; - buffers.push_back( - media::GLESBuffer(buffer_ids[i], sizes[i], service_texture_id)); - } - - DecoderMap::iterator it = decoder_map_.find(decoder_id); - DCHECK(it != decoder_map_.end()); - it->second.video_decoder->AssignGLESBuffers(buffers); -} - -bool GpuVideoService::TranslateTextureForDecoder( - int32 decoder_id, uint32 client_texture_id, uint32* service_texture_id) { - DecoderMap::iterator it = decoder_map_.find(decoder_id); - if (it == decoder_map_.end()) - return false; - it->second.command_decoder->MakeCurrent(); - return it->second.command_decoder->GetServiceTextureId( - client_texture_id, service_texture_id); -} diff --git a/content/common/gpu/gpu_video_service.h b/content/common/gpu/gpu_video_service.h index 43e5833..44090c4 100644 --- a/content/common/gpu/gpu_video_service.h +++ b/content/common/gpu/gpu_video_service.h @@ -12,12 +12,6 @@ #include "content/common/gpu/gpu_video_decode_accelerator.h" #include "ipc/ipc_channel.h" -namespace gpu { -namespace gles2 { -class GLES2Decoder; -} // namespace gles2 -} // namespace gpu - class GpuChannel; class MessageRouter; @@ -35,43 +29,20 @@ class GpuVideoService : public IPC::Channel::Listener { MessageRouter* router, int32 decoder_host_id, int32 decoder_id, - gpu::gles2::GLES2Decoder* command_decoder, const std::vector<uint32>& configs); void DestroyVideoDecoder(MessageRouter* router, int32 decoder_id); - // Passes given GLES textures to the decoder indicated by id. - void AssignTexturesToDecoder(int32 decoder_id, - const std::vector<int32>& buffer_ids, - const std::vector<uint32>& texture_ids, - const std::vector<gfx::Size>& sizes); - private: - struct VideoDecoderInfo { - VideoDecoderInfo(scoped_refptr<GpuVideoDecodeAccelerator> g_v_d_a, - gpu::gles2::GLES2Decoder* g_d) - : video_decoder(g_v_d_a), - command_decoder(g_d) {} - scoped_refptr<GpuVideoDecodeAccelerator> video_decoder; - gpu::gles2::GLES2Decoder* command_decoder; - }; - // Map of video and command buffer decoders, indexed by video decoder id. - typedef std::map<int32, VideoDecoderInfo> DecoderMap; - GpuVideoService(); virtual ~GpuVideoService(); + std::map<int32, scoped_refptr<GpuVideoDecodeAccelerator> > decoder_map_; + // Specialize video service on different platform will override. virtual bool IntializeGpuVideoService(); virtual bool UnintializeGpuVideoService(); - // Translates a given client texture id to the "real" texture id as recognized - // in the GPU process. - bool TranslateTextureForDecoder( - int32 decoder_id, uint32 client_texture_id, uint32* service_texture_id); - - DecoderMap decoder_map_; - friend struct DefaultSingletonTraits<GpuVideoService>; DISALLOW_COPY_AND_ASSIGN(GpuVideoService); }; diff --git a/content/common/gpu/omx_video_decode_accelerator_unittest.cc b/content/common/gpu/omx_video_decode_accelerator_unittest.cc index fb358bc..691d6da 100644 --- a/content/common/gpu/omx_video_decode_accelerator_unittest.cc +++ b/content/common/gpu/omx_video_decode_accelerator_unittest.cc @@ -495,8 +495,10 @@ void EglRenderingVDAClient::ProvidePictureBuffers( base::WaitableEvent done(false, false); rendering_helper_->CreateTexture(rendering_window_id_, &texture_id, &done); done.Wait(); + // TODO(fischman): context_id is always 0. Can it be removed from the API? + // (since it's always inferrable from context). media::GLESBuffer* buffer = - new media::GLESBuffer(id, dimensions, texture_id); + new media::GLESBuffer(id, dimensions, texture_id, 0 /* context_id */); CHECK(picture_buffers_by_id_.insert(std::make_pair(id, buffer)).second); buffers.push_back(*buffer); } diff --git a/content/renderer/gpu/gpu_video_decode_accelerator_host.cc b/content/renderer/gpu/gpu_video_decode_accelerator_host.cc index 8a03cda..4ca5ca6 100644 --- a/content/renderer/gpu/gpu_video_decode_accelerator_host.cc +++ b/content/renderer/gpu/gpu_video_decode_accelerator_host.cc @@ -19,13 +19,11 @@ GpuVideoDecodeAcceleratorHost::GpuVideoDecodeAcceleratorHost( MessageRouter* router, IPC::Message::Sender* ipc_sender, int32 decoder_host_id, - uint32 command_buffer_route_id, VideoDecodeAccelerator::Client* client) : router_(router), ipc_sender_(ipc_sender), decoder_host_id_(decoder_host_id), decoder_id_(0), - command_buffer_route_id_(command_buffer_route_id), client_(client) { } @@ -81,7 +79,7 @@ bool GpuVideoDecodeAcceleratorHost::Initialize( configs_ = configs; if (!ipc_sender_->Send(new GpuChannelMsg_CreateVideoDecoder( - decoder_id_, command_buffer_route_id_, configs))) { + decoder_id_, configs))) { LOG(ERROR) << "Send(GpuChannelMsg_CreateVideoDecoder) failed"; return false; } @@ -105,15 +103,17 @@ void GpuVideoDecodeAcceleratorHost::AssignGLESBuffers( // Rearrange data for IPC command. std::vector<int32> buffer_ids; std::vector<uint32> texture_ids; + std::vector<uint32> context_ids; std::vector<gfx::Size> sizes; for (uint32 i = 0; i < buffers.size(); i++) { const media::GLESBuffer& buffer = buffers[i]; texture_ids.push_back(buffer.texture_id()); + context_ids.push_back(buffer.context_id()); buffer_ids.push_back(buffer.id()); sizes.push_back(buffer.size()); } - if (!ipc_sender_->Send(new GpuChannelMsg_AssignTexturesToVideoDecoder( - decoder_id_, buffer_ids, texture_ids, sizes))) { + if (!ipc_sender_->Send(new AcceleratedVideoDecoderMsg_AssignGLESBuffers( + decoder_id_, buffer_ids, texture_ids, context_ids, sizes))) { LOG(ERROR) << "Send(AcceleratedVideoDecoderMsg_AssignGLESBuffers) failed"; } } diff --git a/content/renderer/gpu/gpu_video_decode_accelerator_host.h b/content/renderer/gpu/gpu_video_decode_accelerator_host.h index 8b4a4c3..a7ac98f 100644 --- a/content/renderer/gpu/gpu_video_decode_accelerator_host.h +++ b/content/renderer/gpu/gpu_video_decode_accelerator_host.h @@ -25,7 +25,6 @@ class GpuVideoDecodeAcceleratorHost : public IPC::Channel::Listener, GpuVideoDecodeAcceleratorHost(MessageRouter* router, IPC::Message::Sender* ipc_sender, int32 decoder_host_id, - uint32 command_buffer_route_id, media::VideoDecodeAccelerator::Client* client); virtual ~GpuVideoDecodeAcceleratorHost(); @@ -76,10 +75,6 @@ class GpuVideoDecodeAcceleratorHost : public IPC::Channel::Listener, // ID of VideoDecodeAccelerator in the Gpu process. int32 decoder_id_; - // Route ID for the command buffer associated with the context the GPU Video - // Decoder uses. - uint32 command_buffer_route_id_; - // Temporarily store configs here in between Create and Initialize phase. std::vector<uint32> configs_; diff --git a/content/renderer/gpu/gpu_video_service_host.cc b/content/renderer/gpu/gpu_video_service_host.cc index 9b3fe22..0c629f8 100644 --- a/content/renderer/gpu/gpu_video_service_host.cc +++ b/content/renderer/gpu/gpu_video_service_host.cc @@ -71,11 +71,9 @@ void GpuVideoServiceHost::SetOnInitialized( } GpuVideoDecodeAcceleratorHost* GpuVideoServiceHost::CreateVideoAccelerator( - media::VideoDecodeAccelerator::Client* client, - int command_buffer_route_id) { + media::VideoDecodeAccelerator::Client* client) { base::AutoLock auto_lock(lock_); DCHECK(channel_); return new GpuVideoDecodeAcceleratorHost( - &router_, channel_, next_decoder_host_id_++, - command_buffer_route_id, client); + &router_, channel_, next_decoder_host_id_++, client); } diff --git a/content/renderer/gpu/gpu_video_service_host.h b/content/renderer/gpu/gpu_video_service_host.h index 83028c11..be3e44b 100644 --- a/content/renderer/gpu/gpu_video_service_host.h +++ b/content/renderer/gpu/gpu_video_service_host.h @@ -37,8 +37,7 @@ class GpuVideoServiceHost : public IPC::ChannelProxy::MessageFilter { // Called on RenderThread to create a hardware accelerated video decoder // in the GPU process. GpuVideoDecodeAcceleratorHost* CreateVideoAccelerator( - media::VideoDecodeAccelerator::Client* client, - int command_buffer_route_id); + media::VideoDecodeAccelerator::Client* client); private: // Guards all members other than |router_|. diff --git a/content/renderer/pepper_platform_context_3d_impl.cc b/content/renderer/pepper_platform_context_3d_impl.cc index acd19f6..5b7a59a 100644 --- a/content/renderer/pepper_platform_context_3d_impl.cc +++ b/content/renderer/pepper_platform_context_3d_impl.cc @@ -103,13 +103,8 @@ gpu::CommandBuffer* PlatformContext3DImpl::GetCommandBuffer() { return command_buffer_; } -int PlatformContext3DImpl::GetCommandBufferRouteId() { - DCHECK(command_buffer_); - return command_buffer_->route_id(); -} - void PlatformContext3DImpl::SetContextLostCallback(Callback0::Type* callback) { - context_lost_callback_.reset(callback); + context_lost_callback_.reset(callback); } void PlatformContext3DImpl::OnContextLost() { diff --git a/content/renderer/pepper_platform_context_3d_impl.h b/content/renderer/pepper_platform_context_3d_impl.h index c1a34aa..9968217 100644 --- a/content/renderer/pepper_platform_context_3d_impl.h +++ b/content/renderer/pepper_platform_context_3d_impl.h @@ -32,7 +32,6 @@ class PlatformContext3DImpl virtual void SetSwapBuffersCallback(Callback0::Type* callback); virtual unsigned GetBackingTextureId(); virtual gpu::CommandBuffer* GetCommandBuffer(); - virtual int GetCommandBufferRouteId(); virtual void SetContextLostCallback(Callback0::Type* callback); private: diff --git a/content/renderer/pepper_platform_video_decoder_impl.cc b/content/renderer/pepper_platform_video_decoder_impl.cc index 27fd963..7873bcf 100644 --- a/content/renderer/pepper_platform_video_decoder_impl.cc +++ b/content/renderer/pepper_platform_video_decoder_impl.cc @@ -17,11 +17,9 @@ using media::BitstreamBuffer; PlatformVideoDecoderImpl::PlatformVideoDecoderImpl( - VideoDecodeAccelerator::Client* client, uint32 command_buffer_route_id) + VideoDecodeAccelerator::Client* client) : client_(client), - command_buffer_route_id_(command_buffer_route_id), - decoder_(NULL), - message_loop_(NULL) { + decoder_(NULL) { DCHECK(client); } @@ -41,8 +39,6 @@ bool PlatformVideoDecoderImpl::Initialize(const std::vector<uint32>& config) { RenderThread* render_thread = RenderThread::current(); DCHECK(render_thread); - message_loop_ = MessageLoop::current(); - DCHECK(message_loop_); channel_ = render_thread->EstablishGpuChannelSync( content::CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); @@ -76,8 +72,7 @@ void PlatformVideoDecoderImpl::InitializeDecoder( return; } GpuVideoServiceHost* video_service = channel_->gpu_video_service_host(); - decoder_.reset(video_service->CreateVideoAccelerator( - this, command_buffer_route_id_)); + decoder_.reset(video_service->CreateVideoAccelerator(this)); // Send IPC message to initialize decoder in GPU process. decoder_->Initialize(configs); @@ -141,13 +136,6 @@ void PlatformVideoDecoderImpl::PictureReady(const media::Picture& picture) { } void PlatformVideoDecoderImpl::NotifyInitializeDone() { - if (message_loop_ != MessageLoop::current() ) { - message_loop_-> - PostTask(FROM_HERE, base::Bind( - &PlatformVideoDecoderImpl::NotifyInitializeDone, - base::Unretained(this))); - return; - } client_->NotifyInitializeDone(); } diff --git a/content/renderer/pepper_platform_video_decoder_impl.h b/content/renderer/pepper_platform_video_decoder_impl.h index eb8bf4e..4588ea7 100644 --- a/content/renderer/pepper_platform_video_decoder_impl.h +++ b/content/renderer/pepper_platform_video_decoder_impl.h @@ -9,7 +9,6 @@ #include "base/scoped_ptr.h" #include "base/memory/ref_counted.h" -#include "base/message_loop.h" #include "media/video/video_decode_accelerator.h" #include "webkit/plugins/ppapi/plugin_delegate.h" @@ -21,8 +20,7 @@ class PlatformVideoDecoderImpl public base::RefCountedThreadSafe<PlatformVideoDecoderImpl> { public: explicit PlatformVideoDecoderImpl( - media::VideoDecodeAccelerator::Client* client, - uint32 command_buffer_route_id); + media::VideoDecodeAccelerator::Client* client); virtual ~PlatformVideoDecoderImpl(); // PlatformVideoDecoder implementation. @@ -61,18 +59,12 @@ class PlatformVideoDecoderImpl // Client lifetime must exceed lifetime of this class. media::VideoDecodeAccelerator::Client* client_; - // Route ID for the command buffer associated with video decoder's context. - uint32 command_buffer_route_id_; - // Host for GpuVideoDecodeAccelerator. scoped_ptr<media::VideoDecodeAccelerator> decoder_; // Host for Gpu Channel. scoped_refptr<GpuChannelHost> channel_; - // Message loop on which plugin is initialized. - MessageLoop* message_loop_; - DISALLOW_COPY_AND_ASSIGN(PlatformVideoDecoderImpl); }; diff --git a/content/renderer/pepper_plugin_delegate_impl.cc b/content/renderer/pepper_plugin_delegate_impl.cc index 4367c4e..918ec5b 100644 --- a/content/renderer/pepper_plugin_delegate_impl.cc +++ b/content/renderer/pepper_plugin_delegate_impl.cc @@ -828,9 +828,8 @@ webkit::ppapi::PluginDelegate::PlatformContext3D* webkit::ppapi::PluginDelegate::PlatformVideoDecoder* PepperPluginDelegateImpl::CreateVideoDecoder( - media::VideoDecodeAccelerator::Client* client, - int command_buffer_route_id) { - return new PlatformVideoDecoderImpl(client, command_buffer_route_id); + media::VideoDecodeAccelerator::Client* client) { + return new PlatformVideoDecoderImpl(client); } void PepperPluginDelegateImpl::NumberOfFindResultsChanged(int identifier, diff --git a/content/renderer/pepper_plugin_delegate_impl.h b/content/renderer/pepper_plugin_delegate_impl.h index 2c7bf47..8f66680 100644 --- a/content/renderer/pepper_plugin_delegate_impl.h +++ b/content/renderer/pepper_plugin_delegate_impl.h @@ -179,8 +179,7 @@ class PepperPluginDelegateImpl virtual PlatformImage2D* CreateImage2D(int width, int height); virtual PlatformContext3D* CreateContext3D(); virtual PlatformVideoDecoder* CreateVideoDecoder( - media::VideoDecodeAccelerator::Client* client, - int command_buffer_route_id); + media::VideoDecodeAccelerator::Client* client); virtual PpapiBroker* ConnectToPpapiBroker( webkit::ppapi::PPB_Broker_Impl* client); virtual void NumberOfFindResultsChanged(int identifier, |