Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(778)

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 15842013: Plumb LatencyInfo through aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698