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 #include "cc/raster/tile_task.h" | 5 #include "cc/raster/tile_task.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace cc { | 9 namespace cc { |
10 | 10 |
11 TileTask::TileTask(bool supports_concurrent_execution) | 11 TileTask::TileTask(bool supports_concurrent_execution) |
12 : supports_concurrent_execution_(supports_concurrent_execution) {} | 12 : supports_concurrent_execution_(supports_concurrent_execution), |
| 13 did_complete_(false) {} |
13 | 14 |
14 TileTask::TileTask(bool supports_concurrent_execution, | 15 TileTask::TileTask(bool supports_concurrent_execution, |
15 TileTask::Vector* dependencies) | 16 TileTask::Vector* dependencies) |
16 : supports_concurrent_execution_(supports_concurrent_execution), | 17 : supports_concurrent_execution_(supports_concurrent_execution), |
17 dependencies_(std::move(*dependencies)) {} | 18 dependencies_(std::move(*dependencies)), |
| 19 did_complete_(false) {} |
18 | 20 |
19 TileTask::~TileTask() {} | 21 TileTask::~TileTask() { |
| 22 DCHECK(did_complete_); |
| 23 } |
| 24 |
| 25 void TileTask::DidComplete() { |
| 26 DCHECK(!did_complete_); |
| 27 did_complete_ = true; |
| 28 } |
| 29 |
| 30 bool TileTask::HasCompleted() const { |
| 31 return did_complete_; |
| 32 } |
20 | 33 |
21 } // namespace cc | 34 } // namespace cc |
OLD | NEW |