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

Side by Side Diff: content/common/gpu/gpu_memory_manager.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/common/gpu/gpu_memory_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_
6 #define CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_
7 7
8 #if defined(ENABLE_GPU) 8 #if defined(ENABLE_GPU)
9 9
10 #include <vector> 10 #include <vector>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 friend class GpuMemoryManagerTest; 80 friend class GpuMemoryManagerTest;
81 81
82 void Manage(); 82 void Manage();
83 83
84 size_t CalculateBonusMemoryAllocationBasedOnSize(gfx::Size size) const; 84 size_t CalculateBonusMemoryAllocationBasedOnSize(gfx::Size size) const;
85 85
86 size_t GetAvailableGpuMemory() const { 86 size_t GetAvailableGpuMemory() const {
87 return bytes_available_gpu_memory_; 87 return bytes_available_gpu_memory_;
88 } 88 }
89 89
90 // The maximum amount of memory that a tab may be assigned
91 size_t GetMaximumTabAllocation() const {
92 return 128 * 1024 * 1024;
93 }
94
90 // The minimum non-zero amount of memory that a tab may be assigned 95 // The minimum non-zero amount of memory that a tab may be assigned
91 size_t GetMinimumTabAllocation() const { 96 size_t GetMinimumTabAllocation() const {
92 #if defined(OS_ANDROID) 97 #if defined(OS_ANDROID)
93 return 32 * 1024 * 1024; 98 return 32 * 1024 * 1024;
94 #else 99 #else
95 return 64 * 1024 * 1024; 100 return 64 * 1024 * 1024;
96 #endif 101 #endif
97 } 102 }
98 103
99 class CONTENT_EXPORT StubWithSurfaceComparator { 104 class CONTENT_EXPORT StubWithSurfaceComparator {
(...skipping 17 matching lines...) Expand all
117 // The current total memory usage, and historical maximum memory usage 122 // The current total memory usage, and historical maximum memory usage
118 size_t bytes_allocated_current_; 123 size_t bytes_allocated_current_;
119 size_t bytes_allocated_historical_max_; 124 size_t bytes_allocated_historical_max_;
120 125
121 DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager); 126 DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager);
122 }; 127 };
123 128
124 #endif 129 #endif
125 130
126 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ 131 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/gpu_memory_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698