| Index: cc/trees/single_thread_proxy.cc
|
| diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
|
| index 71c46522f1af246ddf5e5cb1bf19457daa85a0bd..da2046a390bc9e73faaac5d20cfc0800bfba14eb 100644
|
| --- a/cc/trees/single_thread_proxy.cc
|
| +++ b/cc/trees/single_thread_proxy.cc
|
| @@ -171,12 +171,6 @@ bool SingleThreadProxy::RecreateOutputSurface() {
|
| return initialized;
|
| }
|
|
|
| -void SingleThreadProxy::CollectRenderingStats(RenderingStats* stats) {
|
| - stats->totalCommitTime = total_commit_time_;
|
| - stats->totalCommitCount = total_commit_count_;
|
| - layer_tree_host_impl_->CollectRenderingStats(stats);
|
| -}
|
| -
|
| const RendererCapabilities& SingleThreadProxy::GetRendererCapabilities() const {
|
| DCHECK(renderer_initialized_);
|
| // Note: this gets called during the commit by the "impl" thread.
|
| @@ -195,7 +189,10 @@ void SingleThreadProxy::DoCommit(scoped_ptr<ResourceUpdateQueue> queue) {
|
| DebugScopedSetMainThreadBlocked mainThreadBlocked(this);
|
| DebugScopedSetImplThread impl(this);
|
|
|
| - base::TimeTicks startTime = base::TimeTicks::HighResNow();
|
| + RenderingStatsInstrumentation* stats_instrumentation =
|
| + layer_tree_host_->rendering_stats_instrumentation();
|
| + base::TimeTicks startTime = stats_instrumentation->StartRecording();
|
| +
|
| layer_tree_host_impl_->BeginCommit();
|
|
|
| layer_tree_host_->contents_texture_manager()->
|
| @@ -222,9 +219,8 @@ void SingleThreadProxy::DoCommit(scoped_ptr<ResourceUpdateQueue> queue) {
|
| DCHECK(!scrollInfo->scrolls.size());
|
| #endif
|
|
|
| - base::TimeTicks endTime = base::TimeTicks::HighResNow();
|
| - total_commit_time_ += endTime - startTime;
|
| - total_commit_count_++;
|
| + base::TimeDelta duration = stats_instrumentation->EndRecording(startTime);
|
| + stats_instrumentation->AddCommit(duration);
|
| }
|
| layer_tree_host_->CommitComplete();
|
| next_frame_is_newly_committed_frame_ = true;
|
|
|