| 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_PIXEL_BUFFER_RASTER_WORKER_POOL_H_ | 5 #ifndef CC_RESOURCES_PIXEL_BUFFER_RASTER_WORKER_POOL_H_ |
| 6 #define CC_RESOURCES_PIXEL_BUFFER_RASTER_WORKER_POOL_H_ | 6 #define CC_RESOURCES_PIXEL_BUFFER_RASTER_WORKER_POOL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 // Overridden from RasterWorkerPool: | 41 // Overridden from RasterWorkerPool: |
| 42 virtual Rasterizer* AsRasterizer() OVERRIDE; | 42 virtual Rasterizer* AsRasterizer() OVERRIDE; |
| 43 | 43 |
| 44 // Overridden from Rasterizer: | 44 // Overridden from Rasterizer: |
| 45 virtual void SetClient(RasterizerClient* client) OVERRIDE; | 45 virtual void SetClient(RasterizerClient* client) OVERRIDE; |
| 46 virtual void Shutdown() OVERRIDE; | 46 virtual void Shutdown() OVERRIDE; |
| 47 virtual void ScheduleTasks(RasterTaskQueue* queue) OVERRIDE; | 47 virtual void ScheduleTasks(RasterTaskQueue* queue) OVERRIDE; |
| 48 virtual void CheckForCompletedTasks() OVERRIDE; | 48 virtual void CheckForCompletedTasks() OVERRIDE; |
| 49 | 49 |
| 50 // Overridden from RasterizerTaskClient: | 50 // Overridden from RasterizerTaskClient: |
| 51 virtual SkCanvas* AcquireCanvasForRaster(RasterTask* task) OVERRIDE; | 51 virtual RasterBuffer* AcquireBufferForRaster(RasterTask* task) OVERRIDE; |
| 52 virtual void ReleaseCanvasForRaster(RasterTask* task) OVERRIDE; | 52 virtual void ReleaseBufferForRaster(RasterTask* task) OVERRIDE; |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 struct RasterTaskState { | 55 struct RasterTaskState { |
| 56 class TaskComparator { | 56 class TaskComparator { |
| 57 public: | 57 public: |
| 58 explicit TaskComparator(const RasterTask* task) : task_(task) {} | 58 explicit TaskComparator(const RasterTask* task) : task_(task) {} |
| 59 | 59 |
| 60 bool operator()(const RasterTaskState& state) const { | 60 bool operator()(const RasterTaskState& state) const { |
| 61 return state.task == task_; | 61 return state.task == task_; |
| 62 } | 62 } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 base::WeakPtrFactory<PixelBufferRasterWorkerPool> | 139 base::WeakPtrFactory<PixelBufferRasterWorkerPool> |
| 140 raster_finished_weak_ptr_factory_; | 140 raster_finished_weak_ptr_factory_; |
| 141 | 141 |
| 142 DISALLOW_COPY_AND_ASSIGN(PixelBufferRasterWorkerPool); | 142 DISALLOW_COPY_AND_ASSIGN(PixelBufferRasterWorkerPool); |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 } // namespace cc | 145 } // namespace cc |
| 146 | 146 |
| 147 #endif // CC_RESOURCES_PIXEL_BUFFER_RASTER_WORKER_POOL_H_ | 147 #endif // CC_RESOURCES_PIXEL_BUFFER_RASTER_WORKER_POOL_H_ |
| OLD | NEW |