Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/layer_tree_test.h" | 5 #include "cc/test/layer_tree_test.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 347 test_hooks_->DidReceiveCompositorFrameAck(); | 347 test_hooks_->DidReceiveCompositorFrameAck(); |
| 348 } | 348 } |
| 349 | 349 |
| 350 void DidSubmitCompositorFrame() override {} | 350 void DidSubmitCompositorFrame() override {} |
| 351 void DidLoseCompositorFrameSink() override {} | 351 void DidLoseCompositorFrameSink() override {} |
| 352 void RequestScheduleComposite() override { test_hooks_->ScheduleComposite(); } | 352 void RequestScheduleComposite() override { test_hooks_->ScheduleComposite(); } |
| 353 void DidCompletePageScaleAnimation() override {} | 353 void DidCompletePageScaleAnimation() override {} |
| 354 void BeginMainFrameNotExpectedSoon() override { | 354 void BeginMainFrameNotExpectedSoon() override { |
| 355 test_hooks_->BeginMainFrameNotExpectedSoon(); | 355 test_hooks_->BeginMainFrameNotExpectedSoon(); |
| 356 } | 356 } |
| 357 void DoShortIdleWork(const BeginFrameArgs& args) override { | |
| 358 // TODO(delphick): do something here? | |
|
Sami
2017/03/24 15:24:11
Unless we're testing something at this level this
Dan Elphick
2017/03/29 16:02:44
Yeah it was just a reminder to check if we needed
| |
| 359 } | |
| 357 | 360 |
| 358 private: | 361 private: |
| 359 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) | 362 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) |
| 360 : test_hooks_(test_hooks) {} | 363 : test_hooks_(test_hooks) {} |
| 361 | 364 |
| 362 TestHooks* test_hooks_; | 365 TestHooks* test_hooks_; |
| 363 }; | 366 }; |
| 364 | 367 |
| 365 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. | 368 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. |
| 366 class LayerTreeHostForTesting : public LayerTreeHost { | 369 class LayerTreeHostForTesting : public LayerTreeHost { |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 886 DCHECK(task_runner_provider()->IsMainThread() || | 889 DCHECK(task_runner_provider()->IsMainThread() || |
| 887 task_runner_provider()->IsMainThreadBlocked()); | 890 task_runner_provider()->IsMainThreadBlocked()); |
| 888 return layer_tree_host_.get(); | 891 return layer_tree_host_.get(); |
| 889 } | 892 } |
| 890 | 893 |
| 891 Proxy* LayerTreeTest::proxy() { | 894 Proxy* LayerTreeTest::proxy() { |
| 892 return layer_tree_host() ? layer_tree_host()->proxy() : NULL; | 895 return layer_tree_host() ? layer_tree_host()->proxy() : NULL; |
| 893 } | 896 } |
| 894 | 897 |
| 895 } // namespace cc | 898 } // namespace cc |
| OLD | NEW |