| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_ZERO_COPY_TILE_TASK_WORKER_POOL_H_ | 5 #ifndef CC_RASTER_ZERO_COPY_TILE_TASK_WORKER_POOL_H_ |
| 6 #define CC_RASTER_ZERO_COPY_TILE_TASK_WORKER_POOL_H_ | 6 #define CC_RASTER_ZERO_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 "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "cc/raster/tile_task_runner.h" | |
| 14 #include "cc/raster/tile_task_worker_pool.h" | 13 #include "cc/raster/tile_task_worker_pool.h" |
| 15 | 14 |
| 16 namespace base { | 15 namespace base { |
| 17 namespace trace_event { | 16 namespace trace_event { |
| 18 class ConvertableToTraceFormat; | 17 class ConvertableToTraceFormat; |
| 19 } | 18 } |
| 20 } | 19 } |
| 21 | 20 |
| 22 namespace cc { | 21 namespace cc { |
| 23 class ResourceProvider; | 22 class ResourceProvider; |
| 24 | 23 |
| 25 class CC_EXPORT ZeroCopyTileTaskWorkerPool : public TileTaskWorkerPool, | 24 class CC_EXPORT ZeroCopyTileTaskWorkerPool : public TileTaskWorkerPool, |
| 26 public TileTaskRunner, | |
| 27 public RasterBufferProvider { | 25 public RasterBufferProvider { |
| 28 public: | 26 public: |
| 29 ~ZeroCopyTileTaskWorkerPool() override; | 27 ~ZeroCopyTileTaskWorkerPool() override; |
| 30 | 28 |
| 31 static std::unique_ptr<TileTaskWorkerPool> Create( | 29 static std::unique_ptr<TileTaskWorkerPool> Create( |
| 32 base::SequencedTaskRunner* task_runner, | 30 base::SequencedTaskRunner* task_runner, |
| 33 TaskGraphRunner* task_graph_runner, | 31 TaskGraphRunner* task_graph_runner, |
| 34 ResourceProvider* resource_provider, | 32 ResourceProvider* resource_provider, |
| 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 19 matching lines...) Expand all Loading... |
| 70 ResourceFormat preferred_tile_format_; | 65 ResourceFormat preferred_tile_format_; |
| 71 | 66 |
| 72 Task::Vector completed_tasks_; | 67 Task::Vector completed_tasks_; |
| 73 | 68 |
| 74 DISALLOW_COPY_AND_ASSIGN(ZeroCopyTileTaskWorkerPool); | 69 DISALLOW_COPY_AND_ASSIGN(ZeroCopyTileTaskWorkerPool); |
| 75 }; | 70 }; |
| 76 | 71 |
| 77 } // namespace cc | 72 } // namespace cc |
| 78 | 73 |
| 79 #endif // CC_RASTER_ZERO_COPY_TILE_TASK_WORKER_POOL_H_ | 74 #endif // CC_RASTER_ZERO_COPY_TILE_TASK_WORKER_POOL_H_ |
| OLD | NEW |