| 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 <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/containers/hash_tables.h" |
| 12 #include "cc/resources/raster_worker_pool.h" | 13 #include "cc/resources/raster_worker_pool.h" |
| 13 | 14 |
| 14 namespace cc { | 15 namespace cc { |
| 15 | 16 |
| 16 class CC_EXPORT PixelBufferRasterWorkerPool : public RasterWorkerPool { | 17 class CC_EXPORT PixelBufferRasterWorkerPool : public RasterWorkerPool { |
| 17 public: | 18 public: |
| 18 virtual ~PixelBufferRasterWorkerPool(); | 19 virtual ~PixelBufferRasterWorkerPool(); |
| 19 | 20 |
| 20 static scoped_ptr<RasterWorkerPool> Create( | 21 static scoped_ptr<RasterWorkerPool> Create( |
| 21 ResourceProvider* resource_provider, | 22 ResourceProvider* resource_provider, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 scoped_ptr<base::Value> ThrottleStateAsValue() const; | 62 scoped_ptr<base::Value> ThrottleStateAsValue() const; |
| 62 | 63 |
| 63 bool shutdown_; | 64 bool shutdown_; |
| 64 | 65 |
| 65 TaskMap pixel_buffer_tasks_; | 66 TaskMap pixel_buffer_tasks_; |
| 66 | 67 |
| 67 typedef std::deque<scoped_refptr<internal::RasterWorkerPoolTask> > TaskDeque; | 68 typedef std::deque<scoped_refptr<internal::RasterWorkerPoolTask> > TaskDeque; |
| 68 TaskDeque tasks_with_pending_upload_; | 69 TaskDeque tasks_with_pending_upload_; |
| 69 TaskDeque completed_tasks_; | 70 TaskDeque completed_tasks_; |
| 70 | 71 |
| 71 typedef std::set<internal::RasterWorkerPoolTask*> TaskSet; | 72 typedef base::hash_set<internal::RasterWorkerPoolTask*> TaskSet; |
| 72 TaskSet tasks_required_for_activation_; | 73 TaskSet tasks_required_for_activation_; |
| 73 | 74 |
| 74 size_t scheduled_raster_task_count_; | 75 size_t scheduled_raster_task_count_; |
| 75 size_t bytes_pending_upload_; | 76 size_t bytes_pending_upload_; |
| 76 size_t max_bytes_pending_upload_; | 77 size_t max_bytes_pending_upload_; |
| 77 bool has_performed_uploads_since_last_flush_; | 78 bool has_performed_uploads_since_last_flush_; |
| 78 base::CancelableClosure check_for_completed_raster_tasks_callback_; | 79 base::CancelableClosure check_for_completed_raster_tasks_callback_; |
| 79 bool check_for_completed_raster_tasks_pending_; | 80 bool check_for_completed_raster_tasks_pending_; |
| 80 | 81 |
| 81 bool should_notify_client_if_no_tasks_are_pending_; | 82 bool should_notify_client_if_no_tasks_are_pending_; |
| 82 bool should_notify_client_if_no_tasks_required_for_activation_are_pending_; | 83 bool should_notify_client_if_no_tasks_required_for_activation_are_pending_; |
| 83 | 84 |
| 84 DISALLOW_COPY_AND_ASSIGN(PixelBufferRasterWorkerPool); | 85 DISALLOW_COPY_AND_ASSIGN(PixelBufferRasterWorkerPool); |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 } // namespace cc | 88 } // namespace cc |
| 88 | 89 |
| 89 #endif // CC_RESOURCES_PIXEL_BUFFER_RASTER_WORKER_POOL_H_ | 90 #endif // CC_RESOURCES_PIXEL_BUFFER_RASTER_WORKER_POOL_H_ |
| OLD | NEW |