| 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_BITMAP_TILE_TASK_WORKER_POOL_H_ | 5 #ifndef CC_RASTER_BITMAP_TILE_TASK_WORKER_POOL_H_ |
| 6 #define CC_RASTER_BITMAP_TILE_TASK_WORKER_POOL_H_ | 6 #define CC_RASTER_BITMAP_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 20 matching lines...) Expand all Loading... |
| 31 base::SequencedTaskRunner* task_runner, | 31 base::SequencedTaskRunner* task_runner, |
| 32 TaskGraphRunner* task_graph_runner, | 32 TaskGraphRunner* task_graph_runner, |
| 33 ResourceProvider* resource_provider); | 33 ResourceProvider* resource_provider); |
| 34 | 34 |
| 35 // Overridden from TileTaskWorkerPool: | 35 // Overridden from TileTaskWorkerPool: |
| 36 TileTaskRunner* AsTileTaskRunner() override; | 36 TileTaskRunner* AsTileTaskRunner() override; |
| 37 | 37 |
| 38 // Overridden from TileTaskRunner: | 38 // Overridden from TileTaskRunner: |
| 39 void Shutdown() override; | 39 void Shutdown() override; |
| 40 void ScheduleTasks(TaskGraph* graph) override; | 40 void ScheduleTasks(TaskGraph* graph) override; |
| 41 void CheckForCompletedTasks() override; | 41 void CollectCompletedTasks(Task::Vector* completed_tasks) override; |
| 42 ResourceFormat GetResourceFormat(bool must_support_alpha) const override; | 42 ResourceFormat GetResourceFormat(bool must_support_alpha) const override; |
| 43 bool GetResourceRequiresSwizzle(bool must_support_alpha) const override; | 43 bool GetResourceRequiresSwizzle(bool must_support_alpha) const override; |
| 44 TileTaskClient* AsTileTaskClient() override; |
| 44 | 45 |
| 45 // Overridden from TileTaskClient: | 46 // Overridden from TileTaskClient: |
| 46 std::unique_ptr<RasterBuffer> AcquireBufferForRaster( | 47 std::unique_ptr<RasterBuffer> AcquireBufferForRaster( |
| 47 const Resource* resource, | 48 const Resource* resource, |
| 48 uint64_t resource_content_id, | 49 uint64_t resource_content_id, |
| 49 uint64_t previous_content_id) override; | 50 uint64_t previous_content_id) override; |
| 50 void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override; | 51 void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override; |
| 51 | 52 |
| 52 protected: | 53 protected: |
| 53 BitmapTileTaskWorkerPool(base::SequencedTaskRunner* task_runner, | 54 BitmapTileTaskWorkerPool(base::SequencedTaskRunner* task_runner, |
| 54 TaskGraphRunner* task_graph_runner, | 55 TaskGraphRunner* task_graph_runner, |
| 55 ResourceProvider* resource_provider); | 56 ResourceProvider* resource_provider); |
| 56 | 57 |
| 57 private: | 58 private: |
| 58 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> StateAsValue() | 59 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> StateAsValue() |
| 59 const; | 60 const; |
| 60 | 61 |
| 61 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 62 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
| 62 TaskGraphRunner* task_graph_runner_; | 63 TaskGraphRunner* task_graph_runner_; |
| 63 const NamespaceToken namespace_token_; | 64 const NamespaceToken namespace_token_; |
| 64 ResourceProvider* resource_provider_; | 65 ResourceProvider* resource_provider_; |
| 65 | 66 |
| 66 Task::Vector completed_tasks_; | |
| 67 | |
| 68 DISALLOW_COPY_AND_ASSIGN(BitmapTileTaskWorkerPool); | 67 DISALLOW_COPY_AND_ASSIGN(BitmapTileTaskWorkerPool); |
| 69 }; | 68 }; |
| 70 | 69 |
| 71 } // namespace cc | 70 } // namespace cc |
| 72 | 71 |
| 73 #endif // CC_RASTER_BITMAP_TILE_TASK_WORKER_POOL_H_ | 72 #endif // CC_RASTER_BITMAP_TILE_TASK_WORKER_POOL_H_ |
| OLD | NEW |