| 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 "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 LayerTreeTest::LayerTreeTest() | 525 LayerTreeTest::LayerTreeTest() |
| 526 : output_surface_(nullptr), | 526 : output_surface_(nullptr), |
| 527 external_begin_frame_source_(nullptr), | 527 external_begin_frame_source_(nullptr), |
| 528 beginning_(false), | 528 beginning_(false), |
| 529 end_when_begin_returns_(false), | 529 end_when_begin_returns_(false), |
| 530 timed_out_(false), | 530 timed_out_(false), |
| 531 scheduled_(false), | 531 scheduled_(false), |
| 532 started_(false), | 532 started_(false), |
| 533 ended_(false), | 533 ended_(false), |
| 534 delegating_renderer_(false), | 534 delegating_renderer_(false), |
| 535 verify_property_trees_(true), | 535 verify_property_trees_(false), |
| 536 timeout_seconds_(0), | 536 timeout_seconds_(0), |
| 537 weak_factory_(this) { | 537 weak_factory_(this) { |
| 538 main_thread_weak_ptr_ = weak_factory_.GetWeakPtr(); | 538 main_thread_weak_ptr_ = weak_factory_.GetWeakPtr(); |
| 539 | 539 |
| 540 // Tests should timeout quickly unless --cc-layer-tree-test-no-timeout was | 540 // Tests should timeout quickly unless --cc-layer-tree-test-no-timeout was |
| 541 // specified (for running in a debugger). | 541 // specified (for running in a debugger). |
| 542 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 542 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 543 if (!command_line->HasSwitch(switches::kCCLayerTreeTestNoTimeout)) | 543 if (!command_line->HasSwitch(switches::kCCLayerTreeTestNoTimeout)) |
| 544 timeout_seconds_ = 5; | 544 timeout_seconds_ = 5; |
| 545 } | 545 } |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 LayerTreeHost* LayerTreeTest::layer_tree_host() { | 891 LayerTreeHost* LayerTreeTest::layer_tree_host() { |
| 892 // We check for a null proxy here as we sometimes ask for the layer tree host | 892 // We check for a null proxy here as we sometimes ask for the layer tree host |
| 893 // when the proxy does not exist, often for checking settings after a test has | 893 // when the proxy does not exist, often for checking settings after a test has |
| 894 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See | 894 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See |
| 895 // elsewhere in this file for other examples. | 895 // elsewhere in this file for other examples. |
| 896 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked()); | 896 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked()); |
| 897 return layer_tree_host_.get(); | 897 return layer_tree_host_.get(); |
| 898 } | 898 } |
| 899 | 899 |
| 900 } // namespace cc | 900 } // namespace cc |
| OLD | NEW |