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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 decode_client2.result()); | 587 decode_client2.result()); |
588 | 588 |
589 // Reset the controller since the order of destruction is wrong in this test | 589 // Reset the controller since the order of destruction is wrong in this test |
590 // (|other_cache| should outlive the controller. This is normally done via | 590 // (|other_cache| should outlive the controller. This is normally done via |
591 // SetImageDecodeCache(nullptr) or it can be done in the dtor of the cache.) | 591 // SetImageDecodeCache(nullptr) or it can be done in the dtor of the cache.) |
592 ResetController(); | 592 ResetController(); |
593 } | 593 } |
594 | 594 |
595 } // namespace | 595 } // namespace |
596 } // namespace cc | 596 } // namespace cc |
OLD | NEW |