| 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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 ASSERT_TRUE(impl_thread_->Start()); | 620 ASSERT_TRUE(impl_thread_->Start()); |
| 621 } | 621 } |
| 622 | 622 |
| 623 main_task_runner_ = base::MessageLoopProxy::current(); | 623 main_task_runner_ = base::MessageLoopProxy::current(); |
| 624 | 624 |
| 625 delegating_renderer_ = delegating_renderer; | 625 delegating_renderer_ = delegating_renderer; |
| 626 | 626 |
| 627 // Spend less time waiting for BeginFrame because the output is | 627 // Spend less time waiting for BeginFrame because the output is |
| 628 // mocked out. | 628 // mocked out. |
| 629 settings_.refresh_rate = 200.0; | 629 settings_.refresh_rate = 200.0; |
| 630 if (impl_side_painting) { | 630 settings_.impl_side_painting = impl_side_painting; |
| 631 DCHECK(threaded) | |
| 632 << "Don't run single thread + impl side painting, it doesn't exist."; | |
| 633 settings_.impl_side_painting = true; | |
| 634 } | |
| 635 InitializeSettings(&settings_); | 631 InitializeSettings(&settings_); |
| 636 | 632 |
| 637 main_task_runner_->PostTask( | 633 main_task_runner_->PostTask( |
| 638 FROM_HERE, | 634 FROM_HERE, |
| 639 base::Bind(&LayerTreeTest::DoBeginTest, base::Unretained(this))); | 635 base::Bind(&LayerTreeTest::DoBeginTest, base::Unretained(this))); |
| 640 | 636 |
| 641 if (timeout_seconds_) { | 637 if (timeout_seconds_) { |
| 642 timeout_.Reset(base::Bind(&LayerTreeTest::Timeout, base::Unretained(this))); | 638 timeout_.Reset(base::Bind(&LayerTreeTest::Timeout, base::Unretained(this))); |
| 643 main_task_runner_->PostDelayedTask( | 639 main_task_runner_->PostDelayedTask( |
| 644 FROM_HERE, | 640 FROM_HERE, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 return -1; | 694 return -1; |
| 699 } | 695 } |
| 700 | 696 |
| 701 void LayerTreeTest::DestroyLayerTreeHost() { | 697 void LayerTreeTest::DestroyLayerTreeHost() { |
| 702 if (layer_tree_host_ && layer_tree_host_->root_layer()) | 698 if (layer_tree_host_ && layer_tree_host_->root_layer()) |
| 703 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); | 699 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); |
| 704 layer_tree_host_.reset(); | 700 layer_tree_host_.reset(); |
| 705 } | 701 } |
| 706 | 702 |
| 707 } // namespace cc | 703 } // namespace cc |
| OLD | NEW |