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

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

Issue 170783007: Re-land: cc: Cleanup internal::WorkerPoolTaskClient interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
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_RESOURCES_RASTER_WORKER_POOL_H_ 5 #ifndef CC_RESOURCES_RASTER_WORKER_POOL_H_
6 #define CC_RESOURCES_RASTER_WORKER_POOL_H_ 6 #define CC_RESOURCES_RASTER_WORKER_POOL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
11 #include "cc/debug/rendering_stats_instrumentation.h" 11 #include "cc/debug/rendering_stats_instrumentation.h"
12 #include "cc/resources/picture_pile_impl.h" 12 #include "cc/resources/picture_pile_impl.h"
13 #include "cc/resources/raster_mode.h" 13 #include "cc/resources/raster_mode.h"
14 #include "cc/resources/resource_format.h" 14 #include "cc/resources/resource_format.h"
15 #include "cc/resources/task_graph_runner.h" 15 #include "cc/resources/task_graph_runner.h"
16 #include "cc/resources/tile_priority.h" 16 #include "cc/resources/tile_priority.h"
17 17
18 class SkPixelRef; 18 class SkPixelRef;
19 19
20 namespace cc { 20 namespace cc {
21 21
22 class ContextProvider; 22 class ContextProvider;
23 class Resource; 23 class Resource;
24 class ResourceProvider; 24 class ResourceProvider;
25 25
26 namespace internal { 26 namespace internal {
27 27
28 class WorkerPoolTask; 28 class WorkerPoolTask;
29 class RasterWorkerPoolTask;
30 29
31 class CC_EXPORT WorkerPoolTaskClient { 30 class CC_EXPORT WorkerPoolTaskClient {
32 public: 31 public:
33 virtual SkCanvas* AcquireCanvasForRaster(RasterWorkerPoolTask* task) = 0; 32 virtual SkCanvas* AcquireCanvasForRaster(WorkerPoolTask* task,
34 virtual void OnRasterCompleted(RasterWorkerPoolTask* task, 33 const Resource* resource) = 0;
35 const PicturePileImpl::Analysis& analysis) = 0; 34 virtual void ReleaseCanvasForRaster(WorkerPoolTask* task,
36 virtual void OnImageDecodeCompleted(WorkerPoolTask* task) = 0; 35 const Resource* resource) = 0;
37 36
38 protected: 37 protected:
39 virtual ~WorkerPoolTaskClient() {} 38 virtual ~WorkerPoolTaskClient() {}
40 }; 39 };
41 40
42 class CC_EXPORT WorkerPoolTask : public Task { 41 class CC_EXPORT WorkerPoolTask : public Task {
43 public: 42 public:
44 typedef std::vector<scoped_refptr<WorkerPoolTask> > Vector; 43 typedef std::vector<scoped_refptr<WorkerPoolTask> > Vector;
45 44
46 virtual void ScheduleOnOriginThread(WorkerPoolTaskClient* client) = 0; 45 virtual void ScheduleOnOriginThread(WorkerPoolTaskClient* client) = 0;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 252
254 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_; 253 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_;
255 scoped_refptr<internal::WorkerPoolTask> 254 scoped_refptr<internal::WorkerPoolTask>
256 raster_required_for_activation_finished_task_; 255 raster_required_for_activation_finished_task_;
257 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_; 256 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_;
258 }; 257 };
259 258
260 } // namespace cc 259 } // namespace cc
261 260
262 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ 261 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698