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

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

Issue 9309086: Removing more static initializers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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 | « no previous file | no next file » | 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 b7fcdc4b7d8db40c89831d5de698d260bc5ba400..e1000ab2756776275e7422ae04d1883ee78901bd 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698