summaryrefslogtreecommitdiffstats
path: root/cc/trees/thread_proxy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc/trees/thread_proxy.cc')
-rw-r--r--cc/trees/thread_proxy.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index a0bd4bf..31a497a 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -695,6 +695,7 @@ void ThreadProxy::BeginFrameOnMainThread(
scoped_ptr<BeginFrameAndCommitState> begin_frame_state) {
TRACE_EVENT0("cc", "ThreadProxy::BeginFrameOnMainThread");
DCHECK(IsMainThread());
+
if (!layer_tree_host_)
return;
@@ -816,7 +817,7 @@ void ThreadProxy::BeginFrameOnMainThread(
// point of view, but asynchronously performed on the impl thread,
// coordinated by the Scheduler.
{
- TRACE_EVENT0("cc", "ThreadProxy::BeginFrameOnMainThread::commit");
+ TRACE_EVENT_BEGIN0("cc", "ThreadProxy::BeginFrameOnMainThread::commit");
DebugScopedSetMainThreadBlocked main_thread_blocked(this);
@@ -836,6 +837,10 @@ void ThreadProxy::BeginFrameOnMainThread(
base::TimeDelta duration = stats_instrumentation->EndRecording(start_time);
stats_instrumentation->AddCommit(duration);
+ TRACE_EVENT_END1("cc", "ThreadProxy::BeginFrameOnMainThread::commit",
+ "data", stats_instrumentation->
+ GetMainThreadRenderingStats().AsTraceableData());
+ stats_instrumentation->AccumulateAndClearMainThreadStats();
}
layer_tree_host_->CommitComplete();