Chromium Code Reviews| 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_IMAGE_RASTER_WORKER_POOL_H_ | 5 #ifndef CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_ |
| 6 #define CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_ | 6 #define CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_ |
| 7 | 7 |
| 8 #include <vector> | |
| 9 | |
| 8 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 9 #include "base/values.h" | 11 #include "base/values.h" |
| 10 #include "cc/resources/raster_worker_pool.h" | 12 #include "cc/resources/raster_worker_pool.h" |
| 11 #include "cc/resources/rasterizer.h" | 13 #include "cc/resources/rasterizer.h" |
| 12 | 14 |
| 13 namespace base { | 15 namespace base { |
| 14 namespace debug { | 16 namespace debug { |
| 15 class ConvertableToTraceFormat; | 17 class ConvertableToTraceFormat; |
| 16 } | 18 } |
| 17 } | 19 } |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 43 virtual RasterBuffer* AcquireBufferForRaster(RasterTask* task) OVERRIDE; | 45 virtual RasterBuffer* AcquireBufferForRaster(RasterTask* task) OVERRIDE; |
| 44 virtual void ReleaseBufferForRaster(RasterTask* task) OVERRIDE; | 46 virtual void ReleaseBufferForRaster(RasterTask* task) OVERRIDE; |
| 45 | 47 |
| 46 protected: | 48 protected: |
| 47 ImageRasterWorkerPool(base::SequencedTaskRunner* task_runner, | 49 ImageRasterWorkerPool(base::SequencedTaskRunner* task_runner, |
| 48 TaskGraphRunner* task_graph_runner, | 50 TaskGraphRunner* task_graph_runner, |
| 49 ResourceProvider* resource_provider); | 51 ResourceProvider* resource_provider); |
| 50 | 52 |
| 51 private: | 53 private: |
| 52 void OnRasterFinished(); | 54 void OnRasterFinished(); |
| 53 void OnRasterRequiredForActivationFinished(); | 55 void OnRasterTaskSetFinished(TaskSet task_set); |
| 54 scoped_refptr<base::debug::ConvertableToTraceFormat> StateAsValue() const; | 56 scoped_refptr<base::debug::ConvertableToTraceFormat> StateAsValue() const; |
| 55 | 57 |
| 56 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 58 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
| 57 TaskGraphRunner* task_graph_runner_; | 59 TaskGraphRunner* task_graph_runner_; |
| 58 const NamespaceToken namespace_token_; | 60 const NamespaceToken namespace_token_; |
| 59 RasterizerClient* client_; | 61 RasterizerClient* client_; |
| 60 ResourceProvider* resource_provider_; | 62 ResourceProvider* resource_provider_; |
| 61 | 63 |
| 62 bool raster_tasks_pending_; | 64 bool raster_tasks_pending_; |
| 63 bool raster_tasks_required_for_activation_pending_; | 65 RasterTaskQueue::Item::TaskSetCollection raster_task_sets_pending_; |
| 64 | 66 |
| 65 scoped_refptr<RasterizerTask> raster_finished_task_; | 67 scoped_refptr<RasterizerTask> raster_finished_task_; |
| 66 scoped_refptr<RasterizerTask> raster_required_for_activation_finished_task_; | 68 std::vector<scoped_refptr<RasterizerTask> > task_set_finished_tasks_; |
|
reveman
2014/09/05 08:38:59
array
ernstm
2014/09/05 21:36:10
Done.
| |
| 67 | 69 |
| 68 // Task graph used when scheduling tasks and vector used to gather | 70 // Task graph used when scheduling tasks and vector used to gather |
| 69 // completed tasks. | 71 // completed tasks. |
| 70 TaskGraph graph_; | 72 TaskGraph graph_; |
| 71 Task::Vector completed_tasks_; | 73 Task::Vector completed_tasks_; |
| 72 | 74 |
| 73 base::WeakPtrFactory<ImageRasterWorkerPool> raster_finished_weak_ptr_factory_; | 75 base::WeakPtrFactory<ImageRasterWorkerPool> raster_finished_weak_ptr_factory_; |
| 74 | 76 |
| 75 DISALLOW_COPY_AND_ASSIGN(ImageRasterWorkerPool); | 77 DISALLOW_COPY_AND_ASSIGN(ImageRasterWorkerPool); |
| 76 }; | 78 }; |
| 77 | 79 |
| 78 } // namespace cc | 80 } // namespace cc |
| 79 | 81 |
| 80 #endif // CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_ | 82 #endif // CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_ |
| OLD | NEW |