diff options
author | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-01 23:52:11 +0000 |
---|---|---|
committer | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-01 23:52:11 +0000 |
commit | 07cb03a3088dda659d66522c69bbedef677f195e (patch) | |
tree | b9392e1945f3a9d4608862e52f055a4112e4e665 /content/gpu | |
parent | e83c53f70b0bbd51d16d60f13e02b036bece6be4 (diff) | |
download | chromium_src-07cb03a3088dda659d66522c69bbedef677f195e.zip chromium_src-07cb03a3088dda659d66522c69bbedef677f195e.tar.gz chromium_src-07cb03a3088dda659d66522c69bbedef677f195e.tar.bz2 |
Add override message to divide GPU memory among windows.
The "number of windows" message is to be sent from the browser process, which is much more reliable than trying to reverse-engineer it from visibility messages asynchronously coming from WebKit.
BUG=146448
Review URL: https://chromiumcodereview.appspot.com/11031009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159591 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/gpu')
-rw-r--r-- | content/gpu/gpu_child_thread.cc | 7 | ||||
-rw-r--r-- | content/gpu/gpu_child_thread.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc index 952dbc1..bb69b45 100644 --- a/content/gpu/gpu_child_thread.cc +++ b/content/gpu/gpu_child_thread.cc @@ -100,6 +100,8 @@ bool GpuChildThread::OnControlMessageReceived(const IPC::Message& msg) { IPC_MESSAGE_HANDLER(GpuMsg_CollectGraphicsInfo, OnCollectGraphicsInfo) IPC_MESSAGE_HANDLER(GpuMsg_GetVideoMemoryUsageStats, OnGetVideoMemoryUsageStats) + IPC_MESSAGE_HANDLER(GpuMsg_SetVideoMemoryWindowCount, + OnSetVideoMemoryWindowCount) IPC_MESSAGE_HANDLER(GpuMsg_Clean, OnClean) IPC_MESSAGE_HANDLER(GpuMsg_Crash, OnCrash) IPC_MESSAGE_HANDLER(GpuMsg_Hang, OnHang) @@ -219,6 +221,11 @@ void GpuChildThread::OnGetVideoMemoryUsageStats() { Send(new GpuHostMsg_VideoMemoryUsageStats(video_memory_usage_stats)); } +void GpuChildThread::OnSetVideoMemoryWindowCount(uint32 window_count) { + if (gpu_channel_manager_.get()) + gpu_channel_manager_->gpu_memory_manager()->SetWindowCount(window_count); +} + void GpuChildThread::OnClean() { VLOG(1) << "GPU: Removing all contexts"; if (gpu_channel_manager_.get()) diff --git a/content/gpu/gpu_child_thread.h b/content/gpu/gpu_child_thread.h index 3590cf3..051f371 100644 --- a/content/gpu/gpu_child_thread.h +++ b/content/gpu/gpu_child_thread.h @@ -53,6 +53,8 @@ class GpuChildThread : public ChildThread { void OnInitialize(); void OnCollectGraphicsInfo(); void OnGetVideoMemoryUsageStats(); + void OnSetVideoMemoryWindowCount(uint32 window_count); + void OnClean(); void OnCrash(); void OnHang(); |