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

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

Issue 111143005: cc: Gather and lock/unlock SkDiscardablePixelRefs instead of skia::LazyPixelRefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/lazy/discardable/ to fix cc_unittests Created 6 years, 11 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 | « cc/resources/picture_unittest.cc ('k') | cc/resources/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_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 <vector> 8 #include <vector>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
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.h" 14 #include "cc/resources/resource.h"
15 #include "cc/resources/resource_provider.h" 15 #include "cc/resources/resource_provider.h"
16 #include "cc/resources/tile_priority.h" 16 #include "cc/resources/tile_priority.h"
17 #include "cc/resources/worker_pool.h" 17 #include "cc/resources/worker_pool.h"
18 #include "third_party/khronos/GLES2/gl2.h" 18 #include "third_party/khronos/GLES2/gl2.h"
19 19
20 namespace skia { 20 class SkPixelRef;
21 class LazyPixelRef;
22 }
23 21
24 namespace cc { 22 namespace cc {
25 namespace internal { 23 namespace internal {
26 24
27 class CC_EXPORT RasterWorkerPoolTask 25 class CC_EXPORT RasterWorkerPoolTask
28 : public base::RefCounted<RasterWorkerPoolTask> { 26 : public base::RefCounted<RasterWorkerPoolTask> {
29 public: 27 public:
30 typedef std::vector<scoped_refptr<WorkerPoolTask> > TaskVector; 28 typedef std::vector<scoped_refptr<WorkerPoolTask> > TaskVector;
31 29
32 // Returns true if |buffer| was written to. False indicate that 30 // Returns true if |buffer| was written to. False indicate that
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 RasterMode raster_mode, 195 RasterMode raster_mode,
198 TileResolution tile_resolution, 196 TileResolution tile_resolution,
199 int layer_id, 197 int layer_id,
200 const void* tile_id, 198 const void* tile_id,
201 int source_frame_number, 199 int source_frame_number,
202 RenderingStatsInstrumentation* rendering_stats, 200 RenderingStatsInstrumentation* rendering_stats,
203 const RasterTask::Reply& reply, 201 const RasterTask::Reply& reply,
204 Task::Set* dependencies); 202 Task::Set* dependencies);
205 203
206 static Task CreateImageDecodeTask( 204 static Task CreateImageDecodeTask(
207 skia::LazyPixelRef* pixel_ref, 205 SkPixelRef* pixel_ref,
208 int layer_id, 206 int layer_id,
209 RenderingStatsInstrumentation* stats_instrumentation, 207 RenderingStatsInstrumentation* stats_instrumentation,
210 const Task::Reply& reply); 208 const Task::Reply& reply);
211 209
212 protected: 210 protected:
213 typedef std::vector<scoped_refptr<internal::WorkerPoolTask> > TaskVector; 211 typedef std::vector<scoped_refptr<internal::WorkerPoolTask> > TaskVector;
214 typedef std::vector<scoped_refptr<internal::RasterWorkerPoolTask> > 212 typedef std::vector<scoped_refptr<internal::RasterWorkerPoolTask> >
215 RasterTaskVector; 213 RasterTaskVector;
216 typedef base::hash_set<internal::RasterWorkerPoolTask*> RasterTaskSet; 214 typedef base::hash_set<internal::RasterWorkerPoolTask*> RasterTaskSet;
217 typedef internal::RasterWorkerPoolTask* TaskMapKey; 215 typedef internal::RasterWorkerPoolTask* TaskMapKey;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 271
274 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_; 272 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_;
275 scoped_refptr<internal::WorkerPoolTask> 273 scoped_refptr<internal::WorkerPoolTask>
276 raster_required_for_activation_finished_task_; 274 raster_required_for_activation_finished_task_;
277 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_; 275 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_;
278 }; 276 };
279 277
280 } // namespace cc 278 } // namespace cc
281 279
282 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ 280 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_
OLDNEW
« no previous file with comments | « cc/resources/picture_unittest.cc ('k') | cc/resources/raster_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698