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_mode.h" | 10 #include "cc/resources/raster_mode.h" |
11 #include "cc/resources/raster_worker_pool.h" | 11 #include "cc/resources/rasterizer.h" |
12 #include "cc/resources/resource_pool.h" | 12 #include "cc/resources/resource_pool.h" |
13 #include "cc/resources/resource_provider.h" | 13 #include "cc/resources/resource_provider.h" |
14 #include "cc/resources/scoped_resource.h" | 14 #include "cc/resources/scoped_resource.h" |
15 #include "cc/resources/tile_priority.h" | 15 #include "cc/resources/tile_priority.h" |
16 | 16 |
17 namespace cc { | 17 namespace cc { |
18 | 18 |
19 class TileManager; | 19 class TileManager; |
20 | 20 |
21 // Tile manager classifying tiles into a few basic bins: | 21 // Tile manager classifying tiles into a few basic bins: |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 | 96 |
97 void set_has_text(bool has_text) { has_text_ = has_text; } | 97 void set_has_text(bool has_text) { has_text_ = has_text; } |
98 | 98 |
99 void set_rasterize_on_demand() { mode_ = PICTURE_PILE_MODE; } | 99 void set_rasterize_on_demand() { mode_ = PICTURE_PILE_MODE; } |
100 | 100 |
101 Mode mode_; | 101 Mode mode_; |
102 SkColor solid_color_; | 102 SkColor solid_color_; |
103 bool has_text_; | 103 bool has_text_; |
104 scoped_ptr<ScopedResource> resource_; | 104 scoped_ptr<ScopedResource> resource_; |
105 scoped_refptr<internal::RasterWorkerPoolTask> raster_task_; | 105 scoped_refptr<internal::RasterTask> raster_task_; |
106 }; | 106 }; |
107 | 107 |
108 ManagedTileState(); | 108 ManagedTileState(); |
109 ~ManagedTileState(); | 109 ~ManagedTileState(); |
110 | 110 |
111 scoped_ptr<base::Value> AsValue() const; | 111 scoped_ptr<base::Value> AsValue() const; |
112 | 112 |
113 // Persisted state: valid all the time. | 113 // Persisted state: valid all the time. |
114 TileVersion tile_versions[NUM_RASTER_MODES]; | 114 TileVersion tile_versions[NUM_RASTER_MODES]; |
115 RasterMode raster_mode; | 115 RasterMode raster_mode; |
116 | 116 |
117 ManagedTileBin bin; | 117 ManagedTileBin bin; |
118 | 118 |
119 TileResolution resolution; | 119 TileResolution resolution; |
120 bool required_for_activation; | 120 bool required_for_activation; |
121 TilePriority::PriorityBin priority_bin; | 121 TilePriority::PriorityBin priority_bin; |
122 float distance_to_visible; | 122 float distance_to_visible; |
123 bool visible_and_ready_to_draw; | 123 bool visible_and_ready_to_draw; |
124 | 124 |
125 // Priority for this state from the last time we assigned memory. | 125 // Priority for this state from the last time we assigned memory. |
126 unsigned scheduled_priority; | 126 unsigned scheduled_priority; |
127 }; | 127 }; |
128 | 128 |
129 } // namespace cc | 129 } // namespace cc |
130 | 130 |
131 #endif // CC_RESOURCES_MANAGED_TILE_STATE_H_ | 131 #endif // CC_RESOURCES_MANAGED_TILE_STATE_H_ |
OLD | NEW |