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

Side by Side Diff: gpu/config/gpu_util.cc

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 years, 8 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/config/gpu_info_collector_unittest.cc ('k') | gpu/config/gpu_util_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/config/gpu_util.h" 5 #include "gpu/config/gpu_util.h"
6 6
7 #include <memory>
7 #include <vector> 8 #include <vector>
8 9
9 #include "base/command_line.h" 10 #include "base/command_line.h"
10 #include "base/logging.h" 11 #include "base/logging.h"
11 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
12 #include "base/strings/string_split.h" 13 #include "base/strings/string_split.h"
13 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
14 #include "gpu/config/gpu_control_list_jsons.h" 15 #include "gpu/config/gpu_control_list_jsons.h"
15 #include "gpu/config/gpu_driver_bug_list.h" 16 #include "gpu/config/gpu_driver_bug_list.h"
16 #include "gpu/config/gpu_info_collector.h" 17 #include "gpu/config/gpu_info_collector.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 50
50 void MergeFeatureSets(std::set<int>* dst, const std::set<int>& src) { 51 void MergeFeatureSets(std::set<int>* dst, const std::set<int>& src) {
51 DCHECK(dst); 52 DCHECK(dst);
52 if (src.empty()) 53 if (src.empty())
53 return; 54 return;
54 dst->insert(src.begin(), src.end()); 55 dst->insert(src.begin(), src.end());
55 } 56 }
56 57
57 void ApplyGpuDriverBugWorkarounds(const GPUInfo& gpu_info, 58 void ApplyGpuDriverBugWorkarounds(const GPUInfo& gpu_info,
58 base::CommandLine* command_line) { 59 base::CommandLine* command_line) {
59 scoped_ptr<GpuDriverBugList> list(GpuDriverBugList::Create()); 60 std::unique_ptr<GpuDriverBugList> list(GpuDriverBugList::Create());
60 list->LoadList(kGpuDriverBugListJson, 61 list->LoadList(kGpuDriverBugListJson,
61 GpuControlList::kCurrentOsOnly); 62 GpuControlList::kCurrentOsOnly);
62 std::set<int> workarounds = list->MakeDecision( 63 std::set<int> workarounds = list->MakeDecision(
63 GpuControlList::kOsAny, std::string(), gpu_info); 64 GpuControlList::kOsAny, std::string(), gpu_info);
64 GpuDriverBugList::AppendWorkaroundsFromCommandLine( 65 GpuDriverBugList::AppendWorkaroundsFromCommandLine(
65 &workarounds, *command_line); 66 &workarounds, *command_line);
66 if (!workarounds.empty()) { 67 if (!workarounds.empty()) {
67 command_line->AppendSwitchASCII(switches::kGpuDriverBugWorkarounds, 68 command_line->AppendSwitchASCII(switches::kGpuDriverBugWorkarounds,
68 IntSetToString(workarounds)); 69 IntSetToString(workarounds));
69 } 70 }
(...skipping 19 matching lines...) Expand all
89 base::JoinString(v, " ")); 90 base::JoinString(v, " "));
90 } 91 }
91 } 92 }
92 93
93 void StringToFeatureSet( 94 void StringToFeatureSet(
94 const std::string& str, std::set<int>* feature_set) { 95 const std::string& str, std::set<int>* feature_set) {
95 StringToIntSet(str, feature_set); 96 StringToIntSet(str, feature_set);
96 } 97 }
97 98
98 } // namespace gpu 99 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/config/gpu_info_collector_unittest.cc ('k') | gpu/config/gpu_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698