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

Side by Side Diff: cc/raster_worker_pool.h

Issue 12217105: cc: Check for completed raster tasks at interval. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing CC_EXPORT. Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/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_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(size_t num_threads) { 23 static scoped_ptr<RasterWorkerPool> Create(
24 return make_scoped_ptr(new RasterWorkerPool(num_threads)); 24 WorkerPoolClient* client, size_t num_threads) {
25 return make_scoped_ptr(new RasterWorkerPool(client, num_threads));
25 } 26 }
26 27
27 void PostRasterTaskAndReply(PicturePileImpl* picture_pile, 28 void PostRasterTaskAndReply(PicturePileImpl* picture_pile,
28 const RasterCallback& task, 29 const RasterCallback& task,
29 const base::Closure& reply); 30 const base::Closure& reply);
30 31
31 private: 32 private:
32 explicit RasterWorkerPool(size_t num_threads); 33 RasterWorkerPool(WorkerPoolClient* client, size_t num_threads);
33 34
34 DISALLOW_COPY_AND_ASSIGN(RasterWorkerPool); 35 DISALLOW_COPY_AND_ASSIGN(RasterWorkerPool);
35 }; 36 };
36 37
37 } // namespace cc 38 } // namespace cc
38 39
39 #endif // CC_RASTER_WORKER_POOL_H_ 40 #endif // CC_RASTER_WORKER_POOL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/raster_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698