| 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 "cc/animation/animation.h" | 8 #include "cc/animation/animation.h" |
| 9 #include "cc/animation/animation_registrar.h" | 9 #include "cc/animation/animation_registrar.h" |
| 10 #include "cc/animation/layer_animation_controller.h" | 10 #include "cc/animation/layer_animation_controller.h" |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 test_hooks_->DidCommitAndDrawFrame(); | 366 test_hooks_->DidCommitAndDrawFrame(); |
| 367 } | 367 } |
| 368 | 368 |
| 369 void DidCompleteSwapBuffers() override { | 369 void DidCompleteSwapBuffers() override { |
| 370 test_hooks_->DidCompleteSwapBuffers(); | 370 test_hooks_->DidCompleteSwapBuffers(); |
| 371 } | 371 } |
| 372 | 372 |
| 373 void DidPostSwapBuffers() override {} | 373 void DidPostSwapBuffers() override {} |
| 374 void DidAbortSwapBuffers() override {} | 374 void DidAbortSwapBuffers() override {} |
| 375 void ScheduleComposite() override { test_hooks_->ScheduleComposite(); } | 375 void ScheduleComposite() override { test_hooks_->ScheduleComposite(); } |
| 376 void DidCompletePageScaleAnimation() override {} |
| 376 | 377 |
| 377 private: | 378 private: |
| 378 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) | 379 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) |
| 379 : test_hooks_(test_hooks) {} | 380 : test_hooks_(test_hooks) {} |
| 380 | 381 |
| 381 TestHooks* test_hooks_; | 382 TestHooks* test_hooks_; |
| 382 }; | 383 }; |
| 383 | 384 |
| 384 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. | 385 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. |
| 385 class LayerTreeHostForTesting : public LayerTreeHost { | 386 class LayerTreeHostForTesting : public LayerTreeHost { |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 return -1; | 793 return -1; |
| 793 } | 794 } |
| 794 | 795 |
| 795 void LayerTreeTest::DestroyLayerTreeHost() { | 796 void LayerTreeTest::DestroyLayerTreeHost() { |
| 796 if (layer_tree_host_ && layer_tree_host_->root_layer()) | 797 if (layer_tree_host_ && layer_tree_host_->root_layer()) |
| 797 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); | 798 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); |
| 798 layer_tree_host_ = nullptr; | 799 layer_tree_host_ = nullptr; |
| 799 } | 800 } |
| 800 | 801 |
| 801 } // namespace cc | 802 } // namespace cc |
| OLD | NEW |