| 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_RASTER_WORKER_POOL_H_ | 5 #ifndef CC_RESOURCES_RASTER_WORKER_POOL_H_ |
| 6 #define CC_RESOURCES_RASTER_WORKER_POOL_H_ | 6 #define CC_RESOURCES_RASTER_WORKER_POOL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 typedef std::vector<scoped_refptr<internal::RasterWorkerPoolTask> > | 223 typedef std::vector<scoped_refptr<internal::RasterWorkerPoolTask> > |
| 224 RasterTaskVector; | 224 RasterTaskVector; |
| 225 typedef std::deque<scoped_refptr<internal::RasterWorkerPoolTask> > | 225 typedef std::deque<scoped_refptr<internal::RasterWorkerPoolTask> > |
| 226 RasterTaskDeque; | 226 RasterTaskDeque; |
| 227 typedef base::hash_set<internal::RasterWorkerPoolTask*> RasterTaskSet; | 227 typedef base::hash_set<internal::RasterWorkerPoolTask*> RasterTaskSet; |
| 228 typedef internal::RasterWorkerPoolTask* TaskMapKey; | 228 typedef internal::RasterWorkerPoolTask* TaskMapKey; |
| 229 typedef base::hash_map<TaskMapKey, | 229 typedef base::hash_map<TaskMapKey, |
| 230 scoped_refptr<internal::WorkerPoolTask> > TaskMap; | 230 scoped_refptr<internal::WorkerPoolTask> > TaskMap; |
| 231 | 231 |
| 232 RasterWorkerPool(ResourceProvider* resource_provider, | 232 RasterWorkerPool(ResourceProvider* resource_provider, |
| 233 ContextProvider* context_provider, | 233 ContextProvider* context_provider); |
| 234 size_t num_threads); | |
| 235 | 234 |
| 236 virtual void OnRasterTasksFinished() = 0; | 235 virtual void OnRasterTasksFinished() = 0; |
| 237 virtual void OnRasterTasksRequiredForActivationFinished() = 0; | 236 virtual void OnRasterTasksRequiredForActivationFinished() = 0; |
| 238 | 237 |
| 239 void SetRasterTasks(RasterTask::Queue* queue); | 238 void SetRasterTasks(RasterTask::Queue* queue); |
| 240 bool IsRasterTaskRequiredForActivation( | 239 bool IsRasterTaskRequiredForActivation( |
| 241 internal::RasterWorkerPoolTask* task) const; | 240 internal::RasterWorkerPoolTask* task) const; |
| 242 // Run raster tasks that use GPU on current thread. | 241 // Run raster tasks that use GPU on current thread. |
| 243 void RunGpuRasterTasks(const RasterTaskVector& tasks); | 242 void RunGpuRasterTasks(const RasterTaskVector& tasks); |
| 244 | 243 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 | 291 |
| 293 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_; | 292 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_; |
| 294 scoped_refptr<internal::WorkerPoolTask> | 293 scoped_refptr<internal::WorkerPoolTask> |
| 295 raster_required_for_activation_finished_task_; | 294 raster_required_for_activation_finished_task_; |
| 296 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_; | 295 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_; |
| 297 }; | 296 }; |
| 298 | 297 |
| 299 } // namespace cc | 298 } // namespace cc |
| 300 | 299 |
| 301 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ | 300 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ |
| OLD | NEW |