| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 | 211 |
| 212 protected: | 212 protected: |
| 213 typedef std::vector<scoped_refptr<internal::WorkerPoolTask> > TaskVector; | 213 typedef std::vector<scoped_refptr<internal::WorkerPoolTask> > TaskVector; |
| 214 typedef std::vector<scoped_refptr<internal::RasterWorkerPoolTask> > | 214 typedef std::vector<scoped_refptr<internal::RasterWorkerPoolTask> > |
| 215 RasterTaskVector; | 215 RasterTaskVector; |
| 216 typedef base::hash_set<internal::RasterWorkerPoolTask*> RasterTaskSet; | 216 typedef base::hash_set<internal::RasterWorkerPoolTask*> RasterTaskSet; |
| 217 typedef internal::RasterWorkerPoolTask* TaskMapKey; | 217 typedef internal::RasterWorkerPoolTask* TaskMapKey; |
| 218 typedef base::hash_map<TaskMapKey, | 218 typedef base::hash_map<TaskMapKey, |
| 219 scoped_refptr<internal::WorkerPoolTask> > TaskMap; | 219 scoped_refptr<internal::WorkerPoolTask> > TaskMap; |
| 220 | 220 |
| 221 RasterWorkerPool(ResourceProvider* resource_provider, size_t num_threads); | 221 explicit RasterWorkerPool(ResourceProvider* resource_provider); |
| 222 | 222 |
| 223 virtual void OnRasterTasksFinished() = 0; | 223 virtual void OnRasterTasksFinished() = 0; |
| 224 virtual void OnRasterTasksRequiredForActivationFinished() = 0; | 224 virtual void OnRasterTasksRequiredForActivationFinished() = 0; |
| 225 | 225 |
| 226 void SetRasterTasks(RasterTask::Queue* queue); | 226 void SetRasterTasks(RasterTask::Queue* queue); |
| 227 bool IsRasterTaskRequiredForActivation( | 227 bool IsRasterTaskRequiredForActivation( |
| 228 internal::RasterWorkerPoolTask* task) const; | 228 internal::RasterWorkerPoolTask* task) const; |
| 229 | 229 |
| 230 RasterWorkerPoolClient* client() const { return client_; } | 230 RasterWorkerPoolClient* client() const { return client_; } |
| 231 ResourceProvider* resource_provider() const { return resource_provider_; } | 231 ResourceProvider* resource_provider() const { return resource_provider_; } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 | 273 |
| 274 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_; | 274 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_; |
| 275 scoped_refptr<internal::WorkerPoolTask> | 275 scoped_refptr<internal::WorkerPoolTask> |
| 276 raster_required_for_activation_finished_task_; | 276 raster_required_for_activation_finished_task_; |
| 277 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_; | 277 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_; |
| 278 }; | 278 }; |
| 279 | 279 |
| 280 } // namespace cc | 280 } // namespace cc |
| 281 | 281 |
| 282 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ | 282 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ |
| OLD | NEW |