OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |