OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CC_RESOURCES_TILE_PRIORITY_H_ | 5 #ifndef CC_RESOURCES_TILE_PRIORITY_H_ |
6 #define CC_RESOURCES_TILE_PRIORITY_H_ | 6 #define CC_RESOURCES_TILE_PRIORITY_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <limits> | 9 #include <limits> |
10 #include <string> | 10 #include <string> |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 | 103 |
104 TileResolution resolution; | 104 TileResolution resolution; |
105 bool required_for_activation; | 105 bool required_for_activation; |
106 PriorityBin priority_bin; | 106 PriorityBin priority_bin; |
107 float distance_to_visible; | 107 float distance_to_visible; |
108 }; | 108 }; |
109 | 109 |
110 std::string TilePriorityBinToString(TilePriority::PriorityBin bin); | 110 std::string TilePriorityBinToString(TilePriority::PriorityBin bin); |
111 | 111 |
112 enum TileMemoryLimitPolicy { | 112 enum TileMemoryLimitPolicy { |
113 // Nothing. | 113 // Nothing. This mode is used when visible is set to false. |
114 ALLOW_NOTHING = 0, | 114 ALLOW_NOTHING = 0, |
115 | 115 |
116 // You might be made visible, but you're not being interacted with. | 116 // You might be made visible, but you're not being interacted with. |
117 ALLOW_ABSOLUTE_MINIMUM = 1, // Tall. | 117 ALLOW_ABSOLUTE_MINIMUM = 1, // Tall. |
118 | 118 |
119 // You're being interacted with, but we're low on memory. | 119 // You're being interacted with, but we're low on memory. |
120 ALLOW_PREPAINT_ONLY = 2, // Grande. | 120 ALLOW_PREPAINT_ONLY = 2, // Grande. |
121 | 121 |
122 // You're the only thing in town. Go crazy. | 122 // You're the only thing in town. Go crazy. |
123 ALLOW_ANYTHING = 3, // Venti. | 123 ALLOW_ANYTHING = 3, // Venti. |
124 | |
vmpstr
2014/09/23 17:25:32
FYI, this is a git cl format change.
| |
125 NUM_TILE_MEMORY_LIMIT_POLICIES = 4, | 124 NUM_TILE_MEMORY_LIMIT_POLICIES = 4, |
126 | 125 |
127 // NOTE: Be sure to update TreePriorityAsValue and kBinPolicyMap when adding | 126 // NOTE: Be sure to update TreePriorityAsValue and kBinPolicyMap when adding |
128 // or reordering fields. | 127 // or reordering fields. |
129 }; | 128 }; |
130 std::string TileMemoryLimitPolicyToString(TileMemoryLimitPolicy policy); | 129 std::string TileMemoryLimitPolicyToString(TileMemoryLimitPolicy policy); |
131 | 130 |
132 enum TreePriority { | 131 enum TreePriority { |
133 SAME_PRIORITY_FOR_BOTH_TREES, | 132 SAME_PRIORITY_FOR_BOTH_TREES, |
134 SMOOTHNESS_TAKES_PRIORITY, | 133 SMOOTHNESS_TAKES_PRIORITY, |
(...skipping 30 matching lines...) Expand all Loading... | |
165 bool operator!=(const GlobalStateThatImpactsTilePriority& other) const { | 164 bool operator!=(const GlobalStateThatImpactsTilePriority& other) const { |
166 return !(*this == other); | 165 return !(*this == other); |
167 } | 166 } |
168 | 167 |
169 void AsValueInto(base::debug::TracedValue* dict) const; | 168 void AsValueInto(base::debug::TracedValue* dict) const; |
170 }; | 169 }; |
171 | 170 |
172 } // namespace cc | 171 } // namespace cc |
173 | 172 |
174 #endif // CC_RESOURCES_TILE_PRIORITY_H_ | 173 #endif // CC_RESOURCES_TILE_PRIORITY_H_ |
OLD | NEW |