OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <set> | 5 #include <set> |
6 #include <string> | 6 #include <string> |
7 #include "gpu/command_buffer/service/feature_info.h" | 7 #include "gpu/command_buffer/service/feature_info.h" |
8 #include "gpu/command_buffer/service/gl_utils.h" | 8 #include "gpu/command_buffer/service/gl_utils.h" |
9 #include "gpu/GLES2/gles2_command_buffer.h" | 9 #include "gpu/GLES2/gles2_command_buffer.h" |
10 #include "ui/gfx/gl/gl_implementation.h" | 10 #include "ui/gfx/gl/gl_implementation.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 96 |
97 void FeatureInfo::AddFeatures(const char* desired_features) { | 97 void FeatureInfo::AddFeatures(const char* desired_features) { |
98 // Figure out what extensions to turn on. | 98 // Figure out what extensions to turn on. |
99 ExtensionHelper ext( | 99 ExtensionHelper ext( |
100 reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS)), | 100 reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS)), |
101 desired_features); | 101 desired_features); |
102 | 102 |
103 bool npot_ok = false; | 103 bool npot_ok = false; |
104 | 104 |
105 AddExtensionString("GL_CHROMIUM_copy_texture_to_parent_texture"); | 105 AddExtensionString("GL_CHROMIUM_copy_texture_to_parent_texture"); |
| 106 AddExtensionString("GL_CHROMIUM_map_external_texture"); |
106 AddExtensionString("GL_CHROMIUM_resource_safe"); | 107 AddExtensionString("GL_CHROMIUM_resource_safe"); |
107 AddExtensionString("GL_CHROMIUM_resize"); | 108 AddExtensionString("GL_CHROMIUM_resize"); |
108 AddExtensionString("GL_CHROMIUM_strict_attribs"); | 109 AddExtensionString("GL_CHROMIUM_strict_attribs"); |
109 AddExtensionString("GL_CHROMIUM_swapbuffers_complete_callback"); | 110 AddExtensionString("GL_CHROMIUM_swapbuffers_complete_callback"); |
110 AddExtensionString("GL_CHROMIUM_rate_limit_offscreen_context"); | 111 AddExtensionString("GL_CHROMIUM_rate_limit_offscreen_context"); |
111 | 112 |
112 // Only turn this feature on if it is requested. Not by default. | 113 // Only turn this feature on if it is requested. Not by default. |
113 if (desired_features && ext.Desire("GL_CHROMIUM_webglsl")) { | 114 if (desired_features && ext.Desire("GL_CHROMIUM_webglsl")) { |
114 AddExtensionString("GL_CHROMIUM_webglsl"); | 115 AddExtensionString("GL_CHROMIUM_webglsl"); |
115 feature_flags_.chromium_webglsl = true; | 116 feature_flags_.chromium_webglsl = true; |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 } | 352 } |
352 | 353 |
353 void FeatureInfo::AddExtensionString(const std::string& str) { | 354 void FeatureInfo::AddExtensionString(const std::string& str) { |
354 if (extensions_.find(str) == std::string::npos) { | 355 if (extensions_.find(str) == std::string::npos) { |
355 extensions_ += (extensions_.empty() ? "" : " ") + str; | 356 extensions_ += (extensions_.empty() ? "" : " ") + str; |
356 } | 357 } |
357 } | 358 } |
358 | 359 |
359 } // namespace gles2 | 360 } // namespace gles2 |
360 } // namespace gpu | 361 } // namespace gpu |
OLD | NEW |