Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: cc/test/layer_tree_test.cc

Issue 2609253003: Remove ForceReclaimResources (Closed)
Patch Set: cleanup Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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;
882 return base::MakeUnique<TestCompositorFrameSink>( 879 return base::MakeUnique<TestCompositorFrameSink>(
883 compositor_context_provider, std::move(worker_context_provider), 880 compositor_context_provider, std::move(worker_context_provider),
884 shared_bitmap_manager(), gpu_memory_buffer_manager(), 881 shared_bitmap_manager(), gpu_memory_buffer_manager(),
885 layer_tree_host()->GetSettings().renderer_settings, impl_task_runner_, 882 layer_tree_host()->GetSettings().renderer_settings, impl_task_runner_,
886 synchronous_composite, force_disable_reclaim_resources); 883 synchronous_composite);
887 } 884 }
888 885
889 std::unique_ptr<OutputSurface> 886 std::unique_ptr<OutputSurface>
890 LayerTreeTest::CreateDisplayOutputSurfaceOnThread( 887 LayerTreeTest::CreateDisplayOutputSurfaceOnThread(
891 scoped_refptr<ContextProvider> compositor_context_provider) { 888 scoped_refptr<ContextProvider> compositor_context_provider) {
892 // By default the Display shares a context with the LayerTreeHostImpl. 889 // By default the Display shares a context with the LayerTreeHostImpl.
893 return FakeOutputSurface::Create3d(std::move(compositor_context_provider)); 890 return FakeOutputSurface::Create3d(std::move(compositor_context_provider));
894 } 891 }
895 892
896 void LayerTreeTest::DestroyLayerTreeHost() { 893 void LayerTreeTest::DestroyLayerTreeHost() {
(...skipping 25 matching lines...) Expand all
922 DCHECK(!IsRemoteTest()); 919 DCHECK(!IsRemoteTest());
923 return layer_tree_host_in_process_; 920 return layer_tree_host_in_process_;
924 } 921 }
925 922
926 Proxy* LayerTreeTest::proxy() { 923 Proxy* LayerTreeTest::proxy() {
927 return layer_tree_host_in_process() ? layer_tree_host_in_process()->proxy() 924 return layer_tree_host_in_process() ? layer_tree_host_in_process()->proxy()
928 : NULL; 925 : NULL;
929 } 926 }
930 927
931 } // namespace cc 928 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698