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_TILE_PRIORITY_H_ | 5 #ifndef CC_TILE_PRIORITY_H_ |
6 #define CC_TILE_PRIORITY_H_ | 6 #define CC_TILE_PRIORITY_H_ |
7 | 7 |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 enum TileResolution { | 33 enum TileResolution { |
34 LOW_RESOLUTION = 0 , | 34 LOW_RESOLUTION = 0 , |
35 HIGH_RESOLUTION = 1, | 35 HIGH_RESOLUTION = 1, |
36 NON_IDEAL_RESOLUTION = 2, | 36 NON_IDEAL_RESOLUTION = 2, |
37 }; | 37 }; |
38 | 38 |
39 struct CC_EXPORT TilePriority { | 39 struct CC_EXPORT TilePriority { |
40 TilePriority() | 40 TilePriority() |
41 : is_live(false), | 41 : is_live(false), |
42 resolution(NON_IDEAL_RESOLUTION), | 42 resolution(NON_IDEAL_RESOLUTION), |
43 time_to_visible_in_seconds(std::numeric_limits<float>::max()), | 43 time_to_visible_in_seconds(std::numeric_limits<float>::infinity()), |
44 distance_to_visible_in_pixels(std::numeric_limits<float>::max()) {} | 44 distance_to_visible_in_pixels(std::numeric_limits<float>::infinity()) {} |
45 | 45 |
46 TilePriority( | 46 TilePriority( |
47 TileResolution resolution, | 47 TileResolution resolution, |
48 float time_to_visible_in_seconds, | 48 float time_to_visible_in_seconds, |
49 float distance_to_visible_in_pixels) | 49 float distance_to_visible_in_pixels) |
50 : is_live(true), | 50 : is_live(true), |
51 resolution(resolution), | 51 resolution(resolution), |
52 time_to_visible_in_seconds(time_to_visible_in_seconds), | 52 time_to_visible_in_seconds(time_to_visible_in_seconds), |
53 distance_to_visible_in_pixels(distance_to_visible_in_pixels) {} | 53 distance_to_visible_in_pixels(distance_to_visible_in_pixels) {} |
54 | 54 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 size_t memory_limit_in_bytes; | 161 size_t memory_limit_in_bytes; |
162 | 162 |
163 TreePriority tree_priority; | 163 TreePriority tree_priority; |
164 | 164 |
165 scoped_ptr<base::Value> AsValue() const; | 165 scoped_ptr<base::Value> AsValue() const; |
166 }; | 166 }; |
167 | 167 |
168 } // namespace cc | 168 } // namespace cc |
169 | 169 |
170 #endif // CC_TILE_PRIORITY_H_ | 170 #endif // CC_TILE_PRIORITY_H_ |
OLD | NEW |