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

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: Add ImplThreadRenderingStatsAccumulated 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
« cc/debug/rendering_stats.h ('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 d62b96ef1c02e9377484b1a7fba03c6e3004a692..d1e46b9acf70aa29cb045518780eb00dc59dd6c5 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -1005,7 +1005,17 @@ 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->rendering_stats_instrumentation()
danakj 2014/07/11 18:16:18 I don't think ThreadProxy should be reaching throu
ernstm 2014/07/14 13:12:38 ThreadProxy could access RenderingStatsInstrumenta
Dominik Grewe 2014/07/14 13:37:52 As far as I understand, this method is always runn
ernstm 2014/07/14 14:05:26 I liked the version that exposes rendering_stats_i
+ ->AddBeginMainFrameToCommitDuration(
+ begin_main_frame_to_commit_duration,
+ begin_main_frame_to_commit_duration_estimate);
}
void ThreadProxy::ScheduledActionUpdateVisibleTiles() {
@@ -1137,6 +1147,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 +1447,16 @@ void ThreadProxy::DidActivateSyncTree() {
UpdateBackgroundAnimateTicking();
- impl().timing_history.DidActivatePendingTree();
+ // 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.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.h ('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