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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 12519006: cc:: Add RenderingStatsInstrumentation to manage collection of RenderingStats (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Updated all tests Created 7 years, 9 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
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698