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