| OLD | NEW |
| 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 | 9 |
| 10 namespace cc { | 10 namespace cc { |
| 11 | 11 |
| 12 class ProxyTimingHistory { | 12 class ProxyTimingHistory { |
| 13 public: | 13 public: |
| 14 ProxyTimingHistory(); | 14 ProxyTimingHistory(); |
| 15 ~ProxyTimingHistory(); | 15 ~ProxyTimingHistory(); |
| 16 | 16 |
| 17 base::TimeDelta DrawDurationEstimate() const; | 17 base::TimeDelta DrawDurationEstimate() const; |
| 18 base::TimeDelta BeginMainFrameToCommitDurationEstimate() const; | 18 base::TimeDelta BeginMainFrameToCommitDurationEstimate() const; |
| 19 base::TimeDelta CommitToActivateDurationEstimate() const; | 19 base::TimeDelta CommitToActivateDurationEstimate() const; |
| 20 | 20 |
| 21 void DidBeginMainFrame(); | 21 void DidBeginMainFrame(); |
| 22 void DidCommit(); | 22 // Returns BeginMainFrame-to-Commit duration. |
| 23 void DidActivatePendingTree(); | 23 base::TimeDelta DidCommit(); |
| 24 // Returns Commit-to-Activate duration. |
| 25 base::TimeDelta DidActivatePendingTree(); |
| 24 void DidStartDrawing(); | 26 void DidStartDrawing(); |
| 25 // Returns draw duration. | 27 // Returns draw duration. |
| 26 base::TimeDelta DidFinishDrawing(); | 28 base::TimeDelta DidFinishDrawing(); |
| 27 | 29 |
| 28 protected: | 30 protected: |
| 29 RollingTimeDeltaHistory draw_duration_history_; | 31 RollingTimeDeltaHistory draw_duration_history_; |
| 30 RollingTimeDeltaHistory begin_main_frame_to_commit_duration_history_; | 32 RollingTimeDeltaHistory begin_main_frame_to_commit_duration_history_; |
| 31 RollingTimeDeltaHistory commit_to_activate_duration_history_; | 33 RollingTimeDeltaHistory commit_to_activate_duration_history_; |
| 32 | 34 |
| 33 base::TimeTicks begin_main_frame_sent_time_; | 35 base::TimeTicks begin_main_frame_sent_time_; |
| 34 base::TimeTicks commit_complete_time_; | 36 base::TimeTicks commit_complete_time_; |
| 35 base::TimeTicks start_draw_time_; | 37 base::TimeTicks start_draw_time_; |
| 36 }; | 38 }; |
| 37 | 39 |
| 38 } // namespace cc | 40 } // namespace cc |
| 39 | 41 |
| 40 #endif // CC_TREES_PROXY_TIMING_HISTORY_H_ | 42 #endif // CC_TREES_PROXY_TIMING_HISTORY_H_ |
| OLD | NEW |