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

Side by Side Diff: cc/resources/tile_priority.h

Issue 643993005: Remove limit on number of resources in cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // Be sure to update TreePriorityAsValue when adding new fields. 122 // Be sure to update TreePriorityAsValue when adding new fields.
123 }; 123 };
124 std::string TreePriorityToString(TreePriority prio); 124 std::string TreePriorityToString(TreePriority prio);
125 125
126 class GlobalStateThatImpactsTilePriority { 126 class GlobalStateThatImpactsTilePriority {
127 public: 127 public:
128 GlobalStateThatImpactsTilePriority() 128 GlobalStateThatImpactsTilePriority()
129 : memory_limit_policy(ALLOW_NOTHING), 129 : memory_limit_policy(ALLOW_NOTHING),
130 soft_memory_limit_in_bytes(0), 130 soft_memory_limit_in_bytes(0),
131 hard_memory_limit_in_bytes(0), 131 hard_memory_limit_in_bytes(0),
132 num_resources_limit(0),
133 tree_priority(SAME_PRIORITY_FOR_BOTH_TREES) {} 132 tree_priority(SAME_PRIORITY_FOR_BOTH_TREES) {}
134 133
135 TileMemoryLimitPolicy memory_limit_policy; 134 TileMemoryLimitPolicy memory_limit_policy;
136 135
137 size_t soft_memory_limit_in_bytes; 136 size_t soft_memory_limit_in_bytes;
138 size_t hard_memory_limit_in_bytes; 137 size_t hard_memory_limit_in_bytes;
139 size_t num_resources_limit;
140 138
141 TreePriority tree_priority; 139 TreePriority tree_priority;
142 140
143 bool operator==(const GlobalStateThatImpactsTilePriority& other) const { 141 bool operator==(const GlobalStateThatImpactsTilePriority& other) const {
144 return memory_limit_policy == other.memory_limit_policy && 142 return memory_limit_policy == other.memory_limit_policy &&
145 soft_memory_limit_in_bytes == other.soft_memory_limit_in_bytes && 143 soft_memory_limit_in_bytes == other.soft_memory_limit_in_bytes &&
146 hard_memory_limit_in_bytes == other.hard_memory_limit_in_bytes && 144 hard_memory_limit_in_bytes == other.hard_memory_limit_in_bytes &&
147 num_resources_limit == other.num_resources_limit &&
148 tree_priority == other.tree_priority; 145 tree_priority == other.tree_priority;
149 } 146 }
150 bool operator!=(const GlobalStateThatImpactsTilePriority& other) const { 147 bool operator!=(const GlobalStateThatImpactsTilePriority& other) const {
151 return !(*this == other); 148 return !(*this == other);
152 } 149 }
153 150
154 void AsValueInto(base::debug::TracedValue* dict) const; 151 void AsValueInto(base::debug::TracedValue* dict) const;
155 }; 152 };
156 153
157 } // namespace cc 154 } // namespace cc
158 155
159 #endif // CC_RESOURCES_TILE_PRIORITY_H_ 156 #endif // CC_RESOURCES_TILE_PRIORITY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698