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

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, 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 cdb5f61a82c3866d818fa4cf8ddcefbb6fe3e788..644acc8e1a077053fd59df03a7af902ebada4bcd 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -965,6 +965,16 @@ void LayerTreeHost::ApplyScrollAndScale(const ScrollAndScaleSet& info) {
if (!root_layer_.get())
return;
+ const bool has_scrolls = !info.scrolls.empty();
enne (OOO) 2013/07/29 17:46:31 ...or page scale delta != 1?
+ if (has_scrolls) {
+ // We use async events here because we want to conditionally trace. This
+ // is too spammy otherwise.
+ TRACE_EVENT_ASYNC_BEGIN0(
+ "impl-scroll",
+ "LayerTreeHost::ApplyScrollAndScale",
+ this);
+ }
+
Layer* root_scroll_layer = FindFirstScrollableLayer(root_layer_.get());
gfx::Vector2d root_scroll_delta;
@@ -983,6 +993,13 @@ void LayerTreeHost::ApplyScrollAndScale(const ScrollAndScaleSet& info) {
}
if (!root_scroll_delta.IsZero() || info.page_scale_delta != 1.f)
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) {

Powered by Google App Engine
This is Rietveld 408576698