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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 const char* renderer_str = | 232 const char* renderer_str = |
233 reinterpret_cast<const char*>(glGetString(GL_RENDERER)); | 233 reinterpret_cast<const char*>(glGetString(GL_RENDERER)); |
234 if (renderer_str) { | 234 if (renderer_str) { |
235 feature_flags_.is_angle = StartsWithASCII(renderer_str, "ANGLE", true); | 235 feature_flags_.is_angle = StartsWithASCII(renderer_str, "ANGLE", true); |
236 } | 236 } |
237 | 237 |
238 bool is_es3 = false; | 238 bool is_es3 = false; |
239 const char* version_str = | 239 const char* version_str = |
240 reinterpret_cast<const char*>(glGetString(GL_VERSION)); | 240 reinterpret_cast<const char*>(glGetString(GL_VERSION)); |
241 if (version_str) { | 241 if (version_str) { |
242 std::string lstr(StringToLowerASCII(std::string(version_str))); | 242 std::string lstr(base::StringToLowerASCII(std::string(version_str))); |
243 is_es3 = (lstr.substr(0, 12) == "opengl es 3."); | 243 is_es3 = (lstr.substr(0, 12) == "opengl es 3."); |
244 } | 244 } |
245 | 245 |
246 AddExtensionString("GL_ANGLE_translated_shader_source"); | 246 AddExtensionString("GL_ANGLE_translated_shader_source"); |
247 AddExtensionString("GL_CHROMIUM_async_pixel_transfers"); | 247 AddExtensionString("GL_CHROMIUM_async_pixel_transfers"); |
248 AddExtensionString("GL_CHROMIUM_bind_uniform_location"); | 248 AddExtensionString("GL_CHROMIUM_bind_uniform_location"); |
249 AddExtensionString("GL_CHROMIUM_command_buffer_query"); | 249 AddExtensionString("GL_CHROMIUM_command_buffer_query"); |
250 AddExtensionString("GL_CHROMIUM_command_buffer_latency_query"); | 250 AddExtensionString("GL_CHROMIUM_command_buffer_latency_query"); |
251 AddExtensionString("GL_CHROMIUM_copy_texture"); | 251 AddExtensionString("GL_CHROMIUM_copy_texture"); |
252 AddExtensionString("GL_CHROMIUM_get_error_query"); | 252 AddExtensionString("GL_CHROMIUM_get_error_query"); |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 if (pos == std::string::npos) { | 844 if (pos == std::string::npos) { |
845 extensions_ += (extensions_.empty() ? "" : " ") + str; | 845 extensions_ += (extensions_.empty() ? "" : " ") + str; |
846 } | 846 } |
847 } | 847 } |
848 | 848 |
849 FeatureInfo::~FeatureInfo() { | 849 FeatureInfo::~FeatureInfo() { |
850 } | 850 } |
851 | 851 |
852 } // namespace gles2 | 852 } // namespace gles2 |
853 } // namespace gpu | 853 } // namespace gpu |
OLD | NEW |