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

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, 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
« no previous file with comments | « no previous file | cc/layers/layer_impl.cc » ('j') | cc/layers/layer_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index fc9f2daba445f1b78b01dc5a3c2624a620663b95..6af0ba13cfc395e28016eb2df99b84324a5c6173 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"
@@ -557,6 +558,10 @@ void Layer::SetScrollOffset(gfx::Vector2d scroll_offset) {
DCHECK(IsPropertyChangeAllowed());
if (scroll_offset_ == scroll_offset)
return;
+ TRACE_EVENT2("impl-scroll",
+ "Layer::SetScrollOffset",
+ "scrollX", scroll_offset.x(),
+ "scrollY", scroll_offset.y());
scroll_offset_ = scroll_offset;
SetNeedsCommit();
}
@@ -566,6 +571,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",
+ "scrollX", scroll_offset.x(),
+ "scrollY", scroll_offset.y());
scroll_offset_ = scroll_offset;
if (!did_scroll_callback_.is_null())
did_scroll_callback_.Run();
« no previous file with comments | « no previous file | cc/layers/layer_impl.cc » ('j') | cc/layers/layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698