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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 20994007: Add impl/comp scrolling instrumentation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 4 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/layers/layer_impl.cc ('k') | cc/trees/layer_tree_host_common.cc » ('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 9956f4c7359887d8c3fa44f720f6c7177abf780d..ea87e3041b5703329e2ac492b8465715bca56014 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -995,6 +995,18 @@ void LayerTreeHost::ApplyScrollAndScale(const ScrollAndScaleSet& info) {
if (!root_layer_.get())
return;
+ const bool has_scrolls =
+ !info.scrolls.empty() || info.page_scale_delta != 1.0f;
+
+ if (has_scrolls) {
+ // We use async events here because we want to conditionally trace. This
+ // is too spammy otherwise.
+ TRACE_EVENT_ASYNC_BEGIN0(
dsinclair 2013/08/08 17:30:14 Why not TRACE_EVENT_BEGIN0 and END0 below?
+ "impl-scroll",
+ "LayerTreeHost::ApplyScrollAndScale",
+ this);
+ }
+
gfx::Vector2d root_scroll_delta;
Layer* root_scroll_layer = FindFirstScrollableLayer(root_layer_.get());
@@ -1027,6 +1039,13 @@ void LayerTreeHost::ApplyScrollAndScale(const ScrollAndScaleSet& info) {
ApplyPageScaleDeltaFromImplSide(info.page_scale_delta);
client_->ApplyScrollAndScale(root_scroll_delta, info.page_scale_delta);
}
+
+ if (has_scrolls) {
+ TRACE_EVENT_ASYNC_END0(
+ "impl-scroll",
+ "LayerTreeHost::ApplyScrollAndScale",
+ this);
+ }
}
void LayerTreeHost::StartRateLimiter(WebKit::WebGraphicsContext3D* context3d) {
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698