| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 InitializeBasicState(&command_line); | 131 InitializeBasicState(&command_line); |
| 132 } | 132 } |
| 133 | 133 |
| 134 void FeatureInfo::InitializeBasicState(const base::CommandLine* command_line) { | 134 void FeatureInfo::InitializeBasicState(const base::CommandLine* command_line) { |
| 135 if (!command_line) | 135 if (!command_line) |
| 136 return; | 136 return; |
| 137 | 137 |
| 138 feature_flags_.enable_shader_name_hashing = | 138 feature_flags_.enable_shader_name_hashing = |
| 139 !command_line->HasSwitch(switches::kDisableShaderNameHashing); | 139 !command_line->HasSwitch(switches::kDisableShaderNameHashing); |
| 140 | 140 |
| 141 feature_flags_.is_swiftshader = | 141 feature_flags_.is_swiftshader_for_webgl = |
| 142 (command_line->GetSwitchValueASCII(switches::kUseGL) == "swiftshader"); | 142 (command_line->GetSwitchValueASCII(switches::kUseGL) == |
| 143 gl::kGLImplementationSwiftShaderForWebGLName); |
| 143 | 144 |
| 144 // The shader translator is needed to translate from WebGL-conformant GLES SL | 145 // The shader translator is needed to translate from WebGL-conformant GLES SL |
| 145 // to normal GLES SL, enforce WebGL conformance, translate from GLES SL 1.0 to | 146 // to normal GLES SL, enforce WebGL conformance, translate from GLES SL 1.0 to |
| 146 // target context GLSL, implement emulation of OpenGL ES features on OpenGL, | 147 // target context GLSL, implement emulation of OpenGL ES features on OpenGL, |
| 147 // etc. | 148 // etc. |
| 148 // The flag here is for testing only. | 149 // The flag here is for testing only. |
| 149 disable_shader_translator_ = | 150 disable_shader_translator_ = |
| 150 command_line->HasSwitch(switches::kDisableGLSLTranslator); | 151 command_line->HasSwitch(switches::kDisableGLSLTranslator); |
| 151 | 152 |
| 152 // Default context_type_ to a GLES2 Context. | 153 // Default context_type_ to a GLES2 Context. |
| (...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1536 if (pos == std::string::npos) { | 1537 if (pos == std::string::npos) { |
| 1537 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1538 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 1538 } | 1539 } |
| 1539 } | 1540 } |
| 1540 | 1541 |
| 1541 FeatureInfo::~FeatureInfo() { | 1542 FeatureInfo::~FeatureInfo() { |
| 1542 } | 1543 } |
| 1543 | 1544 |
| 1544 } // namespace gles2 | 1545 } // namespace gles2 |
| 1545 } // namespace gpu | 1546 } // namespace gpu |
| OLD | NEW |