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_ONE_COPY_TILE_TASK_WORKER_POOL_H_ | 5 #ifndef CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ |
6 #define CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ | 6 #define CC_RASTER_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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 CopySequenceNumber last_flushed_copy_operation_; | 133 CopySequenceNumber last_flushed_copy_operation_; |
134 | 134 |
135 // Task graph used when scheduling tasks and vector used to gather | 135 // Task graph used when scheduling tasks and vector used to gather |
136 // completed tasks. | 136 // completed tasks. |
137 TaskGraph graph_; | 137 TaskGraph graph_; |
138 Task::Vector completed_tasks_; | 138 Task::Vector completed_tasks_; |
139 | 139 |
140 base::Lock lock_; | 140 base::Lock lock_; |
141 // |lock_| must be acquired when accessing the following members. | 141 // |lock_| must be acquired when accessing the following members. |
142 base::ConditionVariable copy_operation_count_cv_; | 142 base::ConditionVariable copy_operation_count_cv_; |
| 143 int bytes_scheduled_since_last_flush_; |
143 size_t issued_copy_operation_count_; | 144 size_t issued_copy_operation_count_; |
144 CopyOperation::Deque pending_copy_operations_; | 145 CopyOperation::Deque pending_copy_operations_; |
145 CopySequenceNumber next_copy_operation_sequence_; | 146 CopySequenceNumber next_copy_operation_sequence_; |
146 bool check_for_completed_copy_operations_pending_; | 147 bool check_for_completed_copy_operations_pending_; |
147 base::TimeTicks last_check_for_completed_copy_operations_time_; | 148 base::TimeTicks last_check_for_completed_copy_operations_time_; |
148 bool shutdown_; | 149 bool shutdown_; |
149 | 150 |
150 base::WeakPtrFactory<OneCopyTileTaskWorkerPool> weak_ptr_factory_; | 151 base::WeakPtrFactory<OneCopyTileTaskWorkerPool> weak_ptr_factory_; |
151 // "raster finished" tasks need their own factory as they need to be | 152 // "raster finished" tasks need their own factory as they need to be |
152 // canceled when ScheduleTasks() is called. | 153 // canceled when ScheduleTasks() is called. |
153 base::WeakPtrFactory<OneCopyTileTaskWorkerPool> | 154 base::WeakPtrFactory<OneCopyTileTaskWorkerPool> |
154 task_set_finished_weak_ptr_factory_; | 155 task_set_finished_weak_ptr_factory_; |
155 | 156 |
156 DISALLOW_COPY_AND_ASSIGN(OneCopyTileTaskWorkerPool); | 157 DISALLOW_COPY_AND_ASSIGN(OneCopyTileTaskWorkerPool); |
157 }; | 158 }; |
158 | 159 |
159 } // namespace cc | 160 } // namespace cc |
160 | 161 |
161 #endif // CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ | 162 #endif // CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ |
OLD | NEW |