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 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 layer_tree_host_->SetCompositorFrameSink(std::move(compositor_frame_sink)); | 855 layer_tree_host_->SetCompositorFrameSink(std::move(compositor_frame_sink)); |
856 } | 856 } |
857 | 857 |
858 std::unique_ptr<TestCompositorFrameSink> | 858 std::unique_ptr<TestCompositorFrameSink> |
859 LayerTreeTest::CreateCompositorFrameSink( | 859 LayerTreeTest::CreateCompositorFrameSink( |
860 scoped_refptr<ContextProvider> compositor_context_provider, | 860 scoped_refptr<ContextProvider> compositor_context_provider, |
861 scoped_refptr<ContextProvider> worker_context_provider) { | 861 scoped_refptr<ContextProvider> worker_context_provider) { |
862 bool synchronous_composite = | 862 bool synchronous_composite = |
863 !HasImplThread() && | 863 !HasImplThread() && |
864 !layer_tree_host()->GetSettings().single_thread_proxy_scheduler; | 864 !layer_tree_host()->GetSettings().single_thread_proxy_scheduler; |
865 // Disable reclaim resources by default to act like the Display lives | |
866 // out-of-process. | |
867 bool force_disable_reclaim_resources = true; | |
868 return base::MakeUnique<TestCompositorFrameSink>( | 865 return base::MakeUnique<TestCompositorFrameSink>( |
869 compositor_context_provider, std::move(worker_context_provider), | 866 compositor_context_provider, std::move(worker_context_provider), |
870 shared_bitmap_manager(), gpu_memory_buffer_manager(), | 867 shared_bitmap_manager(), gpu_memory_buffer_manager(), |
871 layer_tree_host()->GetSettings().renderer_settings, impl_task_runner_, | 868 layer_tree_host()->GetSettings().renderer_settings, impl_task_runner_, |
872 synchronous_composite, force_disable_reclaim_resources); | 869 synchronous_composite); |
873 } | 870 } |
874 | 871 |
875 std::unique_ptr<OutputSurface> | 872 std::unique_ptr<OutputSurface> |
876 LayerTreeTest::CreateDisplayOutputSurfaceOnThread( | 873 LayerTreeTest::CreateDisplayOutputSurfaceOnThread( |
877 scoped_refptr<ContextProvider> compositor_context_provider) { | 874 scoped_refptr<ContextProvider> compositor_context_provider) { |
878 // By default the Display shares a context with the LayerTreeHostImpl. | 875 // By default the Display shares a context with the LayerTreeHostImpl. |
879 return FakeOutputSurface::Create3d(std::move(compositor_context_provider)); | 876 return FakeOutputSurface::Create3d(std::move(compositor_context_provider)); |
880 } | 877 } |
881 | 878 |
882 void LayerTreeTest::DestroyLayerTreeHost() { | 879 void LayerTreeTest::DestroyLayerTreeHost() { |
(...skipping 16 matching lines...) Expand all Loading... |
899 DCHECK(task_runner_provider()->IsMainThread() || | 896 DCHECK(task_runner_provider()->IsMainThread() || |
900 task_runner_provider()->IsMainThreadBlocked()); | 897 task_runner_provider()->IsMainThreadBlocked()); |
901 return layer_tree_host_.get(); | 898 return layer_tree_host_.get(); |
902 } | 899 } |
903 | 900 |
904 Proxy* LayerTreeTest::proxy() { | 901 Proxy* LayerTreeTest::proxy() { |
905 return layer_tree_host() ? layer_tree_host()->proxy() : NULL; | 902 return layer_tree_host() ? layer_tree_host()->proxy() : NULL; |
906 } | 903 } |
907 | 904 |
908 } // namespace cc | 905 } // namespace cc |
OLD | NEW |