| 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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 main_task_runner_->PostDelayedTask( | 517 main_task_runner_->PostDelayedTask( |
| 518 FROM_HERE, | 518 FROM_HERE, |
| 519 base::Bind(&LayerTreeTest::EndTest, main_thread_weak_ptr_), | 519 base::Bind(&LayerTreeTest::EndTest, main_thread_weak_ptr_), |
| 520 base::TimeDelta::FromMilliseconds(delay_milliseconds)); | 520 base::TimeDelta::FromMilliseconds(delay_milliseconds)); |
| 521 } | 521 } |
| 522 | 522 |
| 523 void LayerTreeTest::PostAddAnimationToMainThread( | 523 void LayerTreeTest::PostAddAnimationToMainThread( |
| 524 Layer* layer_to_receive_animation) { | 524 Layer* layer_to_receive_animation) { |
| 525 main_task_runner_->PostTask( | 525 main_task_runner_->PostTask( |
| 526 FROM_HERE, | 526 FROM_HERE, |
| 527 base::Bind(&LayerTreeTest::DispatchAddAnimation, | 527 base::Bind(&LayerTreeTest::DispatchAddAnimation, main_thread_weak_ptr_, |
| 528 main_thread_weak_ptr_, | 528 base::Unretained(layer_to_receive_animation), 0.000004)); |
| 529 base::Unretained(layer_to_receive_animation), | |
| 530 0.000001)); | |
| 531 } | 529 } |
| 532 | 530 |
| 533 void LayerTreeTest::PostAddInstantAnimationToMainThread( | 531 void LayerTreeTest::PostAddInstantAnimationToMainThread( |
| 534 Layer* layer_to_receive_animation) { | 532 Layer* layer_to_receive_animation) { |
| 535 main_task_runner_->PostTask( | 533 main_task_runner_->PostTask( |
| 536 FROM_HERE, | 534 FROM_HERE, |
| 537 base::Bind(&LayerTreeTest::DispatchAddAnimation, | 535 base::Bind(&LayerTreeTest::DispatchAddAnimation, |
| 538 main_thread_weak_ptr_, | 536 main_thread_weak_ptr_, |
| 539 base::Unretained(layer_to_receive_animation), | 537 base::Unretained(layer_to_receive_animation), |
| 540 0.0)); | 538 0.0)); |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 return -1; | 820 return -1; |
| 823 } | 821 } |
| 824 | 822 |
| 825 void LayerTreeTest::DestroyLayerTreeHost() { | 823 void LayerTreeTest::DestroyLayerTreeHost() { |
| 826 if (layer_tree_host_ && layer_tree_host_->root_layer()) | 824 if (layer_tree_host_ && layer_tree_host_->root_layer()) |
| 827 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); | 825 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); |
| 828 layer_tree_host_ = nullptr; | 826 layer_tree_host_ = nullptr; |
| 829 } | 827 } |
| 830 | 828 |
| 831 } // namespace cc | 829 } // namespace cc |
| OLD | NEW |