Chromium Code Reviews| Index: content/common/gpu/client/gpu_channel_host.cc |
| diff --git a/content/common/gpu/client/gpu_channel_host.cc b/content/common/gpu/client/gpu_channel_host.cc |
| index b225a3ad11c110e2d8b3183d837edb291b425db7..ea3e87f9a62fffe52298faf0f8fbb2c2a004095e 100644 |
| --- a/content/common/gpu/client/gpu_channel_host.cc |
| +++ b/content/common/gpu/client/gpu_channel_host.cc |
| @@ -214,6 +214,21 @@ void GpuChannelHost::DestroyCommandBuffer( |
| #endif |
| } |
| +bool GpuChannelHost::CollectRenderingStats( |
| + int surface_id, content::GpuRenderingStats* stats) { |
|
piman
2012/08/30 22:44:11
At a high level, why restricting here to "view" co
|
| + TRACE_EVENT0("gpu", "GpuChannelHost::CollectRenderingStats"); |
| + |
| + AutoLock lock(context_lock_); |
| + // An error occurred. Need to get the host again to reinitialize it. |
| + if (!channel_.get()) |
|
piman
2012/08/30 22:44:11
Why this? I think it's racy if called on a non-mai
|
| + return false; |
| + |
| + if (!Send(new GpuChannelMsg_CollectRenderingStats(surface_id, stats))) |
| + return false; |
| + |
| + return true; |
| +} |
| + |
| void GpuChannelHost::AddRoute( |
| int route_id, base::WeakPtr<IPC::Listener> listener) { |
| DCHECK(MessageLoopProxy::current()); |