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