Index: cc/raster/one_copy_raster_buffer_provider.h |
diff --git a/cc/raster/one_copy_tile_task_worker_pool.h b/cc/raster/one_copy_raster_buffer_provider.h |
similarity index 67% |
rename from cc/raster/one_copy_tile_task_worker_pool.h |
rename to cc/raster/one_copy_raster_buffer_provider.h |
index da41020eb2a8269a88ffc64aca348318ba778412..0c129faa16f78dbc2fcc0efb8162a5cde6154ae8 100644 |
--- a/cc/raster/one_copy_tile_task_worker_pool.h |
+++ b/cc/raster/one_copy_raster_buffer_provider.h |
@@ -2,14 +2,14 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ |
-#define CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ |
+#ifndef CC_RASTER_ONE_COPY_RASTER_BUFFER_PROVIDER_H_ |
+#define CC_RASTER_ONE_COPY_RASTER_BUFFER_PROVIDER_H_ |
#include <stdint.h> |
#include "base/macros.h" |
#include "cc/output/context_provider.h" |
-#include "cc/raster/tile_task_worker_pool.h" |
+#include "cc/raster/raster_buffer_provider.h" |
#include "cc/resources/resource_provider.h" |
namespace cc { |
@@ -17,14 +17,12 @@ struct StagingBuffer; |
class StagingBufferPool; |
class ResourcePool; |
-class CC_EXPORT OneCopyTileTaskWorkerPool : public TileTaskWorkerPool, |
- public RasterBufferProvider { |
+class CC_EXPORT OneCopyRasterBufferProvider : public RasterBufferProvider { |
public: |
- ~OneCopyTileTaskWorkerPool() override; |
+ ~OneCopyRasterBufferProvider() override; |
- static std::unique_ptr<TileTaskWorkerPool> Create( |
+ static std::unique_ptr<RasterBufferProvider> Create( |
base::SequencedTaskRunner* task_runner, |
- TaskGraphRunner* task_graph_runner, |
ContextProvider* context_provider, |
ResourceProvider* resource_provider, |
int max_copy_texture_chromium_size, |
@@ -32,20 +30,16 @@ class CC_EXPORT OneCopyTileTaskWorkerPool : public TileTaskWorkerPool, |
int max_staging_buffer_usage_in_bytes, |
ResourceFormat preferred_tile_format); |
- // Overridden from TileTaskWorkerPool: |
- void Shutdown() override; |
- void ScheduleTasks(TaskGraph* graph) override; |
- void CheckForCompletedTasks() override; |
- ResourceFormat GetResourceFormat(bool must_support_alpha) const override; |
- bool GetResourceRequiresSwizzle(bool must_support_alpha) const override; |
- RasterBufferProvider* AsRasterBufferProvider() override; |
- |
// Overridden from RasterBufferProvider: |
std::unique_ptr<RasterBuffer> AcquireBufferForRaster( |
const Resource* resource, |
uint64_t resource_content_id, |
uint64_t previous_content_id) override; |
void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override; |
+ void OrderingBarrier() override; |
+ ResourceFormat GetResourceFormat(bool must_support_alpha) const override; |
+ bool GetResourceRequiresSwizzle(bool must_support_alpha) const override; |
+ void Shutdown() override; |
// Playback raster source and copy result into |resource|. |
void PlaybackAndCopyOnWorkerThread( |
@@ -60,13 +54,12 @@ class CC_EXPORT OneCopyTileTaskWorkerPool : public TileTaskWorkerPool, |
uint64_t new_content_id); |
protected: |
- OneCopyTileTaskWorkerPool(base::SequencedTaskRunner* task_runner, |
- TaskGraphRunner* task_graph_runner, |
- ResourceProvider* resource_provider, |
- int max_copy_texture_chromium_size, |
- bool use_partial_raster, |
- int max_staging_buffer_usage_in_bytes, |
- ResourceFormat preferred_tile_format); |
+ OneCopyRasterBufferProvider(base::SequencedTaskRunner* task_runner, |
+ ResourceProvider* resource_provider, |
+ int max_copy_texture_chromium_size, |
+ bool use_partial_raster, |
+ int max_staging_buffer_usage_in_bytes, |
+ ResourceFormat preferred_tile_format); |
private: |
void PlaybackToStagingBuffer( |
@@ -86,8 +79,6 @@ class CC_EXPORT OneCopyTileTaskWorkerPool : public TileTaskWorkerPool, |
uint64_t previous_content_id, |
uint64_t new_content_id); |
- TaskGraphRunner* task_graph_runner_; |
- const NamespaceToken namespace_token_; |
ResourceProvider* const resource_provider_; |
const int max_bytes_per_copy_operation_; |
bool use_partial_raster_; |
@@ -98,11 +89,9 @@ class CC_EXPORT OneCopyTileTaskWorkerPool : public TileTaskWorkerPool, |
ResourceFormat preferred_tile_format_; |
std::unique_ptr<StagingBufferPool> staging_pool_; |
- Task::Vector completed_tasks_; |
- |
- DISALLOW_COPY_AND_ASSIGN(OneCopyTileTaskWorkerPool); |
+ DISALLOW_COPY_AND_ASSIGN(OneCopyRasterBufferProvider); |
}; |
} // namespace cc |
-#endif // CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ |
+#endif // CC_RASTER_ONE_COPY_RASTER_BUFFER_PROVIDER_H_ |