Index: cc/raster/tile_task.cc |
diff --git a/cc/raster/tile_task.cc b/cc/raster/tile_task.cc |
index 87163164cf14ea01d54fc1d509b9c214aa8c11bc..d731433c2c0f25d6ec70d5b16b48bb8563b70a31 100644 |
--- a/cc/raster/tile_task.cc |
+++ b/cc/raster/tile_task.cc |
@@ -9,13 +9,26 @@ |
namespace cc { |
TileTask::TileTask(bool supports_concurrent_execution) |
- : supports_concurrent_execution_(supports_concurrent_execution) {} |
+ : supports_concurrent_execution_(supports_concurrent_execution), |
+ did_complete_(false) {} |
TileTask::TileTask(bool supports_concurrent_execution, |
TileTask::Vector* dependencies) |
: supports_concurrent_execution_(supports_concurrent_execution), |
- dependencies_(std::move(*dependencies)) {} |
+ dependencies_(std::move(*dependencies)), |
+ did_complete_(false) {} |
+ |
+TileTask::~TileTask() { |
+ DCHECK(did_complete_); |
+} |
+ |
+void TileTask::DidComplete() { |
+ DCHECK(!did_complete_); |
+ did_complete_ = true; |
+} |
-TileTask::~TileTask() {} |
+bool TileTask::HasCompleted() const { |
+ return did_complete_; |
+} |
} // namespace cc |