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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 scheduled_(false), | 483 scheduled_(false), |
484 started_(false), | 484 started_(false), |
485 ended_(false), | 485 ended_(false), |
486 delegating_renderer_(false), | 486 delegating_renderer_(false), |
487 timeout_seconds_(0), | 487 timeout_seconds_(0), |
488 weak_factory_(this) { | 488 weak_factory_(this) { |
489 main_thread_weak_ptr_ = weak_factory_.GetWeakPtr(); | 489 main_thread_weak_ptr_ = weak_factory_.GetWeakPtr(); |
490 | 490 |
491 // Tests should timeout quickly unless --cc-layer-tree-test-no-timeout was | 491 // Tests should timeout quickly unless --cc-layer-tree-test-no-timeout was |
492 // specified (for running in a debugger). | 492 // specified (for running in a debugger). |
493 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 493 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
494 if (!command_line->HasSwitch(switches::kCCLayerTreeTestNoTimeout)) | 494 if (!command_line->HasSwitch(switches::kCCLayerTreeTestNoTimeout)) |
495 timeout_seconds_ = 5; | 495 timeout_seconds_ = 5; |
496 } | 496 } |
497 | 497 |
498 LayerTreeTest::~LayerTreeTest() {} | 498 LayerTreeTest::~LayerTreeTest() {} |
499 | 499 |
500 void LayerTreeTest::EndTest() { | 500 void LayerTreeTest::EndTest() { |
501 if (ended_) | 501 if (ended_) |
502 return; | 502 return; |
503 ended_ = true; | 503 ended_ = true; |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 return -1; | 822 return -1; |
823 } | 823 } |
824 | 824 |
825 void LayerTreeTest::DestroyLayerTreeHost() { | 825 void LayerTreeTest::DestroyLayerTreeHost() { |
826 if (layer_tree_host_ && layer_tree_host_->root_layer()) | 826 if (layer_tree_host_ && layer_tree_host_->root_layer()) |
827 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); | 827 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); |
828 layer_tree_host_ = nullptr; | 828 layer_tree_host_ = nullptr; |
829 } | 829 } |
830 | 830 |
831 } // namespace cc | 831 } // namespace cc |
OLD | NEW |