OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_ | 5 #ifndef CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_ |
6 #define CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_ | 6 #define CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "cc/debug/rendering_stats.h" | 10 #include "cc/debug/rendering_stats.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 if (record_rendering_stats_ != record_rendering_stats) | 36 if (record_rendering_stats_ != record_rendering_stats) |
37 record_rendering_stats_ = record_rendering_stats; | 37 record_rendering_stats_ = record_rendering_stats; |
38 } | 38 } |
39 | 39 |
40 base::TimeTicks StartRecording() const; | 40 base::TimeTicks StartRecording() const; |
41 base::TimeDelta EndRecording(base::TimeTicks start_time) const; | 41 base::TimeDelta EndRecording(base::TimeTicks start_time) const; |
42 | 42 |
43 void IncrementFrameCount(int64 count); | 43 void IncrementFrameCount(int64 count); |
44 void AddVisibleContentArea(int64 area); | 44 void AddVisibleContentArea(int64 area); |
45 void AddApproximatedVisibleContentArea(int64 area); | 45 void AddApproximatedVisibleContentArea(int64 area); |
| 46 void AddCheckerboardedVisibleContentArea(int64 area); |
46 void AddDrawDuration(base::TimeDelta draw_duration, | 47 void AddDrawDuration(base::TimeDelta draw_duration, |
47 base::TimeDelta draw_duration_estimate); | 48 base::TimeDelta draw_duration_estimate); |
48 void AddBeginMainFrameToCommitDuration( | 49 void AddBeginMainFrameToCommitDuration( |
49 base::TimeDelta begin_main_frame_to_commit_duration, | 50 base::TimeDelta begin_main_frame_to_commit_duration, |
50 base::TimeDelta begin_main_frame_to_commit_duration_estimate); | 51 base::TimeDelta begin_main_frame_to_commit_duration_estimate); |
51 void AddCommitToActivateDuration( | 52 void AddCommitToActivateDuration( |
52 base::TimeDelta commit_to_activate_duration, | 53 base::TimeDelta commit_to_activate_duration, |
53 base::TimeDelta commit_to_activate_duration_estimate); | 54 base::TimeDelta commit_to_activate_duration_estimate); |
54 | 55 |
55 protected: | 56 protected: |
56 RenderingStatsInstrumentation(); | 57 RenderingStatsInstrumentation(); |
57 | 58 |
58 private: | 59 private: |
59 RenderingStats impl_thread_rendering_stats_; | 60 RenderingStats impl_thread_rendering_stats_; |
60 RenderingStats impl_thread_rendering_stats_accu_; | 61 RenderingStats impl_thread_rendering_stats_accu_; |
61 | 62 |
62 bool record_rendering_stats_; | 63 bool record_rendering_stats_; |
63 | 64 |
64 base::Lock lock_; | 65 base::Lock lock_; |
65 | 66 |
66 DISALLOW_COPY_AND_ASSIGN(RenderingStatsInstrumentation); | 67 DISALLOW_COPY_AND_ASSIGN(RenderingStatsInstrumentation); |
67 }; | 68 }; |
68 | 69 |
69 } // namespace cc | 70 } // namespace cc |
70 | 71 |
71 #endif // CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_ | 72 #endif // CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_ |
OLD | NEW |