Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 { | |
| 21 class LazyPixelRef; | |
| 22 } | |
| 23 | |
| 24 namespace cc { | 20 namespace cc { |
| 25 namespace internal { | 21 namespace internal { |
| 26 | 22 |
| 27 class CC_EXPORT RasterWorkerPoolTask | 23 class CC_EXPORT RasterWorkerPoolTask |
| 28 : public base::RefCounted<RasterWorkerPoolTask> { | 24 : public base::RefCounted<RasterWorkerPoolTask> { |
| 29 public: | 25 public: |
| 30 typedef std::vector<scoped_refptr<WorkerPoolTask> > TaskVector; | 26 typedef std::vector<scoped_refptr<WorkerPoolTask> > TaskVector; |
| 31 | 27 |
| 32 // Returns true if |buffer| was written to. False indicate that | 28 // Returns true if |buffer| was written to. False indicate that |
| 33 // the content of |buffer| is undefined and the resource doesn't | 29 // the content of |buffer| is undefined and the resource doesn't |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 197 RasterMode raster_mode, | 193 RasterMode raster_mode, |
| 198 TileResolution tile_resolution, | 194 TileResolution tile_resolution, |
| 199 int layer_id, | 195 int layer_id, |
| 200 const void* tile_id, | 196 const void* tile_id, |
| 201 int source_frame_number, | 197 int source_frame_number, |
| 202 RenderingStatsInstrumentation* rendering_stats, | 198 RenderingStatsInstrumentation* rendering_stats, |
| 203 const RasterTask::Reply& reply, | 199 const RasterTask::Reply& reply, |
| 204 Task::Set* dependencies); | 200 Task::Set* dependencies); |
| 205 | 201 |
| 206 static Task CreateImageDecodeTask( | 202 static Task CreateImageDecodeTask( |
| 207 skia::LazyPixelRef* pixel_ref, | 203 SkPixelRef* pixel_ref, |
|
vmpstr
2013/12/20 17:41:06
Forward declare this? I can't tell which include i
reveman
2013/12/20 18:22:19
Done. picture.h pulled in SkPixelRef.h when it sho
| |
| 208 int layer_id, | 204 int layer_id, |
| 209 RenderingStatsInstrumentation* stats_instrumentation, | 205 RenderingStatsInstrumentation* stats_instrumentation, |
| 210 const Task::Reply& reply); | 206 const Task::Reply& reply); |
| 211 | 207 |
| 212 protected: | 208 protected: |
| 213 typedef std::vector<scoped_refptr<internal::WorkerPoolTask> > TaskVector; | 209 typedef std::vector<scoped_refptr<internal::WorkerPoolTask> > TaskVector; |
| 214 typedef std::vector<scoped_refptr<internal::RasterWorkerPoolTask> > | 210 typedef std::vector<scoped_refptr<internal::RasterWorkerPoolTask> > |
| 215 RasterTaskVector; | 211 RasterTaskVector; |
| 216 typedef base::hash_set<internal::RasterWorkerPoolTask*> RasterTaskSet; | 212 typedef base::hash_set<internal::RasterWorkerPoolTask*> RasterTaskSet; |
| 217 typedef internal::RasterWorkerPoolTask* TaskMapKey; | 213 typedef internal::RasterWorkerPoolTask* TaskMapKey; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 273 | 269 |
| 274 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_; | 270 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_; |
| 275 scoped_refptr<internal::WorkerPoolTask> | 271 scoped_refptr<internal::WorkerPoolTask> |
| 276 raster_required_for_activation_finished_task_; | 272 raster_required_for_activation_finished_task_; |
| 277 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_; | 273 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_; |
| 278 }; | 274 }; |
| 279 | 275 |
| 280 } // namespace cc | 276 } // namespace cc |
| 281 | 277 |
| 282 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ | 278 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ |
| OLD | NEW |