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

Side by Side Diff: cc/base/worker_pool.h

Issue 16190002: cc: Add new RasterWorkerPool interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 7 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/cc.gyp » ('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_BASE_WORKER_POOL_H_ 5 #ifndef CC_BASE_WORKER_POOL_H_
6 #define CC_BASE_WORKER_POOL_H_ 6 #define CC_BASE_WORKER_POOL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Tells the worker pool to shutdown and returns once all pending tasks have 72 // Tells the worker pool to shutdown and returns once all pending tasks have
73 // completed. 73 // completed.
74 virtual void Shutdown(); 74 virtual void Shutdown();
75 75
76 // Set a new client. 76 // Set a new client.
77 void SetClient(WorkerPoolClient* client) { 77 void SetClient(WorkerPoolClient* client) {
78 client_ = client; 78 client_ = client;
79 } 79 }
80 80
81 // Force a check for completed tasks. 81 // Force a check for completed tasks.
82 void CheckForCompletedTasks(); 82 virtual void CheckForCompletedTasks();
83 83
84 protected: 84 protected:
85 WorkerPool(size_t num_threads, 85 WorkerPool(size_t num_threads,
86 base::TimeDelta check_for_completed_tasks_delay, 86 base::TimeDelta check_for_completed_tasks_delay,
87 const std::string& thread_name_prefix); 87 const std::string& thread_name_prefix);
88 88
89 void ScheduleTasks(internal::WorkerPoolTask* root); 89 void ScheduleTasks(internal::WorkerPoolTask* root);
90 90
91 private: 91 private:
92 class Inner; 92 class Inner;
(...skipping 12 matching lines...) Expand all
105 bool check_for_completed_tasks_pending_; 105 bool check_for_completed_tasks_pending_;
106 bool in_dispatch_completion_callbacks_; 106 bool in_dispatch_completion_callbacks_;
107 107
108 // Hide the gory details of the worker pool in |inner_|. 108 // Hide the gory details of the worker pool in |inner_|.
109 const scoped_ptr<Inner> inner_; 109 const scoped_ptr<Inner> inner_;
110 }; 110 };
111 111
112 } // namespace cc 112 } // namespace cc
113 113
114 #endif // CC_BASE_WORKER_POOL_H_ 114 #endif // CC_BASE_WORKER_POOL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/cc.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698