| 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 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 layer_tree_host_->SetCompositorFrameSink(std::move(compositor_frame_sink)); | 869 layer_tree_host_->SetCompositorFrameSink(std::move(compositor_frame_sink)); |
| 870 } | 870 } |
| 871 | 871 |
| 872 std::unique_ptr<TestCompositorFrameSink> | 872 std::unique_ptr<TestCompositorFrameSink> |
| 873 LayerTreeTest::CreateCompositorFrameSink( | 873 LayerTreeTest::CreateCompositorFrameSink( |
| 874 scoped_refptr<ContextProvider> compositor_context_provider, | 874 scoped_refptr<ContextProvider> compositor_context_provider, |
| 875 scoped_refptr<ContextProvider> worker_context_provider) { | 875 scoped_refptr<ContextProvider> worker_context_provider) { |
| 876 bool synchronous_composite = | 876 bool synchronous_composite = |
| 877 !HasImplThread() && | 877 !HasImplThread() && |
| 878 !layer_tree_host()->GetSettings().single_thread_proxy_scheduler; | 878 !layer_tree_host()->GetSettings().single_thread_proxy_scheduler; |
| 879 // Disable reclaim resources by default to act like the Display lives |
| 880 // out-of-process. |
| 881 bool force_disable_reclaim_resources = true; |
| 879 return base::MakeUnique<TestCompositorFrameSink>( | 882 return base::MakeUnique<TestCompositorFrameSink>( |
| 880 compositor_context_provider, std::move(worker_context_provider), | 883 compositor_context_provider, std::move(worker_context_provider), |
| 881 shared_bitmap_manager(), gpu_memory_buffer_manager(), | 884 shared_bitmap_manager(), gpu_memory_buffer_manager(), |
| 882 layer_tree_host()->GetSettings().renderer_settings, impl_task_runner_, | 885 layer_tree_host()->GetSettings().renderer_settings, impl_task_runner_, |
| 883 synchronous_composite); | 886 synchronous_composite, force_disable_reclaim_resources); |
| 884 } | 887 } |
| 885 | 888 |
| 886 std::unique_ptr<OutputSurface> | 889 std::unique_ptr<OutputSurface> |
| 887 LayerTreeTest::CreateDisplayOutputSurfaceOnThread( | 890 LayerTreeTest::CreateDisplayOutputSurfaceOnThread( |
| 888 scoped_refptr<ContextProvider> compositor_context_provider) { | 891 scoped_refptr<ContextProvider> compositor_context_provider) { |
| 889 // By default the Display shares a context with the LayerTreeHostImpl. | 892 // By default the Display shares a context with the LayerTreeHostImpl. |
| 890 return FakeOutputSurface::Create3d(std::move(compositor_context_provider)); | 893 return FakeOutputSurface::Create3d(std::move(compositor_context_provider)); |
| 891 } | 894 } |
| 892 | 895 |
| 893 void LayerTreeTest::DestroyLayerTreeHost() { | 896 void LayerTreeTest::DestroyLayerTreeHost() { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 919 DCHECK(!IsRemoteTest()); | 922 DCHECK(!IsRemoteTest()); |
| 920 return layer_tree_host_in_process_; | 923 return layer_tree_host_in_process_; |
| 921 } | 924 } |
| 922 | 925 |
| 923 Proxy* LayerTreeTest::proxy() { | 926 Proxy* LayerTreeTest::proxy() { |
| 924 return layer_tree_host_in_process() ? layer_tree_host_in_process()->proxy() | 927 return layer_tree_host_in_process() ? layer_tree_host_in_process()->proxy() |
| 925 : NULL; | 928 : NULL; |
| 926 } | 929 } |
| 927 | 930 |
| 928 } // namespace cc | 931 } // namespace cc |
| OLD | NEW |