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 | 10 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 tree_priority(SAME_PRIORITY_FOR_BOTH_TREES) {} | 150 tree_priority(SAME_PRIORITY_FOR_BOTH_TREES) {} |
151 | 151 |
152 TileMemoryLimitPolicy memory_limit_policy; | 152 TileMemoryLimitPolicy memory_limit_policy; |
153 | 153 |
154 size_t soft_memory_limit_in_bytes; | 154 size_t soft_memory_limit_in_bytes; |
155 size_t hard_memory_limit_in_bytes; | 155 size_t hard_memory_limit_in_bytes; |
156 size_t num_resources_limit; | 156 size_t num_resources_limit; |
157 | 157 |
158 TreePriority tree_priority; | 158 TreePriority tree_priority; |
159 | 159 |
160 bool operator==(const GlobalStateThatImpactsTilePriority& other) const { | |
161 return memory_limit_policy == other.memory_limit_policy && | |
162 soft_memory_limit_in_bytes == other.soft_memory_limit_in_bytes && | |
163 hard_memory_limit_in_bytes == other.hard_memory_limit_in_bytes && | |
164 num_resources_limit == other.num_resources_limit && | |
165 tree_priority == other.tree_priority; | |
166 } | |
167 bool operator!=(const GlobalStateThatImpactsTilePriority& other) const { | |
168 return !(*this == other); | |
169 } | |
170 | |
171 scoped_ptr<base::Value> AsValue() const; | 160 scoped_ptr<base::Value> AsValue() const; |
172 }; | 161 }; |
173 | 162 |
174 } // namespace cc | 163 } // namespace cc |
175 | 164 |
176 #endif // CC_RESOURCES_TILE_PRIORITY_H_ | 165 #endif // CC_RESOURCES_TILE_PRIORITY_H_ |
OLD | NEW |