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

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

Issue 2822143003: Remove ForceReclaimResources (Closed)
Patch Set: Change to RunLoop. Created 3 years, 7 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
« no previous file with comments | « cc/test/layer_tree_pixel_test.cc ('k') | cc/test/test_compositor_frame_sink.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « cc/test/layer_tree_pixel_test.cc ('k') | cc/test/test_compositor_frame_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698