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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 1184863004: cc: Move timing history to the Scheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, add include Created 5 years, 6 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/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 44ea7ca779261c813b134fe4eeb7fd55e053edba..ae2c568acd108f693108e5d2adb39d745daf0671 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -41,7 +41,6 @@ SingleThreadProxy::SingleThreadProxy(
: Proxy(main_task_runner, NULL),
layer_tree_host_(layer_tree_host),
client_(client),
- timing_history_(layer_tree_host->rendering_stats_instrumentation()),
next_frame_is_newly_committed_frame_(false),
#if DCHECK_IS_ON()
inside_impl_frame_(false),
@@ -65,7 +64,8 @@ SingleThreadProxy::SingleThreadProxy(
scheduler_settings.main_thread_should_always_be_low_latency = true;
scheduler_on_impl_thread_ = Scheduler::Create(
this, scheduler_settings, layer_tree_host_->id(),
- MainThreadTaskRunner(), external_begin_frame_source.Pass());
+ MainThreadTaskRunner(), external_begin_frame_source.Pass(),
+ layer_tree_host->rendering_stats_instrumentation());
}
}
@@ -292,7 +292,6 @@ void SingleThreadProxy::CommitComplete() {
commit_blocking_task_runner_.reset();
layer_tree_host_->CommitComplete();
layer_tree_host_->DidBeginMainFrame();
- timing_history_.DidCommit();
next_frame_is_newly_committed_frame_ = true;
}
@@ -448,8 +447,6 @@ void SingleThreadProxy::DidActivateSyncTree() {
// |commit_blocking_task_runner| would make sure all tasks posted during
// commit/activation before CommitComplete.
CommitComplete();
-
- timing_history_.DidActivateSyncTree();
}
void SingleThreadProxy::DidPrepareTiles() {
@@ -639,8 +636,6 @@ DrawResult SingleThreadProxy::DoComposite(LayerTreeHostImpl::FrameData* frame) {
return DRAW_ABORTED_CANT_DRAW;
}
- timing_history_.DidStartDrawing();
-
// TODO(robliao): Remove ScopedTracker below once https://crbug.com/461509
// is fixed.
tracked_objects::ScopedTracker tracking_profile2(
@@ -676,7 +671,6 @@ DrawResult SingleThreadProxy::DoComposite(LayerTreeHostImpl::FrameData* frame) {
tracked_objects::ScopedTracker tracking_profile7(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"461509 SingleThreadProxy::DoComposite7"));
- timing_history_.DidFinishDrawing();
}
if (draw_frame) {
@@ -823,8 +817,6 @@ void SingleThreadProxy::DoBeginMainFrame(
layer_tree_host_->UpdateLayers();
- timing_history_.DidBeginMainFrame();
-
// TODO(enne): SingleThreadProxy does not support cancelling commits yet,
// search for CommitEarlyOutReason::FINISHED_NO_UPDATES inside
// thread_proxy.cc
@@ -895,18 +887,6 @@ void SingleThreadProxy::ScheduledActionInvalidateOutputSurface() {
NOTREACHED();
}
-base::TimeDelta SingleThreadProxy::DrawDurationEstimate() {
- return timing_history_.DrawDurationEstimate();
-}
-
-base::TimeDelta SingleThreadProxy::BeginMainFrameToCommitDurationEstimate() {
- return timing_history_.BeginMainFrameToCommitDurationEstimate();
-}
-
-base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() {
- return timing_history_.CommitToActivateDurationEstimate();
-}
-
void SingleThreadProxy::DidFinishImplFrame() {
layer_tree_host_impl_->DidFinishImplFrame();
#if DCHECK_IS_ON()

Powered by Google App Engine
This is Rietveld 408576698