| Index: cc/worker_pool.h
|
| diff --git a/cc/worker_pool.h b/cc/worker_pool.h
|
| index 10fe71e4336579ebcfc98da6f7d24669bd2c882f..ddbac7e26b91034fcbb1bfbcb26c772ceb4522b1 100644
|
| --- a/cc/worker_pool.h
|
| +++ b/cc/worker_pool.h
|
| @@ -42,10 +42,8 @@ class WorkerPool {
|
|
|
| virtual ~WorkerPool();
|
|
|
| - static scoped_ptr<WorkerPool> Create(
|
| - size_t num_threads, bool record_rendering_stats) {
|
| - return make_scoped_ptr(
|
| - new WorkerPool(num_threads, record_rendering_stats));
|
| + static scoped_ptr<WorkerPool> Create(size_t num_threads) {
|
| + return make_scoped_ptr(new WorkerPool(num_threads));
|
| }
|
|
|
| // Tells the worker pool to shutdown and returns once all pending tasks have
|
| @@ -60,6 +58,9 @@ class WorkerPool {
|
| // of pending tasks.
|
| bool IsBusy();
|
|
|
| + // Toggle rendering stats collection
|
| + void SetRecordRenderingStats(bool);
|
| +
|
| // Collect rendering stats all completed tasks.
|
| void GetRenderingStats(RenderingStats* stats);
|
|
|
| @@ -68,8 +69,7 @@ class WorkerPool {
|
| public:
|
| Worker(
|
| WorkerPool* worker_pool,
|
| - const std::string name,
|
| - scoped_ptr<RenderingStats> rendering_stats);
|
| + const std::string name);
|
| virtual ~Worker();
|
|
|
| // This must be called before the destructor.
|
| @@ -79,6 +79,9 @@ class WorkerPool {
|
| void PostTask(scoped_ptr<internal::WorkerPoolTask> task);
|
|
|
| int num_pending_tasks() const { return pending_tasks_.size(); }
|
| + void SetRenderingStats(scoped_ptr<RenderingStats> rendering_stats) {
|
| + rendering_stats_ = rendering_stats.Pass();
|
| + }
|
| const RenderingStats* rendering_stats() const {
|
| return rendering_stats_.get();
|
| }
|
| @@ -98,7 +101,7 @@ class WorkerPool {
|
| scoped_ptr<RenderingStats> rendering_stats_;
|
| };
|
|
|
| - WorkerPool(size_t num_threads, bool record_rendering_stats);
|
| + WorkerPool(size_t num_threads);
|
|
|
| WorkerPool::Worker* GetWorkerForNextTask();
|
|
|
|
|