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

Side by Side Diff: gpu/command_buffer/service/feature_info.cc

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
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/command_buffer/service/feature_info.h" 5 #include "gpu/command_buffer/service/feature_info.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) 154 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP)
155 #undef GPU_OP 155 #undef GPU_OP
156 max_texture_size(0), 156 max_texture_size(0),
157 max_cube_map_texture_size(0), 157 max_cube_map_texture_size(0),
158 max_fragment_uniform_vectors(0), 158 max_fragment_uniform_vectors(0),
159 max_varying_vectors(0), 159 max_varying_vectors(0),
160 max_vertex_uniform_vectors(0) { 160 max_vertex_uniform_vectors(0) {
161 } 161 }
162 162
163 FeatureInfo::FeatureInfo() { 163 FeatureInfo::FeatureInfo() {
164 InitializeBasicState(*CommandLine::ForCurrentProcess()); 164 InitializeBasicState(*base::CommandLine::ForCurrentProcess());
165 } 165 }
166 166
167 FeatureInfo::FeatureInfo(const CommandLine& command_line) { 167 FeatureInfo::FeatureInfo(const base::CommandLine& command_line) {
168 InitializeBasicState(command_line); 168 InitializeBasicState(command_line);
169 } 169 }
170 170
171 void FeatureInfo::InitializeBasicState(const CommandLine& command_line) { 171 void FeatureInfo::InitializeBasicState(const base::CommandLine& command_line) {
172 if (command_line.HasSwitch(switches::kGpuDriverBugWorkarounds)) { 172 if (command_line.HasSwitch(switches::kGpuDriverBugWorkarounds)) {
173 std::string types = command_line.GetSwitchValueASCII( 173 std::string types = command_line.GetSwitchValueASCII(
174 switches::kGpuDriverBugWorkarounds); 174 switches::kGpuDriverBugWorkarounds);
175 StringToWorkarounds(types, &workarounds_); 175 StringToWorkarounds(types, &workarounds_);
176 } 176 }
177 feature_flags_.enable_shader_name_hashing = 177 feature_flags_.enable_shader_name_hashing =
178 !command_line.HasSwitch(switches::kDisableShaderNameHashing); 178 !command_line.HasSwitch(switches::kDisableShaderNameHashing);
179 179
180 feature_flags_.is_swiftshader = 180 feature_flags_.is_swiftshader =
181 (command_line.GetSwitchValueASCII(switches::kUseGL) == "swiftshader"); 181 (command_line.GetSwitchValueASCII(switches::kUseGL) == "swiftshader");
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 if (pos == std::string::npos) { 1033 if (pos == std::string::npos) {
1034 extensions_ += (extensions_.empty() ? "" : " ") + str; 1034 extensions_ += (extensions_.empty() ? "" : " ") + str;
1035 } 1035 }
1036 } 1036 }
1037 1037
1038 FeatureInfo::~FeatureInfo() { 1038 FeatureInfo::~FeatureInfo() {
1039 } 1039 }
1040 1040
1041 } // namespace gles2 1041 } // namespace gles2
1042 } // namespace gpu 1042 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/context_group.cc ('k') | gpu/command_buffer/service/feature_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698