| 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" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 ResourceProvider* resource_provider, | 29 ResourceProvider* resource_provider, |
| 30 bool use_distance_field_text, | 30 bool use_distance_field_text, |
| 31 int gpu_rasterization_msaa_sample_count); | 31 int gpu_rasterization_msaa_sample_count); |
| 32 | 32 |
| 33 // Overridden from TileTaskWorkerPool: | 33 // Overridden from TileTaskWorkerPool: |
| 34 TileTaskRunner* AsTileTaskRunner() override; | 34 TileTaskRunner* AsTileTaskRunner() override; |
| 35 | 35 |
| 36 // Overridden from TileTaskRunner: | 36 // Overridden from TileTaskRunner: |
| 37 void Shutdown() override; | 37 void Shutdown() override; |
| 38 void ScheduleTasks(TaskGraph* graph) override; | 38 void ScheduleTasks(TaskGraph* graph) override; |
| 39 void CheckForCompletedTasks() override; | 39 void CollectCompletedTasks(Task::Vector* completed_tasks) override; |
| 40 ResourceFormat GetResourceFormat(bool must_support_alpha) const override; | 40 ResourceFormat GetResourceFormat(bool must_support_alpha) const override; |
| 41 bool GetResourceRequiresSwizzle(bool must_support_alpha) const override; | 41 bool GetResourceRequiresSwizzle(bool must_support_alpha) const override; |
| 42 TileTaskClient* AsTileTaskClient() override; |
| 42 | 43 |
| 43 // Overridden from TileTaskClient: | 44 // Overridden from TileTaskClient: |
| 44 scoped_ptr<RasterBuffer> AcquireBufferForRaster( | 45 scoped_ptr<RasterBuffer> AcquireBufferForRaster( |
| 45 const Resource* resource, | 46 const Resource* resource, |
| 46 uint64_t resource_content_id, | 47 uint64_t resource_content_id, |
| 47 uint64_t previous_content_id) override; | 48 uint64_t previous_content_id) override; |
| 48 void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override; | 49 void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override; |
| 49 | 50 |
| 50 private: | 51 private: |
| 51 GpuTileTaskWorkerPool(base::SequencedTaskRunner* task_runner, | 52 GpuTileTaskWorkerPool(base::SequencedTaskRunner* task_runner, |
| 52 TaskGraphRunner* task_graph_runner, | 53 TaskGraphRunner* task_graph_runner, |
| 53 ContextProvider* context_provider, | 54 ContextProvider* context_provider, |
| 54 ResourceProvider* resource_provider, | 55 ResourceProvider* resource_provider, |
| 55 bool use_distance_field_text, | 56 bool use_distance_field_text, |
| 56 int gpu_rasterization_msaa_sample_count); | 57 int gpu_rasterization_msaa_sample_count); |
| 57 | 58 |
| 58 void CompleteTasks(const Task::Vector& tasks); | |
| 59 | |
| 60 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 59 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
| 61 TaskGraphRunner* task_graph_runner_; | 60 TaskGraphRunner* task_graph_runner_; |
| 62 const NamespaceToken namespace_token_; | 61 const NamespaceToken namespace_token_; |
| 63 scoped_ptr<GpuRasterizer> rasterizer_; | 62 scoped_ptr<GpuRasterizer> rasterizer_; |
| 64 | 63 |
| 65 Task::Vector completed_tasks_; | |
| 66 | |
| 67 DISALLOW_COPY_AND_ASSIGN(GpuTileTaskWorkerPool); | 64 DISALLOW_COPY_AND_ASSIGN(GpuTileTaskWorkerPool); |
| 68 }; | 65 }; |
| 69 | 66 |
| 70 } // namespace cc | 67 } // namespace cc |
| 71 | 68 |
| 72 #endif // CC_RASTER_GPU_TILE_TASK_WORKER_POOL_H_ | 69 #endif // CC_RASTER_GPU_TILE_TASK_WORKER_POOL_H_ |
| OLD | NEW |