Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(520)

Unified Diff: content/renderer/gpu/command_buffer_proxy.cc

Issue 7361010: Enable fire-and-forget Destroy of HW video decoder, and misc other improvements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: vrk CR responses. Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/gpu/command_buffer_proxy.cc
diff --git a/content/renderer/gpu/command_buffer_proxy.cc b/content/renderer/gpu/command_buffer_proxy.cc
index 42949b673f249c8daebd65294a11beb68556f936..f9fe8d52553bf676c1926dc650e28c4400e4652a 100644
--- a/content/renderer/gpu/command_buffer_proxy.cc
+++ b/content/renderer/gpu/command_buffer_proxy.cc
@@ -50,7 +50,7 @@ bool CommandBufferProxy::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
- if (!handled && video_decoder_host_.get())
+ if (!handled && video_decoder_host_)
handled = video_decoder_host_->OnMessageReceived(message);
DCHECK(handled);
@@ -386,19 +386,20 @@ void CommandBufferProxy::SetNotifyRepaintTask(Task* task) {
notify_repaint_task_.reset(task);
}
-GpuVideoDecodeAcceleratorHost* CommandBufferProxy::CreateVideoDecoder(
+scoped_refptr<GpuVideoDecodeAcceleratorHost>
+CommandBufferProxy::CreateVideoDecoder(
const std::vector<uint32>& configs,
gpu::CommandBufferHelper* cmd_buffer_helper,
media::VideoDecodeAccelerator::Client* client) {
- video_decoder_host_.reset(new GpuVideoDecodeAcceleratorHost(
- channel_, route_id_, cmd_buffer_helper, client));
+ video_decoder_host_ = new GpuVideoDecodeAcceleratorHost(
+ channel_, route_id_, cmd_buffer_helper, client);
if (!Send(new GpuCommandBufferMsg_CreateVideoDecoder(route_id_, configs))) {
LOG(ERROR) << "Send(GpuChannelMsg_CreateVideoDecoder) failed";
- video_decoder_host_.reset();
+ video_decoder_host_ = NULL;
}
- return video_decoder_host_.get();
+ return video_decoder_host_;
}
#if defined(OS_MACOSX)

Powered by Google App Engine
This is Rietveld 408576698