OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/test/fake_tile_task_manager.h" | 5 #include "cc/test/fake_tile_task_manager.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 | 8 |
9 namespace cc { | 9 namespace cc { |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 task->state().DidCancel(); | 27 task->state().DidCancel(); |
28 completed_tasks_.push_back(task); | 28 completed_tasks_.push_back(task); |
29 } | 29 } |
30 } | 30 } |
31 | 31 |
32 void FakeTileTaskManagerImpl::CheckForCompletedTasks() { | 32 void FakeTileTaskManagerImpl::CheckForCompletedTasks() { |
33 for (auto& task : completed_tasks_) { | 33 for (auto& task : completed_tasks_) { |
34 DCHECK(task->state().IsFinished() || task->state().IsCanceled()); | 34 DCHECK(task->state().IsFinished() || task->state().IsCanceled()); |
35 TileTask* tile_task = static_cast<TileTask*>(task.get()); | 35 TileTask* tile_task = static_cast<TileTask*>(task.get()); |
36 tile_task->OnTaskCompleted(); | 36 tile_task->OnTaskCompleted(); |
| 37 tile_task->DidComplete(); |
37 } | 38 } |
38 | 39 |
39 completed_tasks_.clear(); | 40 completed_tasks_.clear(); |
40 } | 41 } |
41 | 42 |
42 void FakeTileTaskManagerImpl::Shutdown() {} | 43 void FakeTileTaskManagerImpl::Shutdown() {} |
43 | 44 |
44 RasterBufferProvider* FakeTileTaskManagerImpl::GetRasterBufferProvider() const { | 45 RasterBufferProvider* FakeTileTaskManagerImpl::GetRasterBufferProvider() const { |
45 return raster_buffer_provider_.get(); | 46 return raster_buffer_provider_.get(); |
46 } | 47 } |
47 | 48 |
48 } // namespace cc | 49 } // namespace cc |
OLD | NEW |