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()) |