| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RASTERIZER_H_ | 5 #ifndef CC_RESOURCES_RASTERIZER_H_ |
| 6 #define CC_RESOURCES_RASTERIZER_H_ | 6 #define CC_RESOURCES_RASTERIZER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 bool required_for_activation; | 120 bool required_for_activation; |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 RasterTaskQueue(); | 123 RasterTaskQueue(); |
| 124 ~RasterTaskQueue(); | 124 ~RasterTaskQueue(); |
| 125 | 125 |
| 126 void Swap(RasterTaskQueue* other); | 126 void Swap(RasterTaskQueue* other); |
| 127 void Reset(); | 127 void Reset(); |
| 128 | 128 |
| 129 Item::Vector items; | 129 Item::Vector items; |
| 130 size_t required_for_activation_count; | |
| 131 }; | 130 }; |
| 132 | 131 |
| 133 // This interface can be used to schedule and run raster tasks. The client will | 132 // This interface can be used to schedule and run raster tasks. The client will |
| 134 // be notified asynchronously when the set of tasks marked as "required for | 133 // be notified asynchronously when the set of tasks marked as "required for |
| 135 // activation" have finished running and when all scheduled tasks have finished | 134 // activation" have finished running and when all scheduled tasks have finished |
| 136 // running. The client can call CheckForCompletedTasks() at any time to dispatch | 135 // running. The client can call CheckForCompletedTasks() at any time to dispatch |
| 137 // pending completion callbacks for all tasks that have finished running. | 136 // pending completion callbacks for all tasks that have finished running. |
| 138 class CC_EXPORT Rasterizer { | 137 class CC_EXPORT Rasterizer { |
| 139 public: | 138 public: |
| 140 // Set the client instance to be notified when finished running tasks. | 139 // Set the client instance to be notified when finished running tasks. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 155 // Check for completed tasks and dispatch reply callbacks. | 154 // Check for completed tasks and dispatch reply callbacks. |
| 156 virtual void CheckForCompletedTasks() = 0; | 155 virtual void CheckForCompletedTasks() = 0; |
| 157 | 156 |
| 158 protected: | 157 protected: |
| 159 virtual ~Rasterizer() {} | 158 virtual ~Rasterizer() {} |
| 160 }; | 159 }; |
| 161 | 160 |
| 162 } // namespace cc | 161 } // namespace cc |
| 163 | 162 |
| 164 #endif // CC_RESOURCES_RASTERIZER_H_ | 163 #endif // CC_RESOURCES_RASTERIZER_H_ |
| OLD | NEW |