| 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 test_hooks_->DidCommitAndDrawFrame(); | 402 test_hooks_->DidCommitAndDrawFrame(); |
| 403 } | 403 } |
| 404 | 404 |
| 405 void DidCompleteSwapBuffers() override { | 405 void DidCompleteSwapBuffers() override { |
| 406 test_hooks_->DidCompleteSwapBuffers(); | 406 test_hooks_->DidCompleteSwapBuffers(); |
| 407 } | 407 } |
| 408 | 408 |
| 409 void DidPostSwapBuffers() override {} | 409 void DidPostSwapBuffers() override {} |
| 410 void DidAbortSwapBuffers() override {} | 410 void DidAbortSwapBuffers() override {} |
| 411 void ScheduleComposite() override { test_hooks_->ScheduleComposite(); } | 411 void ScheduleComposite() override { test_hooks_->ScheduleComposite(); } |
| 412 void DidCompletePageScaleAnimation() override {} |
| 412 | 413 |
| 413 private: | 414 private: |
| 414 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) | 415 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) |
| 415 : test_hooks_(test_hooks) {} | 416 : test_hooks_(test_hooks) {} |
| 416 | 417 |
| 417 TestHooks* test_hooks_; | 418 TestHooks* test_hooks_; |
| 418 }; | 419 }; |
| 419 | 420 |
| 420 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. | 421 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. |
| 421 class LayerTreeHostForTesting : public LayerTreeHost { | 422 class LayerTreeHostForTesting : public LayerTreeHost { |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 return -1; | 827 return -1; |
| 827 } | 828 } |
| 828 | 829 |
| 829 void LayerTreeTest::DestroyLayerTreeHost() { | 830 void LayerTreeTest::DestroyLayerTreeHost() { |
| 830 if (layer_tree_host_ && layer_tree_host_->root_layer()) | 831 if (layer_tree_host_ && layer_tree_host_->root_layer()) |
| 831 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); | 832 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); |
| 832 layer_tree_host_ = nullptr; | 833 layer_tree_host_ = nullptr; |
| 833 } | 834 } |
| 834 | 835 |
| 835 } // namespace cc | 836 } // namespace cc |
| OLD | NEW |