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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 } else if (active.priority_bin > pending.priority_bin) { | 67 } else if (active.priority_bin > pending.priority_bin) { |
68 priority_bin = pending.priority_bin; | 68 priority_bin = pending.priority_bin; |
69 distance_to_visible = pending.distance_to_visible; | 69 distance_to_visible = pending.distance_to_visible; |
70 } else { | 70 } else { |
71 priority_bin = active.priority_bin; | 71 priority_bin = active.priority_bin; |
72 distance_to_visible = | 72 distance_to_visible = |
73 std::min(active.distance_to_visible, pending.distance_to_visible); | 73 std::min(active.distance_to_visible, pending.distance_to_visible); |
74 } | 74 } |
75 } | 75 } |
76 | 76 |
77 void AsValueInto(base::debug::TracedValue* dict) const; | 77 void AsValueInto(base::trace_event::TracedValue* dict) const; |
78 | 78 |
79 bool operator ==(const TilePriority& other) const { | 79 bool operator ==(const TilePriority& other) const { |
80 return resolution == other.resolution && | 80 return resolution == other.resolution && |
81 priority_bin == other.priority_bin && | 81 priority_bin == other.priority_bin && |
82 distance_to_visible == other.distance_to_visible; | 82 distance_to_visible == other.distance_to_visible; |
83 } | 83 } |
84 | 84 |
85 bool operator !=(const TilePriority& other) const { | 85 bool operator !=(const TilePriority& other) const { |
86 return !(*this == other); | 86 return !(*this == other); |
87 } | 87 } |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 return memory_limit_policy == other.memory_limit_policy && | 144 return memory_limit_policy == other.memory_limit_policy && |
145 soft_memory_limit_in_bytes == other.soft_memory_limit_in_bytes && | 145 soft_memory_limit_in_bytes == other.soft_memory_limit_in_bytes && |
146 hard_memory_limit_in_bytes == other.hard_memory_limit_in_bytes && | 146 hard_memory_limit_in_bytes == other.hard_memory_limit_in_bytes && |
147 num_resources_limit == other.num_resources_limit && | 147 num_resources_limit == other.num_resources_limit && |
148 tree_priority == other.tree_priority; | 148 tree_priority == other.tree_priority; |
149 } | 149 } |
150 bool operator!=(const GlobalStateThatImpactsTilePriority& other) const { | 150 bool operator!=(const GlobalStateThatImpactsTilePriority& other) const { |
151 return !(*this == other); | 151 return !(*this == other); |
152 } | 152 } |
153 | 153 |
154 void AsValueInto(base::debug::TracedValue* dict) const; | 154 void AsValueInto(base::trace_event::TracedValue* dict) const; |
155 }; | 155 }; |
156 | 156 |
157 } // namespace cc | 157 } // namespace cc |
158 | 158 |
159 #endif // CC_RESOURCES_TILE_PRIORITY_H_ | 159 #endif // CC_RESOURCES_TILE_PRIORITY_H_ |
OLD | NEW |