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 <limits> | 9 #include <limits> |
9 | 10 |
10 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 #include "cc/resources/picture_pile.h" | 13 #include "cc/resources/picture_pile.h" |
13 #include "ui/gfx/quad_f.h" | 14 #include "ui/gfx/quad_f.h" |
14 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
15 #include "ui/gfx/size.h" | 16 #include "ui/gfx/size.h" |
16 | 17 |
17 namespace base { | 18 namespace base { |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 145 |
145 private: | 146 private: |
146 gfx::QuadF current_screen_quad; | 147 gfx::QuadF current_screen_quad; |
147 }; | 148 }; |
148 | 149 |
149 enum TileMemoryLimitPolicy { | 150 enum TileMemoryLimitPolicy { |
150 // Nothing. | 151 // Nothing. |
151 ALLOW_NOTHING, | 152 ALLOW_NOTHING, |
152 | 153 |
153 // You might be made visible, but you're not being interacted with. | 154 // You might be made visible, but you're not being interacted with. |
154 ALLOW_ABSOLUTE_MINIMUM, // Tall. | 155 ALLOW_ABSOLUTE_MINIMUM, // Tall. |
155 | 156 |
156 // You're being interacted with, but we're low on memory. | 157 // You're being interacted with, but we're low on memory. |
157 ALLOW_PREPAINT_ONLY, // Grande. | 158 ALLOW_PREPAINT_ONLY, // Grande. |
158 | 159 |
159 // You're the only thing in town. Go crazy. | 160 // You're the only thing in town. Go crazy. |
160 ALLOW_ANYTHING, // Venti. | 161 ALLOW_ANYTHING, // Venti. |
161 | 162 |
162 // Be sure to update TreePriorityAsValue when adding new fields. | 163 // Be sure to update TreePriorityAsValue when adding new fields. |
163 }; | 164 }; |
164 scoped_ptr<base::Value> TileMemoryLimitPolicyAsValue( | 165 scoped_ptr<base::Value> TileMemoryLimitPolicyAsValue( |
165 TileMemoryLimitPolicy policy); | 166 TileMemoryLimitPolicy policy); |
166 | 167 |
167 enum TreePriority { | 168 enum TreePriority { |
168 SAME_PRIORITY_FOR_BOTH_TREES, | 169 SAME_PRIORITY_FOR_BOTH_TREES, |
169 SMOOTHNESS_TAKES_PRIORITY, | 170 SMOOTHNESS_TAKES_PRIORITY, |
170 NEW_CONTENT_TAKES_PRIORITY | 171 NEW_CONTENT_TAKES_PRIORITY |
(...skipping 15 matching lines...) Expand all Loading... |
186 size_t memory_limit_in_bytes; | 187 size_t memory_limit_in_bytes; |
187 | 188 |
188 TreePriority tree_priority; | 189 TreePriority tree_priority; |
189 | 190 |
190 scoped_ptr<base::Value> AsValue() const; | 191 scoped_ptr<base::Value> AsValue() const; |
191 }; | 192 }; |
192 | 193 |
193 } // namespace cc | 194 } // namespace cc |
194 | 195 |
195 #endif // CC_RESOURCES_TILE_PRIORITY_H_ | 196 #endif // CC_RESOURCES_TILE_PRIORITY_H_ |
OLD | NEW |