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_RASTER_TILE_TASK_RUNNER_H_ | 5 #ifndef CC_RASTER_TILE_TASK_RUNNER_H_ |
6 #define CC_RASTER_TILE_TASK_RUNNER_H_ | 6 #define CC_RASTER_TILE_TASK_RUNNER_H_ |
7 | 7 |
8 #include <bitset> | 8 #include <bitset> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // 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 |
157 // already running. Once scheduled, reply callbacks are guaranteed to run for | 157 // already running. Once scheduled, reply callbacks are guaranteed to run for |
158 // 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 |
159 // ScheduleTasks(). | 159 // ScheduleTasks(). |
160 virtual void ScheduleTasks(TileTaskQueue* queue) = 0; | 160 virtual void ScheduleTasks(TileTaskQueue* queue) = 0; |
161 | 161 |
162 // Check for completed tasks and dispatch reply callbacks. | 162 // Check for completed tasks and dispatch reply callbacks. |
163 virtual void CheckForCompletedTasks() = 0; | 163 virtual void CheckForCompletedTasks() = 0; |
164 | 164 |
165 // Returns the format to use for the tiles. | 165 // Returns the format to use for the tiles. |
166 virtual ResourceFormat GetResourceFormat() const = 0; | 166 virtual ResourceFormat GetResourceFormat(bool must_be_noncompressed, |
| 167 bool must_support_alpha) const = 0; |
167 | 168 |
168 // Determine if the resource requires swizzling. | 169 // Determine if the resource requires swizzling. |
169 virtual bool GetResourceRequiresSwizzle() const = 0; | 170 virtual bool GetResourceRequiresSwizzle(bool must_be_noncompressed, |
| 171 bool must_support_alpha) const = 0; |
170 | 172 |
171 protected: | 173 protected: |
172 virtual ~TileTaskRunner() {} | 174 virtual ~TileTaskRunner() {} |
173 }; | 175 }; |
174 | 176 |
175 } // namespace cc | 177 } // namespace cc |
176 | 178 |
177 #endif // CC_RASTER_TILE_TASK_RUNNER_H_ | 179 #endif // CC_RASTER_TILE_TASK_RUNNER_H_ |
OLD | NEW |