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

Side by Side Diff: cc/resources/raster_worker_pool.h

Issue 73923003: Shared Raster Worker Threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build Error for Mac, macro conflict, moving setter to WorkerPool. Created 6 years, 11 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 | « cc/resources/pixel_buffer_raster_worker_pool.cc ('k') | cc/resources/raster_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 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_RESOURCES_RASTER_WORKER_POOL_H_ 5 #ifndef CC_RESOURCES_RASTER_WORKER_POOL_H_
6 #define CC_RESOURCES_RASTER_WORKER_POOL_H_ 6 #define CC_RESOURCES_RASTER_WORKER_POOL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 typedef std::vector<scoped_refptr<internal::RasterWorkerPoolTask> > 223 typedef std::vector<scoped_refptr<internal::RasterWorkerPoolTask> >
224 RasterTaskVector; 224 RasterTaskVector;
225 typedef std::deque<scoped_refptr<internal::RasterWorkerPoolTask> > 225 typedef std::deque<scoped_refptr<internal::RasterWorkerPoolTask> >
226 RasterTaskDeque; 226 RasterTaskDeque;
227 typedef base::hash_set<internal::RasterWorkerPoolTask*> RasterTaskSet; 227 typedef base::hash_set<internal::RasterWorkerPoolTask*> RasterTaskSet;
228 typedef internal::RasterWorkerPoolTask* TaskMapKey; 228 typedef internal::RasterWorkerPoolTask* TaskMapKey;
229 typedef base::hash_map<TaskMapKey, 229 typedef base::hash_map<TaskMapKey,
230 scoped_refptr<internal::WorkerPoolTask> > TaskMap; 230 scoped_refptr<internal::WorkerPoolTask> > TaskMap;
231 231
232 RasterWorkerPool(ResourceProvider* resource_provider, 232 RasterWorkerPool(ResourceProvider* resource_provider,
233 ContextProvider* context_provider, 233 ContextProvider* context_provider);
234 size_t num_threads);
235 234
236 virtual void OnRasterTasksFinished() = 0; 235 virtual void OnRasterTasksFinished() = 0;
237 virtual void OnRasterTasksRequiredForActivationFinished() = 0; 236 virtual void OnRasterTasksRequiredForActivationFinished() = 0;
238 237
239 void SetRasterTasks(RasterTask::Queue* queue); 238 void SetRasterTasks(RasterTask::Queue* queue);
240 bool IsRasterTaskRequiredForActivation( 239 bool IsRasterTaskRequiredForActivation(
241 internal::RasterWorkerPoolTask* task) const; 240 internal::RasterWorkerPoolTask* task) const;
242 // Run raster tasks that use GPU on current thread. 241 // Run raster tasks that use GPU on current thread.
243 void RunGpuRasterTasks(const RasterTaskVector& tasks); 242 void RunGpuRasterTasks(const RasterTaskVector& tasks);
244 243
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 291
293 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_; 292 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_;
294 scoped_refptr<internal::WorkerPoolTask> 293 scoped_refptr<internal::WorkerPoolTask>
295 raster_required_for_activation_finished_task_; 294 raster_required_for_activation_finished_task_;
296 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_; 295 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_;
297 }; 296 };
298 297
299 } // namespace cc 298 } // namespace cc
300 299
301 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ 300 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_
OLDNEW
« no previous file with comments | « cc/resources/pixel_buffer_raster_worker_pool.cc ('k') | cc/resources/raster_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698