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

Side by Side Diff: gpu/tools/compositor_model_bench/render_models.cc

Issue 2257713003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « gpu/ipc/service/gpu_command_buffer_stub.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "gpu/tools/compositor_model_bench/render_models.h" 5 #include "gpu/tools/compositor_model_bench/render_models.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 14 matching lines...) Expand all
25 RenderModelSimulator::~RenderModelSimulator() { 25 RenderModelSimulator::~RenderModelSimulator() {
26 } 26 }
27 27
28 std::unique_ptr<RenderModelSimulator> ConstructSimulationModel( 28 std::unique_ptr<RenderModelSimulator> ConstructSimulationModel(
29 RenderModel model, 29 RenderModel model,
30 std::unique_ptr<RenderNode> render_tree_root, 30 std::unique_ptr<RenderNode> render_tree_root,
31 int window_width, 31 int window_width,
32 int window_height) { 32 int window_height) {
33 switch (model) { 33 switch (model) {
34 case ForwardRenderModel: 34 case ForwardRenderModel:
35 return base::WrapUnique(new ForwardRenderSimulator( 35 return base::MakeUnique<ForwardRenderSimulator>(
36 std::move(render_tree_root), window_width, window_height)); 36 std::move(render_tree_root), window_width, window_height);
37 default: 37 default:
38 LOG(ERROR) << "Unrecognized render model. " 38 LOG(ERROR) << "Unrecognized render model. "
39 "If we know its name, then it's..." << ModelToString(model); 39 "If we know its name, then it's..." << ModelToString(model);
40 return nullptr; 40 return nullptr;
41 } 41 }
42 } 42 }
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_command_buffer_stub.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698