Index: cc/trees/thread_proxy.cc |
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc |
index 94e8d89b7118cdbb4deec6686726189c51e08bba..f062379276fca4fde3aa16c86780c699191e1e16 100644 |
--- a/cc/trees/thread_proxy.cc |
+++ b/cc/trees/thread_proxy.cc |
@@ -119,8 +119,8 @@ ThreadProxy::CompositorThreadOnly::CompositorThreadOnly( |
base::Bind(&ThreadProxy::RenewTreePriority, base::Unretained(proxy)), |
base::TimeDelta::FromMilliseconds( |
kSmoothnessTakesPriorityExpirationDelay * 1000)), |
- timing_history(rendering_stats_instrumentation), |
external_begin_frame_source(external_begin_frame_source.Pass()), |
+ rendering_stats_instrumentation(rendering_stats_instrumentation), |
weak_factory(proxy) { |
} |
@@ -720,7 +720,6 @@ void ThreadProxy::ScheduledActionSendBeginMainFrame() { |
base::Passed(&begin_main_frame_state))); |
devtools_instrumentation::DidRequestMainThreadFrame( |
impl().layer_tree_host_id); |
- impl().timing_history.DidBeginMainFrame(); |
} |
void ThreadProxy::SendBeginMainFrameNotExpectedSoon() { |
@@ -1023,6 +1022,8 @@ void ThreadProxy::ScheduledActionCommit() { |
impl().commit_completion_event = NULL; |
} |
+ impl().scheduler->DidCommit(); |
+ |
// Delay this step until afer the main thread has been released as it's |
// often a good bit of work to update the tree and prepare the new frame. |
impl().layer_tree_host_impl->CommitComplete(); |
@@ -1030,8 +1031,6 @@ void ThreadProxy::ScheduledActionCommit() { |
SetInputThrottledUntilCommitOnImplThread(false); |
impl().next_frame_is_newly_committed_frame = true; |
- |
- impl().timing_history.DidCommit(); |
} |
void ThreadProxy::ScheduledActionActivateSyncTree() { |
@@ -1055,7 +1054,6 @@ DrawResult ThreadProxy::DrawSwapInternal(bool forced_draw) { |
DCHECK(IsImplThread()); |
DCHECK(impl().layer_tree_host_impl.get()); |
- impl().timing_history.DidStartDrawing(); |
base::AutoReset<bool> mark_inside(&impl().inside_draw, true); |
if (impl().layer_tree_host_impl->pending_tree()) { |
@@ -1107,9 +1105,6 @@ DrawResult ThreadProxy::DrawSwapInternal(bool forced_draw) { |
base::Bind(&ThreadProxy::DidCommitAndDrawFrame, main_thread_weak_ptr_)); |
} |
- if (result == DRAW_SUCCESS) |
- impl().timing_history.DidFinishDrawing(); |
- |
DCHECK_NE(INVALID_RESULT, result); |
return result; |
} |
@@ -1149,18 +1144,6 @@ void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) { |
impl().current_resource_update_controller->PerformMoreUpdates(time); |
} |
-base::TimeDelta ThreadProxy::DrawDurationEstimate() { |
- return impl().timing_history.DrawDurationEstimate(); |
-} |
- |
-base::TimeDelta ThreadProxy::BeginMainFrameToCommitDurationEstimate() { |
- return impl().timing_history.BeginMainFrameToCommitDurationEstimate(); |
-} |
- |
-base::TimeDelta ThreadProxy::CommitToActivateDurationEstimate() { |
- return impl().timing_history.CommitToActivateDurationEstimate(); |
-} |
- |
void ThreadProxy::DidFinishImplFrame() { |
impl().layer_tree_host_impl->DidFinishImplFrame(); |
} |
@@ -1203,11 +1186,9 @@ void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion) { |
SchedulerSettings scheduler_settings( |
layer_tree_host()->settings().ToSchedulerSettings()); |
impl().scheduler = Scheduler::Create( |
- this, |
- scheduler_settings, |
- impl().layer_tree_host_id, |
- ImplThreadTaskRunner(), |
- impl().external_begin_frame_source.Pass()); |
+ this, scheduler_settings, impl().layer_tree_host_id, |
+ ImplThreadTaskRunner(), impl().external_begin_frame_source.Pass(), |
+ impl().rendering_stats_instrumentation); |
impl().scheduler->SetVisible(impl().layer_tree_host_impl->visible()); |
impl_thread_weak_ptr_ = impl().weak_factory.GetWeakPtr(); |
completion->Signal(); |
@@ -1390,11 +1371,15 @@ void ThreadProxy::DidActivateSyncTree() { |
impl().completion_event_for_commit_held_on_tree_activation = NULL; |
} |
- impl().timing_history.DidActivateSyncTree(); |
impl().last_processed_begin_main_frame_args = |
impl().last_begin_main_frame_args; |
} |
+void ThreadProxy::WillPrepareTiles() { |
+ DCHECK(IsImplThread()); |
+ impl().scheduler->WillPrepareTiles(); |
+} |
+ |
void ThreadProxy::DidPrepareTiles() { |
DCHECK(IsImplThread()); |
impl().scheduler->DidPrepareTiles(); |