| 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..161b7b5510c44a5f0d97d84f4531a154caae23e7 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,16 @@ void GpuChildThread::OnCollectGraphicsInfo() {
|
| Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_));
|
| }
|
|
|
| +void GpuChildThread::OnGetMemStats() {
|
| + // TODO - call into gpu_channel_manager_->gpu_memory_manager() to get the
|
| + // data needed to populate stats. For now, just lie.
|
| + content::GpuMemStats stats;
|
| + stats.currently_allocated_bytes = 16*1024*1024;
|
| + stats.max_concurrently_allocated_bytes = 32*1024*1024;
|
| + stats.total_bytes = 64*1024*1024;
|
| + Send(new GpuHostMsg_MemStats(stats));
|
| +}
|
| +
|
| void GpuChildThread::OnClean() {
|
| VLOG(1) << "GPU: Removing all contexts";
|
| if (gpu_channel_manager_.get())
|
|
|