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 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
847 layer_tree_host_->SetCompositorFrameSink(std::move(compositor_frame_sink)); | 847 layer_tree_host_->SetCompositorFrameSink(std::move(compositor_frame_sink)); |
848 } | 848 } |
849 | 849 |
850 std::unique_ptr<TestCompositorFrameSink> | 850 std::unique_ptr<TestCompositorFrameSink> |
851 LayerTreeTest::CreateCompositorFrameSink( | 851 LayerTreeTest::CreateCompositorFrameSink( |
852 scoped_refptr<ContextProvider> compositor_context_provider, | 852 scoped_refptr<ContextProvider> compositor_context_provider, |
853 scoped_refptr<ContextProvider> worker_context_provider) { | 853 scoped_refptr<ContextProvider> worker_context_provider) { |
854 bool synchronous_composite = | 854 bool synchronous_composite = |
855 !HasImplThread() && | 855 !HasImplThread() && |
856 !layer_tree_host()->GetSettings().single_thread_proxy_scheduler; | 856 !layer_tree_host()->GetSettings().single_thread_proxy_scheduler; |
857 // Disable reclaim resources by default to act like the Display lives | |
858 // out-of-process. | |
859 bool force_disable_reclaim_resources = true; | |
860 return base::MakeUnique<TestCompositorFrameSink>( | 857 return base::MakeUnique<TestCompositorFrameSink>( |
861 compositor_context_provider, std::move(worker_context_provider), | 858 compositor_context_provider, std::move(worker_context_provider), |
862 shared_bitmap_manager(), gpu_memory_buffer_manager(), | 859 shared_bitmap_manager(), gpu_memory_buffer_manager(), |
863 layer_tree_host()->GetSettings().renderer_settings, impl_task_runner_, | 860 layer_tree_host()->GetSettings().renderer_settings, impl_task_runner_, |
864 synchronous_composite, force_disable_reclaim_resources); | 861 synchronous_composite); |
865 } | 862 } |
866 | 863 |
867 std::unique_ptr<OutputSurface> | 864 std::unique_ptr<OutputSurface> |
868 LayerTreeTest::CreateDisplayOutputSurfaceOnThread( | 865 LayerTreeTest::CreateDisplayOutputSurfaceOnThread( |
869 scoped_refptr<ContextProvider> compositor_context_provider) { | 866 scoped_refptr<ContextProvider> compositor_context_provider) { |
870 // By default the Display shares a context with the LayerTreeHostImpl. | 867 // By default the Display shares a context with the LayerTreeHostImpl. |
871 return FakeOutputSurface::Create3d(std::move(compositor_context_provider)); | 868 return FakeOutputSurface::Create3d(std::move(compositor_context_provider)); |
872 } | 869 } |
873 | 870 |
874 void LayerTreeTest::DestroyLayerTreeHost() { | 871 void LayerTreeTest::DestroyLayerTreeHost() { |
(...skipping 16 matching lines...) Expand all Loading... |
891 DCHECK(task_runner_provider()->IsMainThread() || | 888 DCHECK(task_runner_provider()->IsMainThread() || |
892 task_runner_provider()->IsMainThreadBlocked()); | 889 task_runner_provider()->IsMainThreadBlocked()); |
893 return layer_tree_host_.get(); | 890 return layer_tree_host_.get(); |
894 } | 891 } |
895 | 892 |
896 Proxy* LayerTreeTest::proxy() { | 893 Proxy* LayerTreeTest::proxy() { |
897 return layer_tree_host() ? layer_tree_host()->proxy() : NULL; | 894 return layer_tree_host() ? layer_tree_host()->proxy() : NULL; |
898 } | 895 } |
899 | 896 |
900 } // namespace cc | 897 } // namespace cc |
OLD | NEW |