Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Unified Diff: gpu/command_buffer/service/buffer_manager.h

Issue 10796096: Add tracing of all memory allocated in all contexts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More trybot constructor fixes Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/gpu_memory_manager.cc ('k') | gpu/command_buffer/service/buffer_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/buffer_manager.h
diff --git a/gpu/command_buffer/service/buffer_manager.h b/gpu/command_buffer/service/buffer_manager.h
index 49715cc0c5bf78c734bf5de5fc9a9828bb23a3ce..95ea5d31c05b9aa0e726160146d4116e98eef8da 100644
--- a/gpu/command_buffer/service/buffer_manager.h
+++ b/gpu/command_buffer/service/buffer_manager.h
@@ -17,6 +17,9 @@
namespace gpu {
namespace gles2 {
+class MemoryTracker;
+class MemoryTypeTracker;
+
// This class keeps track of the buffers and their sizes so we can do
// bounds checking.
//
@@ -155,7 +158,7 @@ class GPU_EXPORT BufferManager {
RangeToMaxValueMap range_set_;
};
- BufferManager();
+ BufferManager(MemoryTracker* memory_tracker);
~BufferManager();
// Must call before destruction.
@@ -193,6 +196,8 @@ class GPU_EXPORT BufferManager {
void StartTracking(BufferInfo* info);
void StopTracking(BufferInfo* info);
+ scoped_ptr<MemoryTypeTracker> buffer_memory_tracker_;
+
// Info for each buffer in the system.
typedef base::hash_map<GLuint, BufferInfo::Ref> BufferInfoMap;
BufferInfoMap buffer_infos_;
@@ -201,7 +206,6 @@ class GPU_EXPORT BufferManager {
bool allow_buffers_on_multiple_targets_;
size_t mem_represented_;
- size_t last_reported_mem_represented_;
// Counts the number of BufferInfo allocated with 'this' as its manager.
// Allows to check no BufferInfo will outlive this.
« no previous file with comments | « content/common/gpu/gpu_memory_manager.cc ('k') | gpu/command_buffer/service/buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698