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.h" | 10 #include "base/time/time.h" |
11 #include "cc/debug/ring_buffer.h" | 11 #include "cc/debug/ring_buffer.h" |
12 | 12 |
13 namespace cc { | 13 namespace cc { |
14 | 14 |
15 // Maintains a history of paint times for each frame | 15 // Maintains a history of paint times for each frame |
16 class PaintTimeCounter { | 16 class PaintTimeCounter { |
17 public: | 17 public: |
18 static scoped_ptr<PaintTimeCounter> Create(); | 18 static scoped_ptr<PaintTimeCounter> Create(); |
19 | 19 |
20 size_t HistorySize() const { return ring_buffer_.BufferSize(); } | 20 size_t HistorySize() const { return ring_buffer_.BufferSize(); } |
(...skipping 17 matching lines...) Expand all Loading... |
38 RingBufferType ring_buffer_; | 38 RingBufferType ring_buffer_; |
39 base::TimeDelta last_total_paint_time_; | 39 base::TimeDelta last_total_paint_time_; |
40 bool can_save_paint_time_delta_; | 40 bool can_save_paint_time_delta_; |
41 | 41 |
42 DISALLOW_COPY_AND_ASSIGN(PaintTimeCounter); | 42 DISALLOW_COPY_AND_ASSIGN(PaintTimeCounter); |
43 }; | 43 }; |
44 | 44 |
45 } // namespace cc | 45 } // namespace cc |
46 | 46 |
47 #endif // CC_DEBUG_PAINT_TIME_COUNTER_H_ | 47 #endif // CC_DEBUG_PAINT_TIME_COUNTER_H_ |
OLD | NEW |