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