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