| 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..dc4b048235dfaa1642e67fa10047a5263273a88a 100644
|
| --- a/content/browser/renderer_host/render_widget_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
| @@ -2504,4 +2504,26 @@ void RenderWidgetHostImpl::DetachDelegate() {
|
| void RenderWidgetHostImpl::FrameSwapped(const ui::LatencyInfo& latency_info) {
|
| }
|
|
|
| +// static
|
| +void RenderWidgetHostImpl::CompositorFrameDrawn(
|
| + const ui::LatencyInfo& latency_info) {
|
| + for (ui::LatencyInfo::LatencyMap::const_iterator b =
|
| + latency_info.latency_components.begin();
|
| + b != latency_info.latency_components.end();
|
| + ++b) {
|
| + if (b->first.first != ui::INPUT_EVENT_LATENCY_COMPONENT)
|
| + continue;
|
| + // Matches with GetLatencyComponentId
|
| + int routing_id = b->first.second & 0xffffffff;
|
| + int process_id = (b->first.second >> 32) & 0xffffffff;
|
| + RenderProcessHost* host = RenderProcessHost::FromID(process_id);
|
| + if (!host)
|
| + continue;
|
| + RenderWidgetHost* rwh = host->GetRenderWidgetHostByID(routing_id);
|
| + if (!rwh)
|
| + continue;
|
| + RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info);
|
| + }
|
| +}
|
| +
|
| } // namespace content
|
|
|