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

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: Review comments. Created 6 years, 5 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: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 48f4864ef4a14e903aba2665fa85a989f725ea8a..cb4ea36dd5ecc1a58ab3944e0f025f764442ba49 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"
@@ -1021,6 +1022,17 @@ 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];
+ TRACE_EVENT_FLOW_STEP0("input",
+ "LatencyInfo.Flow",
+ TRACE_ID_DONT_MANGLE(latency_info.trace_id),
+ "Blink scroll update");
danakj 2014/07/08 16:49:07 layering violation: cc doesn't know about blink. Y
Sami 2014/07/09 13:28:55 Ah, sorry for the slip-up :) Fixed.
+ 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;

Powered by Google App Engine
This is Rietveld 408576698