Index: content/browser/renderer_host/render_widget_host_impl.cc |
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc |
index 5cb74b81de044e766d43d3eca2a2f7dd5e5c203e..fa663baa13ff5d2cdce4be1f0b4c87b30e3d35c6 100644 |
--- a/content/browser/renderer_host/render_widget_host_impl.cc |
+++ b/content/browser/renderer_host/render_widget_host_impl.cc |
@@ -2502,6 +2502,20 @@ void RenderWidgetHostImpl::DetachDelegate() { |
} |
void RenderWidgetHostImpl::FrameSwapped(const ui::LatencyInfo& latency_info) { |
+ ui::LatencyInfo::LatencyMap::const_iterator l = |
+ latency_info.latency_components.find(std::make_pair( |
+ ui::INPUT_EVENT_LATENCY_COMPONENT, GetLatencyComponentId())); |
+ if (l == latency_info.latency_components.end()) |
+ return; |
+ |
+ rendering_stats_.input_event_count += l->second.event_count; |
+ rendering_stats_.total_input_latency += |
+ l->second.event_count * |
+ (latency_info.swap_timestamp - l->second.event_time); |
+ |
+ if (CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kEnableGpuBenchmarking)) |
+ Send(new ViewMsg_SetBrowserRenderingStats(routing_id_, rendering_stats_)); |
} |
} // namespace content |