Chromium Code Reviews| 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_MANAGER_H_ | 5 #ifndef CC_TILE_MANAGER_H_ |
| 6 #define CC_TILE_MANAGER_H_ | 6 #define CC_TILE_MANAGER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 enum TileRasterState { | 56 enum TileRasterState { |
| 57 IDLE_STATE = 0, | 57 IDLE_STATE = 0, |
| 58 WAITING_FOR_RASTER_STATE = 1, | 58 WAITING_FOR_RASTER_STATE = 1, |
| 59 RASTER_STATE = 2, | 59 RASTER_STATE = 2, |
| 60 SET_PIXELS_STATE = 3, | 60 SET_PIXELS_STATE = 3, |
| 61 NUM_STATES = 4 | 61 NUM_STATES = 4 |
| 62 }; | 62 }; |
| 63 scoped_ptr<base::Value> TileRasterStateAsValue( | 63 scoped_ptr<base::Value> TileRasterStateAsValue( |
| 64 TileRasterState bin); | 64 TileRasterState bin); |
| 65 | 65 |
| 66 // Metadata that is passed to raster tasks for diagnostic purposes. | |
| 67 struct RasterTaskMetadata { | |
| 68 bool is_tile_in_pending_tree_now_bin; | |
| 69 TileResolution tile_resolution; | |
| 70 }; | |
| 71 | |
| 66 // This is state that is specific to a tile that is | 72 // This is state that is specific to a tile that is |
| 67 // managed by the TileManager. | 73 // managed by the TileManager. |
| 68 class CC_EXPORT ManagedTileState { | 74 class CC_EXPORT ManagedTileState { |
| 69 public: | 75 public: |
| 70 ManagedTileState(); | 76 ManagedTileState(); |
| 71 ~ManagedTileState(); | 77 ~ManagedTileState(); |
| 72 scoped_ptr<base::Value> AsValue() const; | 78 scoped_ptr<base::Value> AsValue() const; |
| 73 | 79 |
| 74 // Persisted state: valid all the time. | 80 // Persisted state: valid all the time. |
| 75 bool can_use_gpu_memory; | 81 bool can_use_gpu_memory; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 168 void DidTileRasterStateChange(Tile* tile, TileRasterState state); | 174 void DidTileRasterStateChange(Tile* tile, TileRasterState state); |
| 169 void DidTileTreeBinChange(Tile* tile, | 175 void DidTileTreeBinChange(Tile* tile, |
| 170 TileManagerBin new_tree_bin, | 176 TileManagerBin new_tree_bin, |
| 171 WhichTree tree); | 177 WhichTree tree); |
| 172 scoped_ptr<Value> GetMemoryRequirementsAsValue() const; | 178 scoped_ptr<Value> GetMemoryRequirementsAsValue() const; |
| 173 | 179 |
| 174 static void PerformRaster(uint8* buffer, | 180 static void PerformRaster(uint8* buffer, |
| 175 const gfx::Rect& rect, | 181 const gfx::Rect& rect, |
| 176 float contents_scale, | 182 float contents_scale, |
| 177 bool use_cheapness_estimator, | 183 bool use_cheapness_estimator, |
| 178 PicturePileImpl* picture_pile, | 184 const RasterTaskMetadata& metadata, |
| 185 PicturePileImpl* picture_pinle, | |
|
reveman
2013/02/13 10:24:39
typo: should be picture_pile not picture_pinle
| |
| 179 RenderingStats* stats); | 186 RenderingStats* stats); |
| 180 static void RunImageDecodeTask(skia::LazyPixelRef* pixel_ref, | 187 static void RunImageDecodeTask(skia::LazyPixelRef* pixel_ref, |
| 181 RenderingStats* stats); | 188 RenderingStats* stats); |
| 182 | 189 |
| 183 static void RecordCheapnessPredictorResults(bool is_predicted_cheap, | 190 static void RecordCheapnessPredictorResults(bool is_predicted_cheap, |
| 184 bool is_actually_cheap); | 191 bool is_actually_cheap); |
| 185 | 192 |
| 186 TileManagerClient* client_; | 193 TileManagerClient* client_; |
| 187 scoped_ptr<ResourcePool> resource_pool_; | 194 scoped_ptr<ResourcePool> resource_pool_; |
| 188 scoped_ptr<RasterWorkerPool> raster_worker_pool_; | 195 scoped_ptr<RasterWorkerPool> raster_worker_pool_; |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 215 | 222 |
| 216 bool use_cheapness_estimator_; | 223 bool use_cheapness_estimator_; |
| 217 int raster_state_count_[NUM_STATES][NUM_TREES][NUM_BINS]; | 224 int raster_state_count_[NUM_STATES][NUM_TREES][NUM_BINS]; |
| 218 | 225 |
| 219 DISALLOW_COPY_AND_ASSIGN(TileManager); | 226 DISALLOW_COPY_AND_ASSIGN(TileManager); |
| 220 }; | 227 }; |
| 221 | 228 |
| 222 } // namespace cc | 229 } // namespace cc |
| 223 | 230 |
| 224 #endif // CC_TILE_MANAGER_H_ | 231 #endif // CC_TILE_MANAGER_H_ |
| OLD | NEW |