| 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/tiles/image_controller.h" | 5 #include "cc/tiles/image_controller.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/optional.h" | 10 #include "base/optional.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 return PostDelayedTask(from_here, std::move(task), delay); | 73 return PostDelayedTask(from_here, std::move(task), delay); |
| 74 } | 74 } |
| 75 | 75 |
| 76 bool PostDelayedTask(const tracked_objects::Location& from_here, | 76 bool PostDelayedTask(const tracked_objects::Location& from_here, |
| 77 base::OnceClosure task, | 77 base::OnceClosure task, |
| 78 base::TimeDelta delay) override { | 78 base::TimeDelta delay) override { |
| 79 thread_.PostTask(std::move(task)); | 79 thread_.PostTask(std::move(task)); |
| 80 return true; | 80 return true; |
| 81 } | 81 } |
| 82 | 82 |
| 83 bool RunsTasksOnCurrentThread() const override { return false; } | 83 bool RunsTasksInCurrentSequence() const override { return false; } |
| 84 | 84 |
| 85 protected: | 85 protected: |
| 86 ~WorkerTaskRunner() override { | 86 ~WorkerTaskRunner() override { |
| 87 thread_.Shutdown(); | 87 thread_.Shutdown(); |
| 88 thread_.Join(); | 88 thread_.Join(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 TestWorkerThread thread_; | 91 TestWorkerThread thread_; |
| 92 }; | 92 }; |
| 93 | 93 |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 decode_client2.result()); | 591 decode_client2.result()); |
| 592 | 592 |
| 593 // Reset the controller since the order of destruction is wrong in this test | 593 // Reset the controller since the order of destruction is wrong in this test |
| 594 // (|other_cache| should outlive the controller. This is normally done via | 594 // (|other_cache| should outlive the controller. This is normally done via |
| 595 // SetImageDecodeCache(nullptr) or it can be done in the dtor of the cache.) | 595 // SetImageDecodeCache(nullptr) or it can be done in the dtor of the cache.) |
| 596 ResetController(); | 596 ResetController(); |
| 597 } | 597 } |
| 598 | 598 |
| 599 } // namespace | 599 } // namespace |
| 600 } // namespace cc | 600 } // namespace cc |
| OLD | NEW |