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

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

Issue 2402173002: cc: Get rid of PostSwapBuffersComplete. (Closed)
Patch Set: postswap: fix-blimp-unittest-post-swap-acks Created 4 years, 2 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/fake_output_surface.cc ('k') | cc/test/pixel_test_output_surface.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 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 bool synchronous_composite = 798 bool synchronous_composite =
799 !HasImplThread() && 799 !HasImplThread() &&
800 !layer_tree_host()->GetSettings().single_thread_proxy_scheduler; 800 !layer_tree_host()->GetSettings().single_thread_proxy_scheduler;
801 // Disable reclaim resources by default to act like the Display lives 801 // Disable reclaim resources by default to act like the Display lives
802 // out-of-process. 802 // out-of-process.
803 bool force_disable_reclaim_resources = true; 803 bool force_disable_reclaim_resources = true;
804 return base::MakeUnique<TestCompositorFrameSink>( 804 return base::MakeUnique<TestCompositorFrameSink>(
805 compositor_context_provider, std::move(worker_context_provider), 805 compositor_context_provider, std::move(worker_context_provider),
806 CreateDisplayOutputSurface(compositor_context_provider), 806 CreateDisplayOutputSurface(compositor_context_provider),
807 shared_bitmap_manager(), gpu_memory_buffer_manager(), 807 shared_bitmap_manager(), gpu_memory_buffer_manager(),
808 layer_tree_host()->GetSettings().renderer_settings, 808 layer_tree_host()->GetSettings().renderer_settings, impl_task_runner_,
809 ImplThreadTaskRunner(), synchronous_composite, 809 synchronous_composite, force_disable_reclaim_resources);
810 force_disable_reclaim_resources);
811 } 810 }
812 811
813 std::unique_ptr<OutputSurface> LayerTreeTest::CreateDisplayOutputSurface( 812 std::unique_ptr<OutputSurface> LayerTreeTest::CreateDisplayOutputSurface(
814 scoped_refptr<ContextProvider> compositor_context_provider) { 813 scoped_refptr<ContextProvider> compositor_context_provider) {
815 // By default the Display shares a context with the LayerTreeHostImpl. 814 // By default the Display shares a context with the LayerTreeHostImpl.
816 return FakeOutputSurface::Create3d(std::move(compositor_context_provider)); 815 return FakeOutputSurface::Create3d(std::move(compositor_context_provider));
817 } 816 }
818 817
819 void LayerTreeTest::DestroyLayerTreeHost() { 818 void LayerTreeTest::DestroyLayerTreeHost() {
820 if (layer_tree_host_ && layer_tree_host_->GetLayerTree()->root_layer()) 819 if (layer_tree_host_ && layer_tree_host_->GetLayerTree()->root_layer())
(...skipping 17 matching lines...) Expand all
838 return layer_tree_host_.get(); 837 return layer_tree_host_.get();
839 } 838 }
840 839
841 LayerTreeHostInProcess* LayerTreeTest::layer_tree_host_in_process() { 840 LayerTreeHostInProcess* LayerTreeTest::layer_tree_host_in_process() {
842 DCHECK(task_runner_provider()->IsMainThread() || 841 DCHECK(task_runner_provider()->IsMainThread() ||
843 task_runner_provider()->IsMainThreadBlocked()); 842 task_runner_provider()->IsMainThreadBlocked());
844 DCHECK(!IsRemoteTest()); 843 DCHECK(!IsRemoteTest());
845 return layer_tree_host_.get(); 844 return layer_tree_host_.get();
846 } 845 }
847 } // namespace cc 846 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_output_surface.cc ('k') | cc/test/pixel_test_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698