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

Unified Diff: content/gpu/gpu_child_thread.cc

Issue 10702200: PyAuto test for GPU memory consumption (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/gpu/gpu_child_thread.cc
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
index 76f482efcc4052d0d60d2ac1a5badf965e9e549a..d63925f4e606ff9d02cfe1b4d4644592e67f1c2c 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -98,6 +98,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_GetMemStats, OnGetMemStats)
IPC_MESSAGE_HANDLER(GpuMsg_Clean, OnClean)
IPC_MESSAGE_HANDLER(GpuMsg_Crash, OnCrash)
IPC_MESSAGE_HANDLER(GpuMsg_Hang, OnHang)
@@ -216,6 +217,13 @@ void GpuChildThread::OnCollectGraphicsInfo() {
Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_));
}
+void GpuChildThread::OnGetMemStats() {
+ content::GpuMemStats stats;
+ if (gpu_channel_manager_.get())
+ gpu_channel_manager_->gpu_memory_manager()->GetMemStats(stats);
+ Send(new GpuHostMsg_MemStats(stats));
+}
+
void GpuChildThread::OnClean() {
VLOG(1) << "GPU: Removing all contexts";
if (gpu_channel_manager_.get())

Powered by Google App Engine
This is Rietveld 408576698