| 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 <bitset> | 8 #include <bitset> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 class CC_EXPORT Rasterizer { | 142 class CC_EXPORT Rasterizer { |
| 143 public: | 143 public: |
| 144 // Set the client instance to be notified when finished running tasks. | 144 // Set the client instance to be notified when finished running tasks. |
| 145 virtual void SetClient(RasterizerClient* client) = 0; | 145 virtual void SetClient(RasterizerClient* client) = 0; |
| 146 | 146 |
| 147 // Tells the worker pool to shutdown after canceling all previously scheduled | 147 // Tells the worker pool to shutdown after canceling all previously scheduled |
| 148 // tasks. Reply callbacks are still guaranteed to run when | 148 // tasks. Reply callbacks are still guaranteed to run when |
| 149 // CheckForCompletedTasks() is called. | 149 // CheckForCompletedTasks() is called. |
| 150 virtual void Shutdown() = 0; | 150 virtual void Shutdown() = 0; |
| 151 | 151 |
| 152 // Run all raster tasks in |queue| synchronously. |
| 153 virtual void RunTasks(RasterTaskQueue* queue) = 0; |
| 154 |
| 152 // Schedule running of raster tasks in |queue| and all dependencies. | 155 // Schedule running of raster tasks in |queue| and all dependencies. |
| 153 // Previously scheduled tasks that are not in |queue| will be canceled unless | 156 // Previously scheduled tasks that are not in |queue| will be canceled unless |
| 154 // already running. Once scheduled, reply callbacks are guaranteed to run for | 157 // already running. Once scheduled, reply callbacks are guaranteed to run for |
| 155 // all tasks even if they later get canceled by another call to | 158 // all tasks even if they later get canceled by another call to |
| 156 // ScheduleTasks(). | 159 // ScheduleTasks(). |
| 157 virtual void ScheduleTasks(RasterTaskQueue* queue) = 0; | 160 virtual void ScheduleTasks(RasterTaskQueue* queue) = 0; |
| 158 | 161 |
| 159 // Check for completed tasks and dispatch reply callbacks. | 162 // Check for completed tasks and dispatch reply callbacks. |
| 160 virtual void CheckForCompletedTasks() = 0; | 163 virtual void CheckForCompletedTasks() = 0; |
| 161 | 164 |
| 162 protected: | 165 protected: |
| 163 virtual ~Rasterizer() {} | 166 virtual ~Rasterizer() {} |
| 164 }; | 167 }; |
| 165 | 168 |
| 166 } // namespace cc | 169 } // namespace cc |
| 167 | 170 |
| 168 #endif // CC_RESOURCES_RASTERIZER_H_ | 171 #endif // CC_RESOURCES_RASTERIZER_H_ |
| OLD | NEW |