Index: cc/resources/managed_tile_state.h |
diff --git a/cc/resources/managed_tile_state.h b/cc/resources/managed_tile_state.h |
index 113c5320bf70cac56285fe675192c33c9c7084b3..9aa287acd325596cb1976d603650d1a392288b55 100644 |
--- a/cc/resources/managed_tile_state.h |
+++ b/cc/resources/managed_tile_state.h |
@@ -24,7 +24,7 @@ enum ManagedTileBin { |
EVENTUALLY_BIN = 4, // Nice to have, if we've got memory and time. |
NEVER_AND_ACTIVE_BIN = 5, // Dont bother, but has a task or resource. |
NEVER_BIN = 6, // Dont bother. |
- NUM_BINS = 7 |
+ MAX_BIN = NEVER_BIN |
vmpstr
2013/08/22 23:33:34
I'd prefer we keep NUM_BINS. Maybe something like
danakj
2013/08/23 00:38:13
This seems like a pretty nice idea to me. Maybe wi
|
// NOTE: Be sure to update ManagedTileBinAsValue and kBinPolicyMap when adding |
// or reordering fields. |
}; |
@@ -34,7 +34,7 @@ scoped_ptr<base::Value> ManagedTileBinAsValue( |
enum ManagedTileBinPriority { |
HIGH_PRIORITY_BIN = 0, |
LOW_PRIORITY_BIN = 1, |
- NUM_BIN_PRIORITIES = 2 |
+ MAX_BIN_PRIORITY = LOW_PRIORITY_BIN |
}; |
scoped_ptr<base::Value> ManagedTileBinPriorityAsValue( |
ManagedTileBinPriority bin); |
@@ -48,8 +48,7 @@ class CC_EXPORT ManagedTileState { |
enum Mode { |
RESOURCE_MODE, |
SOLID_COLOR_MODE, |
- PICTURE_PILE_MODE, |
- NUM_MODES |
+ PICTURE_PILE_MODE |
}; |
TileVersion(); |
@@ -129,7 +128,7 @@ class CC_EXPORT ManagedTileState { |
scoped_ptr<base::Value> AsValue() const; |
// Persisted state: valid all the time. |
- TileVersion tile_versions[NUM_RASTER_MODES]; |
+ TileVersion tile_versions[MAX_RASTER_MODE + 1]; |
RasterMode raster_mode; |
// Ephemeral state, valid only during TileManager::ManageTiles. |
@@ -140,8 +139,8 @@ class CC_EXPORT ManagedTileState { |
bin[LOW_PRIORITY_BIN] == NEVER_AND_ACTIVE_BIN); |
} |
- ManagedTileBin bin[NUM_BIN_PRIORITIES]; |
- ManagedTileBin tree_bin[NUM_TREES]; |
+ ManagedTileBin bin[MAX_BIN_PRIORITY + 1]; |
+ ManagedTileBin tree_bin[MAX_TREE + 1]; |
// The bin that the tile would have if the GPU memory manager had |
// a maximally permissive policy, send to the GPU memory manager |