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_RESOURCES_MEMORY_HISTORY_H_ | 5 #ifndef CC_RESOURCES_MEMORY_HISTORY_H_ |
6 #define CC_RESOURCES_MEMORY_HISTORY_H_ | 6 #define CC_RESOURCES_MEMORY_HISTORY_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 memory for each frame. | 15 // Maintains a history of memory for each frame. |
16 class MemoryHistory { | 16 class MemoryHistory { |
17 public: | 17 public: |
18 static scoped_ptr<MemoryHistory> Create(); | 18 static scoped_ptr<MemoryHistory> Create(); |
19 | 19 |
20 size_t HistorySize() const { return ring_buffer_.BufferSize(); } | 20 size_t HistorySize() const { return ring_buffer_.BufferSize(); } |
(...skipping 25 matching lines...) Expand all Loading... |
46 MemoryHistory(); | 46 MemoryHistory(); |
47 | 47 |
48 RingBufferType ring_buffer_; | 48 RingBufferType ring_buffer_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(MemoryHistory); | 50 DISALLOW_COPY_AND_ASSIGN(MemoryHistory); |
51 }; | 51 }; |
52 | 52 |
53 } // namespace cc | 53 } // namespace cc |
54 | 54 |
55 #endif // CC_RESOURCES_MEMORY_HISTORY_H_ | 55 #endif // CC_RESOURCES_MEMORY_HISTORY_H_ |
OLD | NEW |