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

Unified Diff: cc/trees/thread_proxy.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/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 39cdceb91420f9d1040c3f7e542a7c1fddd1c775..7a7261490ef0dd5932953c00fd579fe220f33f20 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -667,6 +667,14 @@ void ThreadProxy::ScheduledActionSendBeginFrameToMainThread() {
begin_frame_state->scroll_info =
layer_tree_host_impl_->ProcessScrollDeltas();
+ if (!begin_frame_state->scroll_info->scrolls.empty()) {
+ TRACE_EVENT_INSTANT0(
+ "impl-scroll",
+ "ThreadProxy::ScheduledActionSendBeginFrameToMainThread received scroll"
+ " deltas",
+ TRACE_EVENT_SCOPE_THREAD);
+ }
+
if (!layer_tree_host_impl_->settings().impl_side_painting) {
DCHECK_GT(layer_tree_host_impl_->memory_allocation_limit_bytes(), 0u);
}
@@ -726,8 +734,24 @@ void ThreadProxy::BeginFrameOnMainThread(
return;
}
- if (begin_frame_state)
+ if (begin_frame_state) {
+ const bool has_scrolls = !begin_frame_state->scroll_info->scrolls.empty();
+ 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",
+ "ThreadProxy::BeginFrameOnMainThread",
+ this);
+ }
layer_tree_host_->ApplyScrollAndScale(*begin_frame_state->scroll_info);
+ if (has_scrolls) {
+ TRACE_EVENT_ASYNC_END0(
+ "impl-scroll",
+ "ThreadProxy::BeginFrameOnMainThread",
+ this);
+ }
+ }
layer_tree_host_->WillBeginFrame();

Powered by Google App Engine
This is Rietveld 408576698