blob: 76d0497376ff893b50a991ca20cd1182d0d9ca2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CC_RESOURCES_RASTER_WORKER_POOL_H_
#define CC_RESOURCES_RASTER_WORKER_POOL_H_
#include <string>
#include "cc/base/worker_pool.h"
namespace cc {
class PicturePileImpl;
// A worker thread pool that runs raster tasks.
class CC_EXPORT RasterWorkerPool : public WorkerPool {
public:
typedef base::Callback<void(PicturePileImpl* picture_pile)> RasterCallback;
virtual ~RasterWorkerPool();
static scoped_ptr<RasterWorkerPool> Create(size_t num_threads) {
return make_scoped_ptr(new RasterWorkerPool(num_threads));
}
void PostRasterTaskAndReply(PicturePileImpl* picture_pile,
const RasterCallback& task,
const base::Closure& reply);
private:
explicit RasterWorkerPool(size_t num_threads);
DISALLOW_COPY_AND_ASSIGN(RasterWorkerPool);
};
} // namespace cc
#endif // CC_RESOURCES_RASTER_WORKER_POOL_H_
|