| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_GPU_RASTER_WORKER_POOL_H_ | 5 #ifndef CC_RESOURCES_GPU_RASTER_WORKER_POOL_H_ |
| 6 #define CC_RESOURCES_GPU_RASTER_WORKER_POOL_H_ | 6 #define CC_RESOURCES_GPU_RASTER_WORKER_POOL_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "cc/resources/raster_worker_pool.h" | 9 #include "cc/resources/raster_worker_pool.h" |
| 10 #include "cc/resources/rasterizer.h" | 10 #include "cc/resources/rasterizer.h" |
| 11 #include "third_party/skia/include/core/SkMultiPictureDraw.h" |
| 11 | 12 |
| 12 namespace cc { | 13 namespace cc { |
| 13 class ContextProvider; | 14 class ContextProvider; |
| 14 class ResourceProvider; | 15 class ResourceProvider; |
| 15 | 16 |
| 16 class CC_EXPORT GpuRasterWorkerPool : public RasterWorkerPool, | 17 class CC_EXPORT GpuRasterWorkerPool : public RasterWorkerPool, |
| 17 public Rasterizer, | 18 public Rasterizer, |
| 18 public RasterizerTaskClient { | 19 public RasterizerTaskClient { |
| 19 public: | 20 public: |
| 20 virtual ~GpuRasterWorkerPool(); | 21 virtual ~GpuRasterWorkerPool(); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 47 void ScheduleRunTasksOnOriginThread(); | 48 void ScheduleRunTasksOnOriginThread(); |
| 48 void RunTasksOnOriginThread(); | 49 void RunTasksOnOriginThread(); |
| 49 void RunTaskOnOriginThread(RasterizerTask* task); | 50 void RunTaskOnOriginThread(RasterizerTask* task); |
| 50 | 51 |
| 51 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 52 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
| 52 scoped_ptr<TaskGraphRunner> task_graph_runner_; | 53 scoped_ptr<TaskGraphRunner> task_graph_runner_; |
| 53 const NamespaceToken namespace_token_; | 54 const NamespaceToken namespace_token_; |
| 54 RasterizerClient* client_; | 55 RasterizerClient* client_; |
| 55 ContextProvider* context_provider_; | 56 ContextProvider* context_provider_; |
| 56 ResourceProvider* resource_provider_; | 57 ResourceProvider* resource_provider_; |
| 58 SkMultiPictureDraw multi_picture_draw_; |
| 57 | 59 |
| 58 bool run_tasks_on_origin_thread_pending_; | 60 bool run_tasks_on_origin_thread_pending_; |
| 59 | 61 |
| 60 TaskSetCollection raster_pending_; | 62 TaskSetCollection raster_pending_; |
| 61 | 63 |
| 62 scoped_refptr<RasterizerTask> raster_finished_tasks_[kNumberOfTaskSets]; | 64 scoped_refptr<RasterizerTask> raster_finished_tasks_[kNumberOfTaskSets]; |
| 63 | 65 |
| 64 // Task graph used when scheduling tasks and vector used to gather | 66 // Task graph used when scheduling tasks and vector used to gather |
| 65 // completed tasks. | 67 // completed tasks. |
| 66 TaskGraph graph_; | 68 TaskGraph graph_; |
| 67 Task::Vector completed_tasks_; | 69 Task::Vector completed_tasks_; |
| 68 | 70 |
| 69 base::WeakPtrFactory<GpuRasterWorkerPool> raster_finished_weak_ptr_factory_; | 71 base::WeakPtrFactory<GpuRasterWorkerPool> raster_finished_weak_ptr_factory_; |
| 70 | 72 |
| 71 base::WeakPtrFactory<GpuRasterWorkerPool> weak_ptr_factory_; | 73 base::WeakPtrFactory<GpuRasterWorkerPool> weak_ptr_factory_; |
| 72 | 74 |
| 73 DISALLOW_COPY_AND_ASSIGN(GpuRasterWorkerPool); | 75 DISALLOW_COPY_AND_ASSIGN(GpuRasterWorkerPool); |
| 74 }; | 76 }; |
| 75 | 77 |
| 76 } // namespace cc | 78 } // namespace cc |
| 77 | 79 |
| 78 #endif // CC_RESOURCES_GPU_RASTER_WORKER_POOL_H_ | 80 #endif // CC_RESOURCES_GPU_RASTER_WORKER_POOL_H_ |
| OLD | NEW |