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

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

Issue 2258833002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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/test_gpu_memory_buffer_manager.cc ('k') | cc/test/test_shared_bitmap_manager.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/test_layer_tree_host_base.h" 5 #include "cc/test/test_layer_tree_host_base.h"
6 6
7 #include "cc/test/fake_output_surface.h" 7 #include "cc/test/fake_output_surface.h"
8 #include "cc/test/fake_raster_source.h" 8 #include "cc/test/fake_raster_source.h"
9 #include "cc/trees/layer_tree_impl.h" 9 #include "cc/trees/layer_tree_impl.h"
10 10
(...skipping 29 matching lines...) Expand all
40 std::unique_ptr<OutputSurface> TestLayerTreeHostBase::CreateOutputSurface() { 40 std::unique_ptr<OutputSurface> TestLayerTreeHostBase::CreateOutputSurface() {
41 return FakeOutputSurface::CreateDelegating3d(); 41 return FakeOutputSurface::CreateDelegating3d();
42 } 42 }
43 43
44 std::unique_ptr<FakeLayerTreeHostImpl> TestLayerTreeHostBase::CreateHostImpl( 44 std::unique_ptr<FakeLayerTreeHostImpl> TestLayerTreeHostBase::CreateHostImpl(
45 const LayerTreeSettings& settings, 45 const LayerTreeSettings& settings,
46 TaskRunnerProvider* task_runner_provider, 46 TaskRunnerProvider* task_runner_provider,
47 SharedBitmapManager* shared_bitmap_manager, 47 SharedBitmapManager* shared_bitmap_manager,
48 TaskGraphRunner* task_graph_runner, 48 TaskGraphRunner* task_graph_runner,
49 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) { 49 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) {
50 return base::WrapUnique(new FakeLayerTreeHostImpl( 50 return base::MakeUnique<FakeLayerTreeHostImpl>(
51 settings, task_runner_provider, shared_bitmap_manager, task_graph_runner, 51 settings, task_runner_provider, shared_bitmap_manager, task_graph_runner,
52 gpu_memory_buffer_manager)); 52 gpu_memory_buffer_manager);
53 } 53 }
54 54
55 std::unique_ptr<TaskGraphRunner> 55 std::unique_ptr<TaskGraphRunner>
56 TestLayerTreeHostBase::CreateTaskGraphRunner() { 56 TestLayerTreeHostBase::CreateTaskGraphRunner() {
57 return base::WrapUnique(new TestTaskGraphRunner); 57 return base::WrapUnique(new TestTaskGraphRunner);
58 } 58 }
59 59
60 void TestLayerTreeHostBase::InitializeRenderer() { 60 void TestLayerTreeHostBase::InitializeRenderer() {
61 host_impl_->SetVisible(true); 61 host_impl_->SetVisible(true);
62 host_impl_->InitializeRenderer(output_surface_.get()); 62 host_impl_->InitializeRenderer(output_surface_.get());
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 state.hard_memory_limit_in_bytes = state.soft_memory_limit_in_bytes * 2; 175 state.hard_memory_limit_in_bytes = state.soft_memory_limit_in_bytes * 2;
176 state.memory_limit_policy = ALLOW_ANYTHING; 176 state.memory_limit_policy = ALLOW_ANYTHING;
177 state.tree_priority = SAME_PRIORITY_FOR_BOTH_TREES; 177 state.tree_priority = SAME_PRIORITY_FOR_BOTH_TREES;
178 178
179 host_impl_->resource_pool()->SetResourceUsageLimits( 179 host_impl_->resource_pool()->SetResourceUsageLimits(
180 state.soft_memory_limit_in_bytes, state.num_resources_limit); 180 state.soft_memory_limit_in_bytes, state.num_resources_limit);
181 host_impl_->tile_manager()->SetGlobalStateForTesting(state); 181 host_impl_->tile_manager()->SetGlobalStateForTesting(state);
182 } 182 }
183 183
184 } // namespace cc 184 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/test_gpu_memory_buffer_manager.cc ('k') | cc/test/test_shared_bitmap_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698