| OLD | NEW |
| 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_RASTER_WORKER_POOL_H_ | 5 #ifndef CC_RASTER_WORKER_POOL_H_ |
| 6 #define CC_RASTER_WORKER_POOL_H_ | 6 #define CC_RASTER_WORKER_POOL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "cc/worker_pool.h" | 10 #include "cc/worker_pool.h" |
| 11 | 11 |
| 12 namespace cc { | 12 namespace cc { |
| 13 class PicturePileImpl; | 13 class PicturePileImpl; |
| 14 | 14 |
| 15 // A worker thread pool that runs raster tasks. | 15 // A worker thread pool that runs raster tasks. |
| 16 class RasterWorkerPool : public WorkerPool { | 16 class RasterWorkerPool : public WorkerPool { |
| 17 public: | 17 public: |
| 18 typedef base::Callback<void(PicturePileImpl*, RenderingStats*)> | 18 typedef base::Callback<void(PicturePileImpl*, RenderingStats*)> |
| 19 RasterCallback; | 19 RasterCallback; |
| 20 | 20 |
| 21 virtual ~RasterWorkerPool(); | 21 virtual ~RasterWorkerPool(); |
| 22 | 22 |
| 23 static scoped_ptr<RasterWorkerPool> Create( | 23 static scoped_ptr<RasterWorkerPool> Create( |
| 24 size_t num_threads, bool record_rendering_stats) { | 24 size_t num_threads) { |
| 25 return make_scoped_ptr( | 25 return make_scoped_ptr( |
| 26 new RasterWorkerPool(num_threads, record_rendering_stats)); | 26 new RasterWorkerPool(num_threads)); |
| 27 } | 27 } |
| 28 | 28 |
| 29 void PostRasterTaskAndReply(PicturePileImpl* picture_pile, | 29 void PostRasterTaskAndReply(PicturePileImpl* picture_pile, |
| 30 const RasterCallback& task, | 30 const RasterCallback& task, |
| 31 const base::Closure& reply); | 31 const base::Closure& reply); |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 RasterWorkerPool(size_t num_threads, bool record_rendering_stats); | 34 RasterWorkerPool(size_t num_threads); |
| 35 | 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(RasterWorkerPool); | 36 DISALLOW_COPY_AND_ASSIGN(RasterWorkerPool); |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 } // namespace cc | 39 } // namespace cc |
| 40 | 40 |
| 41 #endif // CC_RASTER_WORKER_POOL_H_ | 41 #endif // CC_RASTER_WORKER_POOL_H_ |
| OLD | NEW |