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