summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authormmocny@chromium.org <mmocny@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-03 19:17:50 +0000
committermmocny@chromium.org <mmocny@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-03 19:17:50 +0000
commit1e0eace859b0582bb7bcb9513129d3fcca5d4e71 (patch)
tree4c604f2546f07a135c57ea1343bee73f0b8be7d2 /content
parent019c7f72937465f45ee86a686be9c239069deff9 (diff)
downloadchromium_src-1e0eace859b0582bb7bcb9513129d3fcca5d4e71.zip
chromium_src-1e0eace859b0582bb7bcb9513129d3fcca5d4e71.tar.gz
chromium_src-1e0eace859b0582bb7bcb9513129d3fcca5d4e71.tar.bz2
Removing more static initializers
TBR=mmocny BUG=None TEST=Manual Review URL: https://chromiumcodereview.appspot.com/9309086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120360 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/common/gpu/gpu_memory_manager.cc22
1 files changed, 12 insertions, 10 deletions
diff --git a/content/common/gpu/gpu_memory_manager.cc b/content/common/gpu/gpu_memory_manager.cc
index b7fcdc4..e1000ab 100644
--- a/content/common/gpu/gpu_memory_manager.cc
+++ b/content/common/gpu/gpu_memory_manager.cc
@@ -20,16 +20,10 @@ namespace {
// GpuMemoryAllocation::gpuResourceSizeInBytes. Currently, the value is only
// used to check if it is 0 or non-0. In the future, these values will not
// come from constants, but rather will be distributed dynamically.
-const uint32 kResourceSizeNonHibernatedTab = 1;
-const uint32 kResourceSizeHibernatedTab = 0;
-
-// Set up three allocation values for the three possible stub states
-const GpuMemoryAllocation all_buffers_allocation(
- kResourceSizeNonHibernatedTab, true, true);
-const GpuMemoryAllocation front_buffers_allocation(
- kResourceSizeNonHibernatedTab, true, false);
-const GpuMemoryAllocation no_buffers_allocation(
- kResourceSizeHibernatedTab, false, false);
+enum {
+ kResourceSizeNonHibernatedTab = 1,
+ kResourceSizeHibernatedTab = 0
+};
}
@@ -85,6 +79,14 @@ void GpuMemoryManager::ScheduleManage() {
// max_surfaces_with_frontbuffer_soft_limit_ limit.
// * Will not have either buffer.
void GpuMemoryManager::Manage() {
+ // Set up three allocation values for the three possible stub states
+ const GpuMemoryAllocation all_buffers_allocation(
+ kResourceSizeNonHibernatedTab, true, true);
+ const GpuMemoryAllocation front_buffers_allocation(
+ kResourceSizeNonHibernatedTab, true, false);
+ const GpuMemoryAllocation no_buffers_allocation(
+ kResourceSizeHibernatedTab, false, false);
+
manage_scheduled_ = false;
// Create stub lists by separating out the two types received from client