OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_MANAGED_TILE_STATE_H_ | 5 #ifndef CC_RESOURCES_MANAGED_TILE_STATE_H_ |
6 #define CC_RESOURCES_MANAGED_TILE_STATE_H_ | 6 #define CC_RESOURCES_MANAGED_TILE_STATE_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "cc/resources/platform_color.h" | 9 #include "cc/resources/platform_color.h" |
10 #include "cc/resources/raster_worker_pool.h" | 10 #include "cc/resources/raster_worker_pool.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 AT_LAST_AND_ACTIVE_BIN = 5, // Only do this after all other bins. | 25 AT_LAST_AND_ACTIVE_BIN = 5, // Only do this after all other bins. |
26 AT_LAST_BIN = 6, // Only do this after all other bins. | 26 AT_LAST_BIN = 6, // Only do this after all other bins. |
27 NEVER_BIN = 7, // Dont bother. | 27 NEVER_BIN = 7, // Dont bother. |
28 NUM_BINS = 8 | 28 NUM_BINS = 8 |
29 // NOTE: Be sure to update ManagedTileBinAsValue and kBinPolicyMap when adding | 29 // NOTE: Be sure to update ManagedTileBinAsValue and kBinPolicyMap when adding |
30 // or reordering fields. | 30 // or reordering fields. |
31 }; | 31 }; |
32 scoped_ptr<base::Value> ManagedTileBinAsValue( | 32 scoped_ptr<base::Value> ManagedTileBinAsValue( |
33 ManagedTileBin bin); | 33 ManagedTileBin bin); |
34 | 34 |
35 enum ManagedTileBinPriority { | |
36 HIGH_PRIORITY_BIN = 0, | |
37 LOW_PRIORITY_BIN = 1, | |
38 NUM_BIN_PRIORITIES = 2 | |
39 }; | |
40 scoped_ptr<base::Value> ManagedTileBinPriorityAsValue( | |
41 ManagedTileBinPriority bin); | |
42 | |
43 // This is state that is specific to a tile that is | 35 // This is state that is specific to a tile that is |
44 // managed by the TileManager. | 36 // managed by the TileManager. |
45 class CC_EXPORT ManagedTileState { | 37 class CC_EXPORT ManagedTileState { |
46 public: | 38 public: |
47 class CC_EXPORT TileVersion { | 39 class CC_EXPORT TileVersion { |
48 public: | 40 public: |
49 enum Mode { | 41 enum Mode { |
50 RESOURCE_MODE, | 42 RESOURCE_MODE, |
51 SOLID_COLOR_MODE, | 43 SOLID_COLOR_MODE, |
52 PICTURE_PILE_MODE | 44 PICTURE_PILE_MODE |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 float distance_to_visible_in_pixels; | 137 float distance_to_visible_in_pixels; |
146 bool visible_and_ready_to_draw; | 138 bool visible_and_ready_to_draw; |
147 | 139 |
148 // Priority for this state from the last time we assigned memory. | 140 // Priority for this state from the last time we assigned memory. |
149 unsigned scheduled_priority; | 141 unsigned scheduled_priority; |
150 }; | 142 }; |
151 | 143 |
152 } // namespace cc | 144 } // namespace cc |
153 | 145 |
154 #endif // CC_RESOURCES_MANAGED_TILE_STATE_H_ | 146 #endif // CC_RESOURCES_MANAGED_TILE_STATE_H_ |
OLD | NEW |