Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: cc/raster/one_copy_tile_task_worker_pool.h

Issue 1148413007: cc: Use max_bytes_per_copy_operation setting to determine one-copy flush interval. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: int Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/raster/one_copy_tile_task_worker_pool.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | cc/raster/one_copy_tile_task_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698