| 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 "cc/animation/animation.h" | 7 #include "cc/animation/animation.h" |
| 8 #include "cc/animation/animation_registrar.h" | 8 #include "cc/animation/animation_registrar.h" |
| 9 #include "cc/animation/layer_animation_controller.h" | 9 #include "cc/animation/layer_animation_controller.h" |
| 10 #include "cc/animation/timing_function.h" | 10 #include "cc/animation/timing_function.h" |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 return; | 438 return; |
| 439 } | 439 } |
| 440 | 440 |
| 441 MessageLoop::current()->Quit(); | 441 MessageLoop::current()->Quit(); |
| 442 } | 442 } |
| 443 | 443 |
| 444 void LayerTreeTest::DispatchAddInstantAnimation() { | 444 void LayerTreeTest::DispatchAddInstantAnimation() { |
| 445 DCHECK(!proxy() || proxy()->IsMainThread()); | 445 DCHECK(!proxy() || proxy()->IsMainThread()); |
| 446 | 446 |
| 447 if (layer_tree_host_.get() && layer_tree_host_->root_layer()) { | 447 if (layer_tree_host_.get() && layer_tree_host_->root_layer()) { |
| 448 addOpacityTransitionToLayer(*layer_tree_host_->root_layer(), | 448 AddOpacityTransitionToLayer(layer_tree_host_->root_layer(), |
| 449 0, | 449 0, |
| 450 0, | 450 0, |
| 451 0.5, | 451 0.5, |
| 452 false); | 452 false); |
| 453 } | 453 } |
| 454 } | 454 } |
| 455 | 455 |
| 456 void LayerTreeTest::DispatchAddAnimation(Layer* layer_to_receive_animation) { | 456 void LayerTreeTest::DispatchAddAnimation(Layer* layer_to_receive_animation) { |
| 457 DCHECK(!proxy() || proxy()->IsMainThread()); | 457 DCHECK(!proxy() || proxy()->IsMainThread()); |
| 458 | 458 |
| 459 if (layer_to_receive_animation) | 459 if (layer_to_receive_animation) |
| 460 addOpacityTransitionToLayer(*layer_to_receive_animation, 10, 0, 0.5, true); | 460 AddOpacityTransitionToLayer(layer_to_receive_animation, 10, 0, 0.5, true); |
| 461 } | 461 } |
| 462 | 462 |
| 463 void LayerTreeTest::DispatchSetNeedsCommit() { | 463 void LayerTreeTest::DispatchSetNeedsCommit() { |
| 464 DCHECK(!proxy() || proxy()->IsMainThread()); | 464 DCHECK(!proxy() || proxy()->IsMainThread()); |
| 465 | 465 |
| 466 if (layer_tree_host_) | 466 if (layer_tree_host_) |
| 467 layer_tree_host_->SetNeedsCommit(); | 467 layer_tree_host_->SetNeedsCommit(); |
| 468 } | 468 } |
| 469 | 469 |
| 470 void LayerTreeTest::DispatchAcquireLayerTextures() { | 470 void LayerTreeTest::DispatchAcquireLayerTextures() { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 ASSERT_FALSE(layer_tree_host_.get()); | 537 ASSERT_FALSE(layer_tree_host_.get()); |
| 538 client_.reset(); | 538 client_.reset(); |
| 539 if (timed_out_) { | 539 if (timed_out_) { |
| 540 FAIL() << "Test timed out"; | 540 FAIL() << "Test timed out"; |
| 541 return; | 541 return; |
| 542 } | 542 } |
| 543 AfterTest(); | 543 AfterTest(); |
| 544 } | 544 } |
| 545 | 545 |
| 546 } // namespace cc | 546 } // namespace cc |
| OLD | NEW |