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

Unified Diff: cc/layers/layer.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
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index aa4a002dff41294c5799627a77fccf72889a4437..23419e83a8bd3e67f05f425ea2e3295dcbcc5395 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "base/debug/trace_event.h"
#include "base/location.h"
#include "base/metrics/histogram.h"
#include "base/single_thread_task_runner.h"
@@ -563,6 +564,10 @@ void Layer::SetScrollOffset(gfx::Vector2d scroll_offset) {
DCHECK(IsPropertyChangeAllowed());
if (scroll_offset_ == scroll_offset)
return;
+ TRACE_EVENT2("impl-scroll",
+ "Layer::SetScrollOffset",
+ "scroll_x", scroll_offset.x(),
+ "scroll_y", scroll_offset.y());
scroll_offset_ = scroll_offset;
SetNeedsCommit();
}
@@ -574,6 +579,10 @@ void Layer::SetScrollOffsetFromImplSide(gfx::Vector2d scroll_offset) {
DCHECK(layer_tree_host_ && layer_tree_host_->CommitRequested());
if (scroll_offset_ == scroll_offset)
return;
+ TRACE_EVENT2("impl-scroll",
+ "Layer::SetScrollOffsetFromImplSide",
+ "scroll_x", scroll_offset.x(),
+ "scroll_y", scroll_offset.y());
scroll_offset_ = scroll_offset;
SetNeedsPushProperties();
if (!did_scroll_callback_.is_null())
« no previous file with comments | « cc/base/math_util.cc ('k') | cc/layers/layer_impl.cc » ('j') | cc/trees/layer_tree_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698