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

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

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.h
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.h b/content/common/gpu/client/command_buffer_proxy_impl.h
index b21c51c2b3c5e3e110e80ea4612d07a75d555d9b..75f9116e3a4e699f8057344700fed112b47435a1 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.h
+++ b/content/common/gpu/client/command_buffer_proxy_impl.h
@@ -18,6 +18,7 @@
#include "base/hash_tables.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "base/stl_util.h"
#include "content/common/gpu/client/gpu_video_decode_accelerator_host.h"
#include "gpu/command_buffer/common/command_buffer.h"
#include "gpu/command_buffer/common/command_buffer_shared.h"
@@ -50,7 +51,7 @@ class CommandBufferProxyImpl
// Note that the GpuVideoDecodeAccelerator may still fail to be created in
// the GPU process, even if this returns non-NULL. In this case the client is
// notified of an error later.
- scoped_refptr<GpuVideoDecodeAcceleratorHost> CreateVideoDecoder(
+ GpuVideoDecodeAcceleratorHost* CreateVideoDecoder(
media::VideoCodecProfile profile,
media::VideoDecodeAccelerator::Client* client);
@@ -107,7 +108,7 @@ class CommandBufferProxyImpl
private:
typedef std::map<int32, gpu::Buffer> TransferBufferMap;
- typedef std::map<int, scoped_refptr<GpuVideoDecodeAcceleratorHost> > Decoders;
+ typedef std::map<int, GpuVideoDecodeAcceleratorHost*> Decoders;
typedef base::hash_map<uint32, base::Closure> SignalTaskMap;
// Send an IPC message over the GPU channel. This is private to fully
@@ -133,6 +134,7 @@ class CommandBufferProxyImpl
// Zero or more video decoder hosts owned by this proxy, keyed by their
// decoder_route_id.
Decoders video_decoder_hosts_;
+ STLValueDeleter<Decoders> video_decoder_hosts_deleter_;
// The last cached state received from the service.
State last_state_;

Powered by Google App Engine
This is Rietveld 408576698