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

Side by Side Diff: cc/trees/proxy_timing_history.h

Issue 363003002: Add duration estimation data to RenderingStats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nest classes inside RenderingStats; add tests for TimeDeltaList 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TREES_PROXY_TIMING_HISTORY_H_ 5 #ifndef CC_TREES_PROXY_TIMING_HISTORY_H_
6 #define CC_TREES_PROXY_TIMING_HISTORY_H_ 6 #define CC_TREES_PROXY_TIMING_HISTORY_H_
7 7
8 #include "cc/base/rolling_time_delta_history.h" 8 #include "cc/base/rolling_time_delta_history.h"
9 #include "cc/debug/rendering_stats_instrumentation.h"
9 10
10 namespace cc { 11 namespace cc {
11 12
12 class ProxyTimingHistory { 13 class ProxyTimingHistory {
13 public: 14 public:
14 ProxyTimingHistory(); 15 explicit ProxyTimingHistory(
16 RenderingStatsInstrumentation* rendering_stats_instrumentation);
15 ~ProxyTimingHistory(); 17 ~ProxyTimingHistory();
16 18
17 base::TimeDelta DrawDurationEstimate() const; 19 base::TimeDelta DrawDurationEstimate() const;
18 base::TimeDelta BeginMainFrameToCommitDurationEstimate() const; 20 base::TimeDelta BeginMainFrameToCommitDurationEstimate() const;
19 base::TimeDelta CommitToActivateDurationEstimate() const; 21 base::TimeDelta CommitToActivateDurationEstimate() const;
20 22
21 void DidBeginMainFrame(); 23 void DidBeginMainFrame();
22 void DidCommit(); 24 void DidCommit();
23 void DidActivateSyncTree(); 25 void DidActivateSyncTree();
24 void DidStartDrawing(); 26 void DidStartDrawing();
25 // Returns draw duration. 27 void DidFinishDrawing();
26 base::TimeDelta DidFinishDrawing();
27 28
28 protected: 29 protected:
30 void AddDrawDurationUMA(base::TimeDelta draw_duration,
31 base::TimeDelta draw_duration_estimate);
32
29 RollingTimeDeltaHistory draw_duration_history_; 33 RollingTimeDeltaHistory draw_duration_history_;
30 RollingTimeDeltaHistory begin_main_frame_to_commit_duration_history_; 34 RollingTimeDeltaHistory begin_main_frame_to_commit_duration_history_;
31 RollingTimeDeltaHistory commit_to_activate_duration_history_; 35 RollingTimeDeltaHistory commit_to_activate_duration_history_;
32 36
33 base::TimeTicks begin_main_frame_sent_time_; 37 base::TimeTicks begin_main_frame_sent_time_;
34 base::TimeTicks commit_complete_time_; 38 base::TimeTicks commit_complete_time_;
35 base::TimeTicks start_draw_time_; 39 base::TimeTicks start_draw_time_;
40
41 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
36 }; 42 };
37 43
38 } // namespace cc 44 } // namespace cc
39 45
40 #endif // CC_TREES_PROXY_TIMING_HISTORY_H_ 46 #endif // CC_TREES_PROXY_TIMING_HISTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698