| 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_MANAGER_H_ | 5 #ifndef CC_RESOURCES_TILE_MANAGER_H_ |
| 6 #define CC_RESOURCES_TILE_MANAGER_H_ | 6 #define CC_RESOURCES_TILE_MANAGER_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 scoped_ptr<ScopedResource> resource, | 167 scoped_ptr<ScopedResource> resource, |
| 168 RasterMode raster_mode, | 168 RasterMode raster_mode, |
| 169 const PicturePileImpl::Analysis& analysis, | 169 const PicturePileImpl::Analysis& analysis, |
| 170 bool was_canceled); | 170 bool was_canceled); |
| 171 | 171 |
| 172 inline size_t BytesConsumedIfAllocated(const Tile* tile) const { | 172 inline size_t BytesConsumedIfAllocated(const Tile* tile) const { |
| 173 return Resource::MemorySizeBytes(tile->size(), | 173 return Resource::MemorySizeBytes(tile->size(), |
| 174 raster_worker_pool_->GetResourceFormat()); | 174 raster_worker_pool_->GetResourceFormat()); |
| 175 } | 175 } |
| 176 | 176 |
| 177 RasterMode DetermineRasterMode(const Tile* tile) const; | |
| 178 void FreeResourceForTile(Tile* tile, RasterMode mode); | 177 void FreeResourceForTile(Tile* tile, RasterMode mode); |
| 179 void FreeResourcesForTile(Tile* tile); | 178 void FreeResourcesForTile(Tile* tile); |
| 180 void FreeUnusedResourcesForTile(Tile* tile); | 179 void FreeUnusedResourcesForTile(Tile* tile); |
| 181 scoped_refptr<internal::WorkerPoolTask> CreateImageDecodeTask( | 180 scoped_refptr<internal::WorkerPoolTask> CreateImageDecodeTask( |
| 182 Tile* tile, | 181 Tile* tile, |
| 183 SkPixelRef* pixel_ref); | 182 SkPixelRef* pixel_ref); |
| 184 scoped_refptr<internal::RasterWorkerPoolTask> CreateRasterTask(Tile* tile); | 183 scoped_refptr<internal::RasterWorkerPoolTask> CreateRasterTask(Tile* tile); |
| 185 scoped_ptr<base::Value> GetMemoryRequirementsAsValue() const; | 184 scoped_ptr<base::Value> GetMemoryRequirementsAsValue() const; |
| 186 void UpdatePrioritizedTileSetIfNeeded(); | 185 void UpdatePrioritizedTileSetIfNeeded(); |
| 187 | 186 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 RasterTaskQueue raster_queue_[NUM_RASTER_WORKER_POOL_TYPES]; | 234 RasterTaskQueue raster_queue_[NUM_RASTER_WORKER_POOL_TYPES]; |
| 236 | 235 |
| 237 std::vector<scoped_refptr<internal::Task> > orphan_raster_tasks_; | 236 std::vector<scoped_refptr<internal::Task> > orphan_raster_tasks_; |
| 238 | 237 |
| 239 DISALLOW_COPY_AND_ASSIGN(TileManager); | 238 DISALLOW_COPY_AND_ASSIGN(TileManager); |
| 240 }; | 239 }; |
| 241 | 240 |
| 242 } // namespace cc | 241 } // namespace cc |
| 243 | 242 |
| 244 #endif // CC_RESOURCES_TILE_MANAGER_H_ | 243 #endif // CC_RESOURCES_TILE_MANAGER_H_ |
| OLD | NEW |