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

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

Issue 594703002: cc: Don't activate rasterize on demand when we have 0 memory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 6 years, 3 months 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
« no previous file with comments | « cc/resources/tile_manager.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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_
OLDNEW
« no previous file with comments | « cc/resources/tile_manager.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698