| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 if (!command_line) | 193 if (!command_line) |
| 194 return; | 194 return; |
| 195 | 195 |
| 196 feature_flags_.enable_shader_name_hashing = | 196 feature_flags_.enable_shader_name_hashing = |
| 197 !command_line->HasSwitch(switches::kDisableShaderNameHashing); | 197 !command_line->HasSwitch(switches::kDisableShaderNameHashing); |
| 198 | 198 |
| 199 feature_flags_.is_swiftshader = | 199 feature_flags_.is_swiftshader = |
| 200 (command_line->GetSwitchValueASCII(switches::kUseGL) == "swiftshader"); | 200 (command_line->GetSwitchValueASCII(switches::kUseGL) == "swiftshader"); |
| 201 | 201 |
| 202 enable_unsafe_es3_apis_switch_ = | 202 enable_unsafe_es3_apis_switch_ = |
| 203 command_line->HasSwitch(switches::kEnableUnsafeES3APIs); | 203 command_line->HasSwitch(switches::kEnableUnsafeES3APIs) && |
| 204 !command_line->HasSwitch(switches::kDisableES3APIs); |
| 204 | 205 |
| 205 // The shader translator is needed to translate from WebGL-conformant GLES SL | 206 // The shader translator is needed to translate from WebGL-conformant GLES SL |
| 206 // to normal GLES SL, enforce WebGL conformance, translate from GLES SL 1.0 to | 207 // to normal GLES SL, enforce WebGL conformance, translate from GLES SL 1.0 to |
| 207 // target context GLSL, implement emulation of OpenGL ES features on OpenGL, | 208 // target context GLSL, implement emulation of OpenGL ES features on OpenGL, |
| 208 // etc. | 209 // etc. |
| 209 // The flag here is for testing only. | 210 // The flag here is for testing only. |
| 210 disable_shader_translator_ = | 211 disable_shader_translator_ = |
| 211 command_line->HasSwitch(switches::kDisableGLSLTranslator); | 212 command_line->HasSwitch(switches::kDisableGLSLTranslator); |
| 212 | 213 |
| 213 unsafe_es3_apis_enabled_ = false; | 214 unsafe_es3_apis_enabled_ = false; |
| (...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1551 if (pos == std::string::npos) { | 1552 if (pos == std::string::npos) { |
| 1552 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1553 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 1553 } | 1554 } |
| 1554 } | 1555 } |
| 1555 | 1556 |
| 1556 FeatureInfo::~FeatureInfo() { | 1557 FeatureInfo::~FeatureInfo() { |
| 1557 } | 1558 } |
| 1558 | 1559 |
| 1559 } // namespace gles2 | 1560 } // namespace gles2 |
| 1560 } // namespace gpu | 1561 } // namespace gpu |
| OLD | NEW |