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" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 // scheduled tasks. Reply callbacks are still guaranteed to run. | 179 // scheduled tasks. Reply callbacks are still guaranteed to run. |
180 virtual void Shutdown() OVERRIDE; | 180 virtual void Shutdown() OVERRIDE; |
181 | 181 |
182 // Schedule running of raster tasks in |queue| and all dependencies. | 182 // Schedule running of raster tasks in |queue| and all dependencies. |
183 // Previously scheduled tasks that are no longer needed to run | 183 // Previously scheduled tasks that are no longer needed to run |
184 // raster tasks in |queue| will be canceled unless already running. | 184 // raster tasks in |queue| will be canceled unless already running. |
185 // Once scheduled, reply callbacks are guaranteed to run for all tasks | 185 // Once scheduled, reply callbacks are guaranteed to run for all tasks |
186 // even if they later get canceled by another call to ScheduleTasks(). | 186 // even if they later get canceled by another call to ScheduleTasks(). |
187 virtual void ScheduleTasks(RasterTask::Queue* queue) = 0; | 187 virtual void ScheduleTasks(RasterTask::Queue* queue) = 0; |
188 | 188 |
| 189 // Returns the target that needs to be used for raster task resources. |
| 190 virtual GLenum GetResourceTarget() const = 0; |
| 191 |
189 // Returns the format that needs to be used for raster task resources. | 192 // Returns the format that needs to be used for raster task resources. |
190 virtual ResourceFormat GetResourceFormat() const = 0; | 193 virtual ResourceFormat GetResourceFormat() const = 0; |
191 | 194 |
192 // TODO(vmpstr): Figure out an elegant way to not pass this many parameters. | 195 // TODO(vmpstr): Figure out an elegant way to not pass this many parameters. |
193 static RasterTask CreateRasterTask( | 196 static RasterTask CreateRasterTask( |
194 const Resource* resource, | 197 const Resource* resource, |
195 PicturePileImpl* picture_pile, | 198 PicturePileImpl* picture_pile, |
196 gfx::Rect content_rect, | 199 gfx::Rect content_rect, |
197 float contents_scale, | 200 float contents_scale, |
198 RasterMode raster_mode, | 201 RasterMode raster_mode, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 277 |
275 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_; | 278 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_; |
276 scoped_refptr<internal::WorkerPoolTask> | 279 scoped_refptr<internal::WorkerPoolTask> |
277 raster_required_for_activation_finished_task_; | 280 raster_required_for_activation_finished_task_; |
278 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_; | 281 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_; |
279 }; | 282 }; |
280 | 283 |
281 } // namespace cc | 284 } // namespace cc |
282 | 285 |
283 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ | 286 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ |
OLD | NEW |