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

Unified Diff: content/common/gpu/gpu_memory_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_command_buffer_stub.cc ('k') | content/common/gpu/gpu_memory_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_memory_manager.h
diff --git a/content/common/gpu/gpu_memory_manager.h b/content/common/gpu/gpu_memory_manager.h
index 21a96de0610ddd53f78c3c67d11ca3bb1da946ed..d3268cadb9b32520d372110d9dcf47fa05ae8739 100644
--- a/content/common/gpu/gpu_memory_manager.h
+++ b/content/common/gpu/gpu_memory_manager.h
@@ -93,11 +93,9 @@ class CONTENT_EXPORT GpuMemoryManager :
// other internal but non GpuMemoryManager managed sources, etc.
size_t GetAvailableGpuMemory() const;
- // GetPeakAssignedAllocationSum() will return the historical max value for the
- // sum of all assigned client allocations (ie, peak system memory allocation).
- size_t peak_assigned_allocation_sum() const {
- return peak_assigned_allocation_sum_;
- }
+ // Track a change in memory allocated by any context
+ void TrackMemoryAllocatedChange(size_t old_size, size_t new_size);
+
private:
friend class GpuMemoryManagerTest;
@@ -117,7 +115,10 @@ class CONTENT_EXPORT GpuMemoryManager :
size_t max_surfaces_with_frontbuffer_soft_limit_;
StubMemoryStatMap stub_memory_stats_for_last_manage_;
- size_t peak_assigned_allocation_sum_;
+
+ // The current total memory usage, and historical maximum memory usage
+ size_t bytes_allocated_current_;
+ size_t bytes_allocated_historical_max_;
DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager);
};
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | content/common/gpu/gpu_memory_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698