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

Side by Side 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, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2486 matching lines...) Expand 10 before | Expand all | Expand 10 after
2497 OnRenderAutoResized(new_size); 2497 OnRenderAutoResized(new_size);
2498 } 2498 }
2499 2499
2500 void RenderWidgetHostImpl::DetachDelegate() { 2500 void RenderWidgetHostImpl::DetachDelegate() {
2501 delegate_ = NULL; 2501 delegate_ = NULL;
2502 } 2502 }
2503 2503
2504 void RenderWidgetHostImpl::FrameSwapped(const ui::LatencyInfo& latency_info) { 2504 void RenderWidgetHostImpl::FrameSwapped(const ui::LatencyInfo& latency_info) {
2505 } 2505 }
2506 2506
2507 // static
2508 void RenderWidgetHostImpl::CompositorFrameDrawn(
2509 const ui::LatencyInfo& latency_info) {
2510 for (ui::LatencyInfo::LatencyMap::const_iterator b =
2511 latency_info.latency_components.begin();
2512 b != latency_info.latency_components.end();
2513 ++b) {
2514 if (b->first.first != ui::INPUT_EVENT_LATENCY_COMPONENT)
2515 continue;
2516 // Matches with GetLatencyComponentId
2517 int routing_id = b->first.second & 0xffffffff;
2518 int process_id = (b->first.second >> 32) & 0xffffffff;
piman 2013/05/31 04:13:44 I can't say that I'm the biggest fan of this. I gu
jbauman 2013/05/31 21:51:36 That's what the LatencyComponentType is for - to p
2519 RenderProcessHost* host = RenderProcessHost::FromID(process_id);
2520 if (!host)
2521 continue;
2522 RenderWidgetHost* rwh = host->GetRenderWidgetHostByID(routing_id);
2523 if (!rwh)
2524 continue;
2525 RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info);
2526 }
2527 }
2528
2507 } // namespace content 2529 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698