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

Unified Diff: content/common/gpu/client/command_buffer_proxy_impl.cc

Issue 10749019: VideoDecodeAccelerator now SupportsWeakPtr instead of being RefCountedThreadSafe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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/common/gpu/client/command_buffer_proxy_impl.cc
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc
index 80e0b1c9f6f88f67fbd3faf7fd1a137e09865b91..ebbc909b9d524c5dd0b291929080b05a94c8460d 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.cc
+++ b/content/common/gpu/client/command_buffer_proxy_impl.cc
@@ -29,7 +29,8 @@ using gpu::Buffer;
CommandBufferProxyImpl::CommandBufferProxyImpl(
GpuChannelHost* channel,
int route_id)
- : shared_state_(NULL),
+ : video_decoder_hosts_deleter_(&video_decoder_hosts_),
piman 2012/07/17 17:14:28 So, doesn't this mean that when the CommandBufferP
Ami GONE FROM CHROMIUM 2012/07/17 17:58:50 Done.
+ shared_state_(NULL),
channel_(channel),
route_id_(route_id),
flush_count_(0),
@@ -483,7 +484,7 @@ void CommandBufferProxyImpl::SetNotifyRepaintTask(const base::Closure& task) {
notify_repaint_task_ = task;
}
-scoped_refptr<GpuVideoDecodeAcceleratorHost>
+GpuVideoDecodeAcceleratorHost*
CommandBufferProxyImpl::CreateVideoDecoder(
media::VideoCodecProfile profile,
media::VideoDecodeAccelerator::Client* client) {
@@ -499,13 +500,13 @@ CommandBufferProxyImpl::CreateVideoDecoder(
return NULL;
}
- scoped_refptr<GpuVideoDecodeAcceleratorHost> decoder_host =
+ GpuVideoDecodeAcceleratorHost* decoder_host =
new GpuVideoDecodeAcceleratorHost(channel_, decoder_route_id, client);
bool inserted = video_decoder_hosts_.insert(std::make_pair(
decoder_route_id, decoder_host)).second;
DCHECK(inserted);
- channel_->AddRoute(decoder_route_id, decoder_host->AsWeakPtr());
+ channel_->AddRoute(decoder_route_id, base::AsWeakPtr(decoder_host));
return decoder_host;
}

Powered by Google App Engine
This is Rietveld 408576698