Index: content/common/gpu/gpu_channel_manager.cc |
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc |
index 9c12d1a321cc6608532e15bcffcff45f2bdb4f63..1469769a42bc7e31f51c74bc078d63179d3f6cf9 100644 |
--- a/content/common/gpu/gpu_channel_manager.cc |
+++ b/content/common/gpu/gpu_channel_manager.cc |
@@ -8,6 +8,7 @@ |
#include "content/common/child_thread.h" |
#include "content/common/gpu/gpu_channel.h" |
#include "content/common/gpu/gpu_messages.h" |
+#include "content/common/gpu/gpu_memory_manager.h" |
GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread, |
GpuWatchdog* watchdog, |
@@ -17,6 +18,8 @@ GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread, |
io_message_loop_(io_message_loop), |
shutdown_event_(shutdown_event), |
gpu_child_thread_(gpu_child_thread), |
+ ALLOW_THIS_IN_INITIALIZER_LIST(gpu_memory_manager_( |
nduca
2012/01/27 10:10:13
not sure if this is the ideal way to do this... yo
mmocny
2012/01/27 19:51:33
Changed to store by value.
On 2012/01/27 10:10:13,
|
+ new GpuMemoryManager(this))), |
watchdog_(watchdog) { |
DCHECK(gpu_child_thread); |
DCHECK(io_message_loop); |
@@ -53,6 +56,15 @@ GpuChannel* GpuChannelManager::LookupChannel(int32 client_id) { |
return iter->second; |
} |
+std::vector<GpuChannel*> GpuChannelManager::GetChannels() const { |
nduca
2012/01/27 10:10:13
Return the map? You're incurring a copy here.
|
+ std::vector<GpuChannel*> ret; |
+ for (GpuChannelMap::const_iterator it = gpu_channels_.begin(); |
+ it != gpu_channels_.end(); ++it ) { |
+ ret.push_back(it->second); |
+ } |
+ return ret; |
+} |
+ |
bool GpuChannelManager::OnMessageReceived(const IPC::Message& msg) { |
bool msg_is_ok = true; |
bool handled = true; |