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

Unified Diff: content/common/gpu/gpu_channel_manager.h

Issue 9289052: Adding GpuMemoryManager to track GpuCommandBufferStub visibility and last_used_time and dictate mem… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Changing to use gpu_memory_allocation.h file so it lands first Created 8 years, 11 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/gpu_channel_manager.h
diff --git a/content/common/gpu/gpu_channel_manager.h b/content/common/gpu/gpu_channel_manager.h
index f48c53803aaee951895043509ec8507f001a0584..36b3abe78833dc08103d168a967ecf956c84347e 100644
--- a/content/common/gpu/gpu_channel_manager.h
+++ b/content/common/gpu/gpu_channel_manager.h
@@ -8,6 +8,7 @@
#include "base/hash_tables.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop_proxy.h"
#include "build/build_config.h"
@@ -15,6 +16,8 @@
#include "ipc/ipc_message.h"
#include "ui/gfx/native_widget_types.h"
+#include <vector>
+
namespace base {
class WaitableEvent;
}
@@ -26,6 +29,7 @@ struct ChannelHandle;
class ChildThread;
class GpuChannel;
class GpuWatchdog;
+class GpuMemoryManager;
struct GPUCreateCommandBufferConfig;
// A GpuChannelManager is a thread responsible for issuing rendering commands
@@ -64,7 +68,10 @@ class GpuChannelManager : public IPC::Channel::Listener,
void AddRoute(int32 routing_id, IPC::Channel::Listener* listener);
void RemoveRoute(int32 routing_id);
+ GpuMemoryManager* GetGpuMemoryManager() { return gpu_memory_manager_.get(); }
nduca 2012/01/27 10:10:13 Is this our convention in chrome? I thought it was
+
GpuChannel* LookupChannel(int32 client_id);
+ std::vector<GpuChannel*> GetChannels() const;
private:
// Message handlers.
@@ -91,6 +98,7 @@ class GpuChannelManager : public IPC::Channel::Listener,
// process.
typedef base::hash_map<int, scoped_refptr<GpuChannel> > GpuChannelMap;
GpuChannelMap gpu_channels_;
+ scoped_ptr<GpuMemoryManager> gpu_memory_manager_;
GpuWatchdog* watchdog_;
DISALLOW_COPY_AND_ASSIGN(GpuChannelManager);

Powered by Google App Engine
This is Rietveld 408576698