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

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

Issue 10827342: Reduce per-tab memory to 128M maximum, reduce default maximum across all tabs to 256M (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Actually drop the limit to 256MB Created 8 years, 4 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.h ('k') | content/common/gpu/gpu_memory_manager_unittest.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.cc
diff --git a/content/common/gpu/gpu_memory_manager.cc b/content/common/gpu/gpu_memory_manager.cc
index 945894e0c43f366039f4f6fd049c8992b6e91953..a52443de3e1737b465ab860b91582cf67c0073e4 100644
--- a/content/common/gpu/gpu_memory_manager.cc
+++ b/content/common/gpu/gpu_memory_manager.cc
@@ -86,7 +86,7 @@ GpuMemoryManager::GpuMemoryManager(GpuMemoryManagerClient* client,
#if defined(OS_ANDROID)
bytes_available_gpu_memory_ = 64 * 1024 * 1024;
#else
- bytes_available_gpu_memory_ = 448 * 1024 * 1024;
+ bytes_available_gpu_memory_ = 256 * 1024 * 1024;
#endif
}
}
@@ -262,6 +262,10 @@ void GpuMemoryManager::Manage() {
bonus_allocation = CalculateBonusMemoryAllocationBasedOnSize(
stubs_with_surface_foreground[0]->GetSurfaceSize());
#endif
+ size_t stubs_with_surface_foreground_allocation = GetMinimumTabAllocation() +
+ bonus_allocation;
+ if (stubs_with_surface_foreground_allocation >= GetMaximumTabAllocation())
+ stubs_with_surface_foreground_allocation = GetMaximumTabAllocation();
stub_memory_stats_for_last_manage_.clear();
@@ -269,7 +273,7 @@ void GpuMemoryManager::Manage() {
AssignMemoryAllocations(
&stub_memory_stats_for_last_manage_,
stubs_with_surface_foreground,
- GpuMemoryAllocation(GetMinimumTabAllocation() + bonus_allocation,
+ GpuMemoryAllocation(stubs_with_surface_foreground_allocation,
GpuMemoryAllocation::kHasFrontbuffer |
GpuMemoryAllocation::kHasBackbuffer),
true);
« no previous file with comments | « content/common/gpu/gpu_memory_manager.h ('k') | content/common/gpu/gpu_memory_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698