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

Unified Diff: content/common/gpu/gpu_memory_manager.cc

Issue 10801014: Add GetStubStats and related functions in GpuMemoryManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding comments, renaming some functions. 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
Index: content/common/gpu/gpu_memory_manager.cc
diff --git a/content/common/gpu/gpu_memory_manager.cc b/content/common/gpu/gpu_memory_manager.cc
index 212b50d0ed90656e91aa3155a9d7695638f7ca89..059c067d7f1da18ab5f3ece18ed31032260be178 100644
--- a/content/common/gpu/gpu_memory_manager.cc
+++ b/content/common/gpu/gpu_memory_manager.cc
@@ -63,7 +63,8 @@ GpuMemoryManager::GpuMemoryManager(GpuMemoryManagerClient* client,
: client_(client),
manage_immediate_scheduled_(false),
max_surfaces_with_frontbuffer_soft_limit_(
- max_surfaces_with_frontbuffer_soft_limit) {
+ max_surfaces_with_frontbuffer_soft_limit),
+ peak_assigned_allocation_sum_(0) {
}
GpuMemoryManager::~GpuMemoryManager() {
@@ -103,6 +104,11 @@ void GpuMemoryManager::ScheduleManage(bool immediate) {
}
}
+size_t GpuMemoryManager::GetAvailableGpuMemory() const {
+ // TODO(mmocny): Implement this with real system figures.
+ return kMaximumAllocationForTabs;
+}
+
// The current Manage algorithm simply classifies contexts (stubs) into
// "foreground", "background", or "hibernated" categories.
// For each of these three categories, there are predefined memory allocation
« content/common/gpu/gpu_memory_allocation.h ('K') | « content/common/gpu/gpu_memory_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698