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

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

Issue 2505473002: Don't forbid GPU process if WebGL/WebGL2 is disabled on GPU but not browser. (Closed)
Patch Set: adding TODO Created 4 years, 1 month 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_util.h ('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 <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 str, ";", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) { 54 str, ";", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
55 uint32_t id = 0; 55 uint32_t id = 0;
56 bool succeed = base::HexStringToUInt(piece, &id); 56 bool succeed = base::HexStringToUInt(piece, &id);
57 DCHECK(succeed); 57 DCHECK(succeed);
58 list->push_back(id); 58 list->push_back(id);
59 } 59 }
60 } 60 }
61 61
62 } // namespace anonymous 62 } // namespace anonymous
63 63
64 void MergeFeatureSets(std::set<int>* dst, const std::set<int>& src) {
65 DCHECK(dst);
66 if (src.empty())
67 return;
68 dst->insert(src.begin(), src.end());
69 }
70
71 void ApplyGpuDriverBugWorkarounds(const GPUInfo& gpu_info, 64 void ApplyGpuDriverBugWorkarounds(const GPUInfo& gpu_info,
72 base::CommandLine* command_line) { 65 base::CommandLine* command_line) {
73 std::unique_ptr<GpuDriverBugList> list(GpuDriverBugList::Create()); 66 std::unique_ptr<GpuDriverBugList> list(GpuDriverBugList::Create());
74 list->LoadList(kGpuDriverBugListJson, 67 list->LoadList(kGpuDriverBugListJson,
75 GpuControlList::kCurrentOsOnly); 68 GpuControlList::kCurrentOsOnly);
76 std::set<int> workarounds = list->MakeDecision( 69 std::set<int> workarounds = list->MakeDecision(
77 GpuControlList::kOsAny, std::string(), gpu_info); 70 GpuControlList::kOsAny, std::string(), gpu_info);
78 GpuDriverBugList::AppendWorkaroundsFromCommandLine( 71 GpuDriverBugList::AppendWorkaroundsFromCommandLine(
79 &workarounds, *command_line); 72 &workarounds, *command_line);
80 if (!workarounds.empty()) { 73 if (!workarounds.empty()) {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 ui::GpuSwitchingManager::GetInstance(); 145 ui::GpuSwitchingManager::GetInstance();
153 if (!switching_manager->SupportsDualGpus()) 146 if (!switching_manager->SupportsDualGpus())
154 return; 147 return;
155 if (driver_bug_workarounds.count(gpu::FORCE_DISCRETE_GPU) == 1) 148 if (driver_bug_workarounds.count(gpu::FORCE_DISCRETE_GPU) == 1)
156 ui::GpuSwitchingManager::GetInstance()->ForceUseOfDiscreteGpu(); 149 ui::GpuSwitchingManager::GetInstance()->ForceUseOfDiscreteGpu();
157 else if (driver_bug_workarounds.count(gpu::FORCE_INTEGRATED_GPU) == 1) 150 else if (driver_bug_workarounds.count(gpu::FORCE_INTEGRATED_GPU) == 1)
158 ui::GpuSwitchingManager::GetInstance()->ForceUseOfIntegratedGpu(); 151 ui::GpuSwitchingManager::GetInstance()->ForceUseOfIntegratedGpu();
159 } 152 }
160 153
161 } // namespace gpu 154 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/config/gpu_util.h ('k') | gpu/config/gpu_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698