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..2d23ecf85233b3a028e07d87af06f0d914e879bd 100644 |
--- a/content/common/gpu/client/gpu_channel_host.cc |
+++ b/content/common/gpu/client/gpu_channel_host.cc |
@@ -214,6 +214,26 @@ void GpuChannelHost::DestroyCommandBuffer( |
#endif |
} |
+bool GpuChannelHost::CollectRenderingStats( |
+ int surface_id, content::GpuRenderingStats& stats) { |
+ TRACE_EVENT0("gpu", "GpuChannelHost::CollectRenderingStats"); |
+ |
+#if defined(ENABLE_GPU) |
+ AutoLock lock(context_lock_); |
+ // An error occurred. Need to get the host again to reinitialize it. |
+ if (!channel_.get()) |
+ return false; |
+ |
+ if (!Send(new GpuChannelMsg_CollectRenderingStats(surface_id, &stats))) { |
apatrick_chromium
2012/08/28 20:07:06
No need for braces here.
|
+ return false; |
+ } |
+ |
+ return true; |
+#else |
+ return false; |
+#endif |
+} |
+ |
void GpuChannelHost::AddRoute( |
int route_id, base::WeakPtr<IPC::Listener> listener) { |
DCHECK(MessageLoopProxy::current()); |