Index: cc/trees/thread_proxy.cc |
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc |
index 18f4e18ea96a347d43e7f667f2af1da430c3e038..10d30c5bff61a3c0a91096cfce8dd24802517666 100644 |
--- a/cc/trees/thread_proxy.cc |
+++ b/cc/trees/thread_proxy.cc |
@@ -1017,7 +1017,15 @@ void ThreadProxy::ScheduledActionCommit() { |
impl().next_frame_is_newly_committed_frame = true; |
- impl().timing_history.DidCommit(); |
+ // Compute the estimate before we add the new duration so we can compare the |
+ // estimated duration for this frame to the actual value. |
+ base::TimeDelta begin_main_frame_to_commit_duration_estimate = |
+ BeginMainFrameToCommitDurationEstimate(); |
+ base::TimeDelta begin_main_frame_to_commit_duration = |
+ impl().timing_history.DidCommit(); |
+ impl().layer_tree_host_impl->AddBeginMainFrameToCommitDurationEstimate( |
+ begin_main_frame_to_commit_duration, |
+ begin_main_frame_to_commit_duration_estimate); |
} |
void ThreadProxy::ScheduledActionUpdateVisibleTiles() { |
@@ -1148,6 +1156,9 @@ DrawResult ThreadProxy::DrawSwapInternal(bool forced_draw) { |
base::TimeDelta::FromMilliseconds(1), |
base::TimeDelta::FromMilliseconds(100), |
50); |
+ |
+ impl().layer_tree_host_impl->AddDrawDurationEstimate( |
+ draw_duration, draw_duration_estimate); |
} |
DCHECK_NE(INVALID_RESULT, result); |
@@ -1444,7 +1455,14 @@ void ThreadProxy::DidActivateSyncTree() { |
UpdateBackgroundAnimateTicking(); |
- impl().timing_history.DidActivateSyncTree(); |
+ // Compute the estimate before we add the new duration so we can compare the |
+ // estimated duration for this frame to the actual value. |
+ base::TimeDelta commit_to_activate_duration_estimate = |
+ CommitToActivateDurationEstimate(); |
+ base::TimeDelta commit_to_activate_duration = |
+ impl().timing_history.DidActivateSyncTree(); |
+ impl().layer_tree_host_impl->AddCommitToActivateDurationEstimate( |
+ commit_to_activate_duration, commit_to_activate_duration_estimate); |
} |
void ThreadProxy::DidManageTiles() { |