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_H_ | 5 #ifndef CC_RASTER_TILE_TASK_H_ |
6 #define CC_RASTER_TILE_TASK_H_ | 6 #define CC_RASTER_TILE_TASK_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "cc/raster/task.h" | 10 #include "cc/raster/task.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // in the task graph. If false, this task will be scheduled with | 21 // in the task graph. If false, this task will be scheduled with |
22 // TASK_CATEGORY_NONCONCURRENT_FOREGROUND. | 22 // TASK_CATEGORY_NONCONCURRENT_FOREGROUND. |
23 bool supports_concurrent_execution() const { | 23 bool supports_concurrent_execution() const { |
24 return supports_concurrent_execution_; | 24 return supports_concurrent_execution_; |
25 } | 25 } |
26 | 26 |
27 // This function should be called from origin thread to process the completion | 27 // This function should be called from origin thread to process the completion |
28 // of the task. | 28 // of the task. |
29 virtual void OnTaskCompleted() = 0; | 29 virtual void OnTaskCompleted() = 0; |
30 | 30 |
| 31 void DidComplete(); |
| 32 bool HasCompleted() const; |
| 33 |
31 protected: | 34 protected: |
32 explicit TileTask(bool supports_concurrent_execution); | 35 explicit TileTask(bool supports_concurrent_execution); |
33 TileTask(bool supports_concurrent_execution, TileTask::Vector* dependencies); | 36 TileTask(bool supports_concurrent_execution, TileTask::Vector* dependencies); |
34 ~TileTask() override; | 37 ~TileTask() override; |
35 | 38 |
36 const bool supports_concurrent_execution_; | 39 const bool supports_concurrent_execution_; |
37 TileTask::Vector dependencies_; | 40 TileTask::Vector dependencies_; |
| 41 bool did_complete_; |
38 }; | 42 }; |
39 | 43 |
40 } // namespace cc | 44 } // namespace cc |
41 | 45 |
42 #endif // CC_RASTER_TILE_TASK_H_ | 46 #endif // CC_RASTER_TILE_TASK_H_ |
OLD | NEW |