summaryrefslogtreecommitdiffstats
path: root/content/gpu
diff options
context:
space:
mode:
authoramarinichev@chromium.org <amarinichev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-04 20:48:52 +0000
committeramarinichev@chromium.org <amarinichev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-04 20:48:52 +0000
commit184e3f380720a7b3a1d101c41fe3904815f138cb (patch)
tree7887de9d92f88cea906545becc04cd382490e941 /content/gpu
parent8707ec8224366e91d75dfbcbb03cf11161fcc6bc (diff)
downloadchromium_src-184e3f380720a7b3a1d101c41fe3904815f138cb.zip
chromium_src-184e3f380720a7b3a1d101c41fe3904815f138cb.tar.gz
chromium_src-184e3f380720a7b3a1d101c41fe3904815f138cb.tar.bz2
Added about:gpuclean
It removes all contexts from the GPU process. Can rename it to what was originally suggested in the bug, about:gpuclean seemed a little more consistent with other about:gpu* URLs we have. BUG=75215 TEST=tried it Review URL: http://codereview.chromium.org/6870019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84119 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/gpu')
-rw-r--r--content/gpu/gpu_child_thread.cc7
-rw-r--r--content/gpu/gpu_child_thread.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
index 14bd90b..c9a5acd 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -102,6 +102,7 @@ bool GpuChildThread::OnControlMessageReceived(const IPC::Message& msg) {
IPC_BEGIN_MESSAGE_MAP_EX(GpuChildThread, msg, msg_is_ok)
IPC_MESSAGE_HANDLER(GpuMsg_Initialize, OnInitialize)
IPC_MESSAGE_HANDLER(GpuMsg_CollectGraphicsInfo, OnCollectGraphicsInfo)
+ IPC_MESSAGE_HANDLER(GpuMsg_Clean, OnClean)
IPC_MESSAGE_HANDLER(GpuMsg_Crash, OnCrash)
IPC_MESSAGE_HANDLER(GpuMsg_Hang, OnHang)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -232,6 +233,12 @@ void GpuChildThread::OnCollectGraphicsInfo() {
Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_));
}
+void GpuChildThread::OnClean() {
+ LOG(INFO) << "GPU: Removing all contexts";
+ if (gpu_channel_manager_.get())
+ gpu_channel_manager_->LoseAllContexts();
+}
+
void GpuChildThread::OnCrash() {
LOG(INFO) << "GPU: Simulating GPU crash";
// Good bye, cruel world.
diff --git a/content/gpu/gpu_child_thread.h b/content/gpu/gpu_child_thread.h
index b8853fa..94a9bdf 100644
--- a/content/gpu/gpu_child_thread.h
+++ b/content/gpu/gpu_child_thread.h
@@ -60,6 +60,7 @@ class GpuChildThread : public ChildThread {
// Message handlers.
void OnInitialize();
void OnCollectGraphicsInfo();
+ void OnClean();
void OnCrash();
void OnHang();