| 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_RASTER_GPU_TILE_TASK_WORKER_POOL_H_ | 5 #ifndef CC_RASTER_GPU_TILE_TASK_WORKER_POOL_H_ |
| 6 #define CC_RASTER_GPU_TILE_TASK_WORKER_POOL_H_ | 6 #define CC_RASTER_GPU_TILE_TASK_WORKER_POOL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "cc/raster/tile_task_runner.h" | |
| 12 #include "cc/raster/tile_task_worker_pool.h" | 11 #include "cc/raster/tile_task_worker_pool.h" |
| 13 | 12 |
| 14 namespace cc { | 13 namespace cc { |
| 15 class ContextProvider; | 14 class ContextProvider; |
| 16 class GpuRasterizer; | 15 class GpuRasterizer; |
| 17 class ResourceProvider; | 16 class ResourceProvider; |
| 18 | 17 |
| 19 class CC_EXPORT GpuTileTaskWorkerPool : public TileTaskWorkerPool, | 18 class CC_EXPORT GpuTileTaskWorkerPool : public TileTaskWorkerPool, |
| 20 public TileTaskRunner, | |
| 21 public RasterBufferProvider { | 19 public RasterBufferProvider { |
| 22 public: | 20 public: |
| 23 ~GpuTileTaskWorkerPool() override; | 21 ~GpuTileTaskWorkerPool() override; |
| 24 | 22 |
| 25 static std::unique_ptr<TileTaskWorkerPool> Create( | 23 static std::unique_ptr<TileTaskWorkerPool> Create( |
| 26 base::SequencedTaskRunner* task_runner, | 24 base::SequencedTaskRunner* task_runner, |
| 27 TaskGraphRunner* task_graph_runner, | 25 TaskGraphRunner* task_graph_runner, |
| 28 ContextProvider* context_provider, | 26 ContextProvider* context_provider, |
| 29 ResourceProvider* resource_provider, | 27 ResourceProvider* resource_provider, |
| 30 bool use_distance_field_text, | 28 bool use_distance_field_text, |
| 31 int gpu_rasterization_msaa_sample_count); | 29 int gpu_rasterization_msaa_sample_count); |
| 32 | 30 |
| 33 // Overridden from TileTaskWorkerPool: | 31 // Overridden from TileTaskWorkerPool: |
| 34 TileTaskRunner* AsTileTaskRunner() override; | |
| 35 | |
| 36 // Overridden from TileTaskRunner: | |
| 37 void Shutdown() override; | 32 void Shutdown() override; |
| 38 void ScheduleTasks(TaskGraph* graph) override; | 33 void ScheduleTasks(TaskGraph* graph) override; |
| 39 void CheckForCompletedTasks() override; | 34 void CheckForCompletedTasks() override; |
| 40 ResourceFormat GetResourceFormat(bool must_support_alpha) const override; | 35 ResourceFormat GetResourceFormat(bool must_support_alpha) const override; |
| 41 bool GetResourceRequiresSwizzle(bool must_support_alpha) const override; | 36 bool GetResourceRequiresSwizzle(bool must_support_alpha) const override; |
| 42 RasterBufferProvider* AsRasterBufferProvider() override; | 37 RasterBufferProvider* AsRasterBufferProvider() override; |
| 43 | 38 |
| 44 // Overridden from RasterBufferProvider: | 39 // Overridden from RasterBufferProvider: |
| 45 std::unique_ptr<RasterBuffer> AcquireBufferForRaster( | 40 std::unique_ptr<RasterBuffer> AcquireBufferForRaster( |
| 46 const Resource* resource, | 41 const Resource* resource, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 64 std::unique_ptr<GpuRasterizer> rasterizer_; | 59 std::unique_ptr<GpuRasterizer> rasterizer_; |
| 65 | 60 |
| 66 Task::Vector completed_tasks_; | 61 Task::Vector completed_tasks_; |
| 67 | 62 |
| 68 DISALLOW_COPY_AND_ASSIGN(GpuTileTaskWorkerPool); | 63 DISALLOW_COPY_AND_ASSIGN(GpuTileTaskWorkerPool); |
| 69 }; | 64 }; |
| 70 | 65 |
| 71 } // namespace cc | 66 } // namespace cc |
| 72 | 67 |
| 73 #endif // CC_RASTER_GPU_TILE_TASK_WORKER_POOL_H_ | 68 #endif // CC_RASTER_GPU_TILE_TASK_WORKER_POOL_H_ |
| OLD | NEW |