OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 GPU_COMMAND_BUFFER_SERVICE_MEMORY_TRACKING_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_MEMORY_TRACKING_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_MEMORY_TRACKING_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_MEMORY_TRACKING_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| 11 #include "base/logging.h" |
| 12 #include "base/memory/ref_counted.h" |
11 | 13 |
12 namespace gpu { | 14 namespace gpu { |
13 namespace gles2 { | 15 namespace gles2 { |
14 | 16 |
15 // A MemoryTracker is used to propagate per-ContextGroup memory usage | 17 // A MemoryTracker is used to propagate per-ContextGroup memory usage |
16 // statistics to the global GpuMemoryManager. | 18 // statistics to the global GpuMemoryManager. |
17 class MemoryTracker : public base::RefCounted<MemoryTracker> { | 19 class MemoryTracker : public base::RefCounted<MemoryTracker> { |
18 public: | 20 public: |
19 enum Pool { | 21 enum Pool { |
20 kUnmanaged, | 22 kUnmanaged, |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 size_t mem_represented_; | 103 size_t mem_represented_; |
102 size_t mem_represented_at_last_update_; | 104 size_t mem_represented_at_last_update_; |
103 | 105 |
104 DISALLOW_COPY_AND_ASSIGN(MemoryTypeTracker); | 106 DISALLOW_COPY_AND_ASSIGN(MemoryTypeTracker); |
105 }; | 107 }; |
106 | 108 |
107 } // namespace gles2 | 109 } // namespace gles2 |
108 } // namespace gpu | 110 } // namespace gpu |
109 | 111 |
110 #endif // GPU_COMMAND_BUFFER_SERVICE_MEMORY_TRACKING_H_ | 112 #endif // GPU_COMMAND_BUFFER_SERVICE_MEMORY_TRACKING_H_ |
OLD | NEW |