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

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, 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/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 2bf824711d0592ce946327514bba8d995533b276..38bb6191f4e3f857c1ce3c05afd2ec98695499d3 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -635,6 +635,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);
}
@@ -680,8 +688,24 @@ void ThreadProxy::BeginFrameOnMainThread(
// callbacks will trigger another frame.
animate_requested_ = false;
- 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",
danakj 2013/07/29 17:16:08 You have a trace event in ApplyScrollAndScale, and
+ this);
+ }
layer_tree_host_->ApplyScrollAndScale(*begin_frame_state->scroll_info);
+ if (has_scrolls) {
+ TRACE_EVENT_ASYNC_END0(
+ "impl-scroll",
+ "ThreadProxy::BeginFrameOnMainThread",
+ this);
+ }
+ }
if (!in_composite_and_readback_ && !layer_tree_host_->visible()) {
commit_requested_ = false;

Powered by Google App Engine
This is Rietveld 408576698