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

Side by Side Diff: cc/resources/image_raster_worker_pool.h

Issue 16190002: cc: Add new RasterWorkerPool interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: pass unit tests 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_
6 #define CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_
7
8 #include "cc/resources/raster_worker_pool.h"
9
10 namespace cc {
11
12 class ImageRasterWorkerPool : public RasterWorkerPool,
13 public WorkerPoolClient {
14 public:
15 virtual ~ImageRasterWorkerPool();
16
17 static scoped_ptr<RasterWorkerPool> Create(
18 ResourceProvider* resource_provider,
19 size_t num_threads) {
20 return make_scoped_ptr<RasterWorkerPool>(
21 new ImageRasterWorkerPool(resource_provider, num_threads));
22 }
23
24 // Overridden from WorkerPool:
25 virtual void Shutdown() OVERRIDE;
26
27 // Overridden from RasterWorkerPool:
28 virtual void ScheduleTasks(RasterTask::Queue* queue) OVERRIDE;
29
30 private:
31 ImageRasterWorkerPool(ResourceProvider* resource_provider,
32 size_t num_threads);
33
34 // Overridden from WorkerPoolClient:
35 virtual void DidFinishDispatchingWorkerPoolCompletionCallbacks() OVERRIDE;
36
37 void OnRasterTaskCompleted(
38 scoped_refptr<internal::RasterWorkerPoolTask> task,
39 bool was_canceled,
40 bool need_bind);
kaanb 2013/05/29 21:04:15 nit: s/need/needs/ here and elsewhere
reveman 2013/05/30 01:46:10 Done.
41 void DidFinishRasterTask(internal::RasterWorkerPoolTask* task);
42
43 DISALLOW_COPY_AND_ASSIGN(ImageRasterWorkerPool);
44 };
45
46 } // namespace cc
47
48 #endif // CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698