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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 365463003: Implement scroll handler latency tracking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/base/swap_promise_monitor.h ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 51b9b4f2e33d31a0663ff35821a4b8ac0f21f482..264dadc89fc114aefd227a5f46117467d28338ab 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -18,6 +18,7 @@
#include "base/strings/string_number_conversions.h"
#include "cc/animation/animation_registrar.h"
#include "cc/animation/layer_animation_controller.h"
+#include "cc/base/latency_info_swap_promise.h"
#include "cc/base/math_util.h"
#include "cc/debug/devtools_instrumentation.h"
#include "cc/debug/rendering_stats_instrumentation.h"
@@ -1014,6 +1015,22 @@ void LayerTreeHost::ApplyScrollAndScale(const ScrollAndScaleSet& info) {
if (!root_layer_.get())
return;
+ for (size_t i = 0; i < info.latency_infos.size(); ++i) {
+ ui::LatencyInfo latency_info = info.latency_infos[i];
+ if (!latency_info.FindLatency(
Yufeng Shen (Slow to review) 2014/07/04 18:34:34 why do we need this check ?
Sami 2014/07/07 14:28:18 Ah, you're right, the latency infos can only flow
+ ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_BLINK_COMPONENT, 0, 0)) {
+ latency_info.AddLatencyNumber(
+ ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_BLINK_COMPONENT, 0, 0);
Yufeng Shen (Slow to review) 2014/07/04 18:34:34 Are we planning to use this new component anywhere
Sami 2014/07/07 14:28:18 Yeah, end-to-end is what really matters here. I wa
+ TRACE_EVENT_FLOW_STEP0("input",
+ "LatencyInfo.Flow",
+ TRACE_ID_DONT_MANGLE(latency_info.trace_id),
+ "Blink");
+ scoped_ptr<SwapPromise> swap_promise(
+ new LatencyInfoSwapPromise(latency_info));
+ QueueSwapPromise(swap_promise.Pass());
+ }
+ }
+
gfx::Vector2d inner_viewport_scroll_delta;
gfx::Vector2d outer_viewport_scroll_delta;
« no previous file with comments | « cc/base/swap_promise_monitor.h ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698