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

Unified Diff: cc/trees/thread_proxy.cc

Issue 363003002: Add duration estimation data to RenderingStats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: LTHI forwards estimates to rendering stats. Created 6 years, 5 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
« cc/debug/rendering_stats.cc ('K') | « cc/trees/proxy_timing_history.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« cc/debug/rendering_stats.cc ('K') | « cc/trees/proxy_timing_history.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698