| 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 DCHECK(!external_begin_frame_source); | 384 DCHECK(!external_begin_frame_source); |
| 385 // The Remote LayerTreeHost on the client has the impl task runner. | 385 // The Remote LayerTreeHost on the client has the impl task runner. |
| 386 if (task_runner_provider->HasImplThread()) { | 386 if (task_runner_provider->HasImplThread()) { |
| 387 proxy = base::MakeUnique<RemoteChannelImpl>( | 387 proxy = base::MakeUnique<RemoteChannelImpl>( |
| 388 layer_tree_host.get(), remote_proto_channel, | 388 layer_tree_host.get(), remote_proto_channel, |
| 389 task_runner_provider.get()); | 389 task_runner_provider.get()); |
| 390 } else { | 390 } else { |
| 391 proxy = ProxyMain::CreateRemote(remote_proto_channel, | 391 proxy = ProxyMain::CreateRemote(remote_proto_channel, |
| 392 layer_tree_host.get(), | 392 layer_tree_host.get(), |
| 393 task_runner_provider.get()); | 393 task_runner_provider.get()); |
| 394 | |
| 395 // The LayerTreeHost on the server will never have an output surface. | |
| 396 // Set output_surface_lost_ to false by default. | |
| 397 layer_tree_host->SetOutputSurfaceLostForTesting(false); | |
| 398 } | 394 } |
| 399 break; | 395 break; |
| 400 } | 396 } |
| 401 layer_tree_host->InitializeForTesting( | 397 layer_tree_host->InitializeForTesting( |
| 402 std::move(task_runner_provider), std::move(proxy), | 398 std::move(task_runner_provider), std::move(proxy), |
| 403 std::move(external_begin_frame_source)); | 399 std::move(external_begin_frame_source)); |
| 404 return layer_tree_host; | 400 return layer_tree_host; |
| 405 } | 401 } |
| 406 | 402 |
| 407 std::unique_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( | 403 std::unique_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 } | 940 } |
| 945 | 941 |
| 946 LayerTreeHost* LayerTreeTest::remote_client_layer_tree_host() { | 942 LayerTreeHost* LayerTreeTest::remote_client_layer_tree_host() { |
| 947 DCHECK(IsRemoteTest()); | 943 DCHECK(IsRemoteTest()); |
| 948 DCHECK(task_runner_provider()->IsMainThread() || | 944 DCHECK(task_runner_provider()->IsMainThread() || |
| 949 task_runner_provider()->IsMainThreadBlocked()); | 945 task_runner_provider()->IsMainThreadBlocked()); |
| 950 return remote_client_layer_tree_host_.get(); | 946 return remote_client_layer_tree_host_.get(); |
| 951 } | 947 } |
| 952 | 948 |
| 953 } // namespace cc | 949 } // namespace cc |
| OLD | NEW |