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

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

Issue 10852009: Clarify ownership of GpuVideoDecodeAcceleratorHost and avoid crash on context loss. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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
« no previous file with comments | « no previous file | content/common/gpu/client/command_buffer_proxy_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7f77463996cf488ba6b001e019e65b4b94c0b23e..600d267218c7507343cdf962ed6902e76b9b7b74 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.h
+++ b/content/common/gpu/client/command_buffer_proxy_impl.h
@@ -107,7 +107,7 @@ class CommandBufferProxyImpl
private:
typedef std::map<int32, gpu::Buffer> TransferBufferMap;
- typedef std::map<int, GpuVideoDecodeAcceleratorHost*> Decoders;
+ typedef std::map<int, base::WeakPtr<GpuVideoDecodeAcceleratorHost> > Decoders;
typedef base::hash_map<uint32, base::Closure> SignalTaskMap;
// Send an IPC message over the GPU channel. This is private to fully
@@ -130,8 +130,8 @@ class CommandBufferProxyImpl
// Local cache of id to transfer buffer mapping.
TransferBufferMap transfer_buffers_;
- // Zero or more video decoder hosts owned by this proxy, keyed by their
- // decoder_route_id.
+ // Zero or more (unowned!) video decoder hosts using this proxy, keyed by
+ // their decoder_route_id.
Decoders video_decoder_hosts_;
// The last cached state received from the service.
« no previous file with comments | « no previous file | content/common/gpu/client/command_buffer_proxy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698