| 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/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 feature_flags_.is_intel |= lstr.find("intel") != std::string::npos; | 163 feature_flags_.is_intel |= lstr.find("intel") != std::string::npos; |
| 164 feature_flags_.is_nvidia |= lstr.find("nvidia") != std::string::npos; | 164 feature_flags_.is_nvidia |= lstr.find("nvidia") != std::string::npos; |
| 165 feature_flags_.is_amd |= | 165 feature_flags_.is_amd |= |
| 166 lstr.find("amd") != std::string::npos || | 166 lstr.find("amd") != std::string::npos || |
| 167 lstr.find("ati") != std::string::npos; | 167 lstr.find("ati") != std::string::npos; |
| 168 } | 168 } |
| 169 } | 169 } |
| 170 | 170 |
| 171 bool npot_ok = false; | 171 bool npot_ok = false; |
| 172 | 172 |
| 173 AddExtensionString("GL_ANGLE_translated_shader_source"); |
| 173 AddExtensionString("GL_CHROMIUM_bind_uniform_location"); | 174 AddExtensionString("GL_CHROMIUM_bind_uniform_location"); |
| 174 AddExtensionString("GL_CHROMIUM_resource_safe"); | |
| 175 AddExtensionString("GL_CHROMIUM_resize"); | |
| 176 AddExtensionString("GL_CHROMIUM_strict_attribs"); | |
| 177 AddExtensionString("GL_CHROMIUM_rate_limit_offscreen_context"); | |
| 178 AddExtensionString("GL_CHROMIUM_set_visibility"); | |
| 179 AddExtensionString("GL_CHROMIUM_discard_framebuffer"); | |
| 180 AddExtensionString("GL_CHROMIUM_command_buffer_query"); | 175 AddExtensionString("GL_CHROMIUM_command_buffer_query"); |
| 181 AddExtensionString("GL_CHROMIUM_copy_texture"); | 176 AddExtensionString("GL_CHROMIUM_copy_texture"); |
| 177 AddExtensionString("GL_CHROMIUM_discard_framebuffer"); |
| 178 AddExtensionString("GL_CHROMIUM_get_error_query"); |
| 179 AddExtensionString("GL_CHROMIUM_rate_limit_offscreen_context"); |
| 180 AddExtensionString("GL_CHROMIUM_resize"); |
| 181 AddExtensionString("GL_CHROMIUM_resource_safe"); |
| 182 AddExtensionString("GL_CHROMIUM_set_visibility"); |
| 183 AddExtensionString("GL_CHROMIUM_strict_attribs"); |
| 182 AddExtensionString("GL_CHROMIUM_texture_mailbox"); | 184 AddExtensionString("GL_CHROMIUM_texture_mailbox"); |
| 183 AddExtensionString("GL_ANGLE_translated_shader_source"); | |
| 184 | 185 |
| 185 if (!disallowed_features_.gpu_memory_manager) | 186 if (!disallowed_features_.gpu_memory_manager) |
| 186 AddExtensionString("GL_CHROMIUM_gpu_memory_manager"); | 187 AddExtensionString("GL_CHROMIUM_gpu_memory_manager"); |
| 187 | 188 |
| 188 if (ext.Have("GL_ANGLE_translated_shader_source")) { | 189 if (ext.Have("GL_ANGLE_translated_shader_source")) { |
| 189 feature_flags_.angle_translated_shader_source = true; | 190 feature_flags_.angle_translated_shader_source = true; |
| 190 } | 191 } |
| 191 | 192 |
| 192 // Only turn this feature on if it is requested. Not by default. | 193 // Only turn this feature on if it is requested. Not by default. |
| 193 if (desired_features && ext.Desire("GL_CHROMIUM_webglsl")) { | 194 if (desired_features && ext.Desire("GL_CHROMIUM_webglsl")) { |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 if (extensions_.find(str) == std::string::npos) { | 567 if (extensions_.find(str) == std::string::npos) { |
| 567 extensions_ += (extensions_.empty() ? "" : " ") + str; | 568 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 568 } | 569 } |
| 569 } | 570 } |
| 570 | 571 |
| 571 FeatureInfo::~FeatureInfo() { | 572 FeatureInfo::~FeatureInfo() { |
| 572 } | 573 } |
| 573 | 574 |
| 574 } // namespace gles2 | 575 } // namespace gles2 |
| 575 } // namespace gpu | 576 } // namespace gpu |
| OLD | NEW |