Chromium Code Reviews| 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_RESOURCES_ONE_COPY_TILE_TASK_WORKER_POOL_H_ | 5 #ifndef CC_RESOURCES_ONE_COPY_TILE_TASK_WORKER_POOL_H_ |
| 6 #define CC_RESOURCES_ONE_COPY_TILE_TASK_WORKER_POOL_H_ | 6 #define CC_RESOURCES_ONE_COPY_TILE_TASK_WORKER_POOL_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 35 | 35 |
| 36 static scoped_ptr<TileTaskWorkerPool> Create( | 36 static scoped_ptr<TileTaskWorkerPool> Create( |
| 37 base::SequencedTaskRunner* task_runner, | 37 base::SequencedTaskRunner* task_runner, |
| 38 TaskGraphRunner* task_graph_runner, | 38 TaskGraphRunner* task_graph_runner, |
| 39 ContextProvider* context_provider, | 39 ContextProvider* context_provider, |
| 40 ResourceProvider* resource_provider, | 40 ResourceProvider* resource_provider, |
| 41 ResourcePool* resource_pool); | 41 ResourcePool* resource_pool); |
| 42 | 42 |
| 43 // Overridden from TileTaskWorkerPool: | 43 // Overridden from TileTaskWorkerPool: |
| 44 TileTaskRunner* AsTileTaskRunner() override; | 44 TileTaskRunner* AsTileTaskRunner() override; |
| 45 ResourceFormat GetResourceFormat() override; | |
| 45 | 46 |
| 46 // Overridden from TileTaskRunner: | 47 // Overridden from TileTaskRunner: |
| 47 void SetClient(TileTaskRunnerClient* client) override; | 48 void SetClient(TileTaskRunnerClient* client) override; |
| 48 void Shutdown() override; | 49 void Shutdown() override; |
| 49 void ScheduleTasks(TileTaskQueue* queue) override; | 50 void ScheduleTasks(TileTaskQueue* queue) override; |
| 50 void CheckForCompletedTasks() override; | 51 void CheckForCompletedTasks() override; |
| 51 | 52 |
| 52 // Overridden from TileTaskClient: | 53 // Overridden from TileTaskClient: |
| 53 scoped_ptr<RasterBuffer> AcquireBufferForRaster( | 54 scoped_ptr<RasterBuffer> AcquireBufferForRaster( |
| 54 const Resource* resource) override; | 55 const Resource* resource) override; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 99 scoped_refptr<base::debug::ConvertableToTraceFormat> StateAsValue() const; | 100 scoped_refptr<base::debug::ConvertableToTraceFormat> StateAsValue() const; |
| 100 void StagingStateAsValueInto(base::debug::TracedValue* staging_state) const; | 101 void StagingStateAsValueInto(base::debug::TracedValue* staging_state) const; |
| 101 | 102 |
| 102 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 103 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
| 103 TaskGraphRunner* task_graph_runner_; | 104 TaskGraphRunner* task_graph_runner_; |
| 104 const NamespaceToken namespace_token_; | 105 const NamespaceToken namespace_token_; |
| 105 TileTaskRunnerClient* client_; | 106 TileTaskRunnerClient* client_; |
| 106 ContextProvider* context_provider_; | 107 ContextProvider* context_provider_; |
| 107 ResourceProvider* resource_provider_; | 108 ResourceProvider* resource_provider_; |
| 108 ResourcePool* resource_pool_; | 109 ResourcePool* resource_pool_; |
| 110 ResourceFormat resource_format_; | |
|
reveman
2015/01/22 23:01:46
is this member variable needed? just use resource_
peterp
2015/01/23 13:19:06
Alright. Done.
| |
| 109 TaskSetCollection tasks_pending_; | 111 TaskSetCollection tasks_pending_; |
| 110 scoped_refptr<TileTask> task_set_finished_tasks_[kNumberOfTaskSets]; | 112 scoped_refptr<TileTask> task_set_finished_tasks_[kNumberOfTaskSets]; |
| 111 CopySequenceNumber last_issued_copy_operation_; | 113 CopySequenceNumber last_issued_copy_operation_; |
| 112 CopySequenceNumber last_flushed_copy_operation_; | 114 CopySequenceNumber last_flushed_copy_operation_; |
| 113 | 115 |
| 114 // Task graph used when scheduling tasks and vector used to gather | 116 // Task graph used when scheduling tasks and vector used to gather |
| 115 // completed tasks. | 117 // completed tasks. |
| 116 TaskGraph graph_; | 118 TaskGraph graph_; |
| 117 Task::Vector completed_tasks_; | 119 Task::Vector completed_tasks_; |
| 118 | 120 |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 132 // canceled when ScheduleTasks() is called. | 134 // canceled when ScheduleTasks() is called. |
| 133 base::WeakPtrFactory<OneCopyTileTaskWorkerPool> | 135 base::WeakPtrFactory<OneCopyTileTaskWorkerPool> |
| 134 task_set_finished_weak_ptr_factory_; | 136 task_set_finished_weak_ptr_factory_; |
| 135 | 137 |
| 136 DISALLOW_COPY_AND_ASSIGN(OneCopyTileTaskWorkerPool); | 138 DISALLOW_COPY_AND_ASSIGN(OneCopyTileTaskWorkerPool); |
| 137 }; | 139 }; |
| 138 | 140 |
| 139 } // namespace cc | 141 } // namespace cc |
| 140 | 142 |
| 141 #endif // CC_RESOURCES_ONE_COPY_TILE_TASK_WORKER_POOL_H_ | 143 #endif // CC_RESOURCES_ONE_COPY_TILE_TASK_WORKER_POOL_H_ |
| OLD | NEW |