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/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
923 LayerTreeHost* host = IsRemoteTest() ? remote_client_layer_tree_host_.get() | 923 LayerTreeHost* host = IsRemoteTest() ? remote_client_layer_tree_host_.get() |
924 : layer_tree_host_.get(); | 924 : layer_tree_host_.get(); |
925 | 925 |
926 // If this fails, the test has ended and there is no task runners to find | 926 // If this fails, the test has ended and there is no task runners to find |
927 // anymore. | 927 // anymore. |
928 DCHECK(host); | 928 DCHECK(host); |
929 | 929 |
930 return host->task_runner_provider(); | 930 return host->task_runner_provider(); |
931 } | 931 } |
932 | 932 |
| 933 LayerTree* LayerTreeTest::layer_tree() { |
| 934 return layer_tree_host()->GetLayerTree(); |
| 935 } |
| 936 |
933 LayerTreeHost* LayerTreeTest::layer_tree_host() { | 937 LayerTreeHost* LayerTreeTest::layer_tree_host() { |
934 DCHECK(task_runner_provider()->IsMainThread() || | 938 DCHECK(task_runner_provider()->IsMainThread() || |
935 task_runner_provider()->IsMainThreadBlocked()); | 939 task_runner_provider()->IsMainThreadBlocked()); |
936 return layer_tree_host_.get(); | 940 return layer_tree_host_.get(); |
937 } | 941 } |
938 | 942 |
939 LayerTreeHost* LayerTreeTest::remote_client_layer_tree_host() { | 943 LayerTreeHost* LayerTreeTest::remote_client_layer_tree_host() { |
940 DCHECK(IsRemoteTest()); | 944 DCHECK(IsRemoteTest()); |
941 DCHECK(task_runner_provider()->IsMainThread() || | 945 DCHECK(task_runner_provider()->IsMainThread() || |
942 task_runner_provider()->IsMainThreadBlocked()); | 946 task_runner_provider()->IsMainThreadBlocked()); |
943 return remote_client_layer_tree_host_.get(); | 947 return remote_client_layer_tree_host_.get(); |
944 } | 948 } |
945 | 949 |
946 } // namespace cc | 950 } // namespace cc |
OLD | NEW |