| 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_PAINT_TIME_COUNTER_H_ | 5 #ifndef CC_DEBUG_PAINT_TIME_COUNTER_H_ |
| 6 #define CC_DEBUG_PAINT_TIME_COUNTER_H_ | 6 #define CC_DEBUG_PAINT_TIME_COUNTER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 void ClearHistory(); | 29 void ClearHistory(); |
| 30 | 30 |
| 31 typedef RingBuffer<base::TimeDelta, 200> RingBufferType; | 31 typedef RingBuffer<base::TimeDelta, 200> RingBufferType; |
| 32 RingBufferType::Iterator Begin() const { return ring_buffer_.Begin(); } | 32 RingBufferType::Iterator Begin() const { return ring_buffer_.Begin(); } |
| 33 RingBufferType::Iterator End() const { return ring_buffer_.End(); } | 33 RingBufferType::Iterator End() const { return ring_buffer_.End(); } |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 PaintTimeCounter(); | 36 PaintTimeCounter(); |
| 37 | 37 |
| 38 RingBufferType ring_buffer_; | 38 RingBufferType ring_buffer_; |
| 39 base::TimeDelta last_total_paint_time_; | |
| 40 bool can_save_paint_time_delta_; | |
| 41 | 39 |
| 42 DISALLOW_COPY_AND_ASSIGN(PaintTimeCounter); | 40 DISALLOW_COPY_AND_ASSIGN(PaintTimeCounter); |
| 43 }; | 41 }; |
| 44 | 42 |
| 45 } // namespace cc | 43 } // namespace cc |
| 46 | 44 |
| 47 #endif // CC_DEBUG_PAINT_TIME_COUNTER_H_ | 45 #endif // CC_DEBUG_PAINT_TIME_COUNTER_H_ |
| OLD | NEW |