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