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

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: Check we only add duration data once per frame. Created 6 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/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index d62b96ef1c02e9377484b1a7fba03c6e3004a692..32ba89168589e4389d347f2d2980736c6c8bcb58 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -1005,7 +1005,15 @@ void ThreadProxy::ScheduledActionCommit() {
impl().next_frame_is_newly_committed_frame = true;
- impl().timing_history.DidCommit();
+ base::TimeDelta begin_main_frame_to_commit_duration_estimate =
+ BeginMainFrameToCommitDurationEstimate();
brianderson 2014/07/02 22:39:29 Can you add a comment indicating why you are takin
Dominik Grewe 2014/07/03 13:16:38 Done here and below.
+ base::TimeDelta begin_main_frame_to_commit_duration =
+ impl().timing_history.DidCommit();
+ impl()
+ .layer_tree_host_impl->rendering_stats_instrumentation()
+ ->AddBeginMainFrameToCommitDuration(
+ begin_main_frame_to_commit_duration,
+ begin_main_frame_to_commit_duration_estimate);
}
void ThreadProxy::ScheduledActionUpdateVisibleTiles() {
@@ -1137,6 +1145,10 @@ DrawResult ThreadProxy::DrawSwapInternal(bool forced_draw) {
base::TimeDelta::FromMilliseconds(1),
base::TimeDelta::FromMilliseconds(100),
50);
+
+ impl()
+ .layer_tree_host_impl->rendering_stats_instrumentation()
+ ->AddDrawDuration(draw_duration, draw_duration_estimate);
}
DCHECK_NE(INVALID_RESULT, result);
@@ -1433,7 +1445,14 @@ void ThreadProxy::DidActivateSyncTree() {
UpdateBackgroundAnimateTicking();
- impl().timing_history.DidActivatePendingTree();
+ base::TimeDelta commit_to_activate_duration_estimate =
+ CommitToActivateDurationEstimate();
+ base::TimeDelta commit_to_activate_duration =
+ impl().timing_history.DidActivatePendingTree();
+ impl()
+ .layer_tree_host_impl->rendering_stats_instrumentation()
+ ->AddCommitToActivateDuration(commit_to_activate_duration,
+ commit_to_activate_duration_estimate);
}
void ThreadProxy::DidManageTiles() {
« cc/debug/rendering_stats_instrumentation.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