| 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_ONE_COPY_TILE_TASK_WORKER_POOL_H_ | 5 #ifndef CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ |
| 6 #define CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ | 6 #define CC_RASTER_ONE_COPY_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/output/context_provider.h" | 11 #include "cc/output/context_provider.h" |
| 12 #include "cc/raster/tile_task_runner.h" | |
| 13 #include "cc/raster/tile_task_worker_pool.h" | 12 #include "cc/raster/tile_task_worker_pool.h" |
| 14 #include "cc/resources/resource_provider.h" | 13 #include "cc/resources/resource_provider.h" |
| 15 | 14 |
| 16 namespace cc { | 15 namespace cc { |
| 17 struct StagingBuffer; | 16 struct StagingBuffer; |
| 18 class StagingBufferPool; | 17 class StagingBufferPool; |
| 19 class ResourcePool; | 18 class ResourcePool; |
| 20 | 19 |
| 21 class CC_EXPORT OneCopyTileTaskWorkerPool : public TileTaskWorkerPool, | 20 class CC_EXPORT OneCopyTileTaskWorkerPool : public TileTaskWorkerPool, |
| 22 public TileTaskRunner, | |
| 23 public RasterBufferProvider { | 21 public RasterBufferProvider { |
| 24 public: | 22 public: |
| 25 ~OneCopyTileTaskWorkerPool() override; | 23 ~OneCopyTileTaskWorkerPool() override; |
| 26 | 24 |
| 27 static std::unique_ptr<TileTaskWorkerPool> Create( | 25 static std::unique_ptr<TileTaskWorkerPool> Create( |
| 28 base::SequencedTaskRunner* task_runner, | 26 base::SequencedTaskRunner* task_runner, |
| 29 TaskGraphRunner* task_graph_runner, | 27 TaskGraphRunner* task_graph_runner, |
| 30 ContextProvider* context_provider, | 28 ContextProvider* context_provider, |
| 31 ResourceProvider* resource_provider, | 29 ResourceProvider* resource_provider, |
| 32 int max_copy_texture_chromium_size, | 30 int max_copy_texture_chromium_size, |
| 33 bool use_partial_raster, | 31 bool use_partial_raster, |
| 34 int max_staging_buffer_usage_in_bytes, | 32 int max_staging_buffer_usage_in_bytes, |
| 35 ResourceFormat preferred_tile_format); | 33 ResourceFormat preferred_tile_format); |
| 36 | 34 |
| 37 // Overridden from TileTaskWorkerPool: | 35 // Overridden from TileTaskWorkerPool: |
| 38 TileTaskRunner* AsTileTaskRunner() override; | |
| 39 | |
| 40 // Overridden from TileTaskRunner: | |
| 41 void Shutdown() override; | 36 void Shutdown() override; |
| 42 void ScheduleTasks(TaskGraph* graph) override; | 37 void ScheduleTasks(TaskGraph* graph) override; |
| 43 void CheckForCompletedTasks() override; | 38 void CheckForCompletedTasks() override; |
| 44 ResourceFormat GetResourceFormat(bool must_support_alpha) const override; | 39 ResourceFormat GetResourceFormat(bool must_support_alpha) const override; |
| 45 bool GetResourceRequiresSwizzle(bool must_support_alpha) const override; | 40 bool GetResourceRequiresSwizzle(bool must_support_alpha) const override; |
| 46 RasterBufferProvider* AsRasterBufferProvider() override; | 41 RasterBufferProvider* AsRasterBufferProvider() override; |
| 47 | 42 |
| 48 // Overridden from RasterBufferProvider: | 43 // Overridden from RasterBufferProvider: |
| 49 std::unique_ptr<RasterBuffer> AcquireBufferForRaster( | 44 std::unique_ptr<RasterBuffer> AcquireBufferForRaster( |
| 50 const Resource* resource, | 45 const Resource* resource, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 std::unique_ptr<StagingBufferPool> staging_pool_; | 99 std::unique_ptr<StagingBufferPool> staging_pool_; |
| 105 | 100 |
| 106 Task::Vector completed_tasks_; | 101 Task::Vector completed_tasks_; |
| 107 | 102 |
| 108 DISALLOW_COPY_AND_ASSIGN(OneCopyTileTaskWorkerPool); | 103 DISALLOW_COPY_AND_ASSIGN(OneCopyTileTaskWorkerPool); |
| 109 }; | 104 }; |
| 110 | 105 |
| 111 } // namespace cc | 106 } // namespace cc |
| 112 | 107 |
| 113 #endif // CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ | 108 #endif // CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ |
| OLD | NEW |