| 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 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1286     validators_.texture_internal_format.AddValue(GL_RG8_EXT); | 1286     validators_.texture_internal_format.AddValue(GL_RG8_EXT); | 
| 1287     validators_.read_pixel_format.AddValue(GL_RED_EXT); | 1287     validators_.read_pixel_format.AddValue(GL_RED_EXT); | 
| 1288     validators_.read_pixel_format.AddValue(GL_RG_EXT); | 1288     validators_.read_pixel_format.AddValue(GL_RG_EXT); | 
| 1289     validators_.render_buffer_format.AddValue(GL_R8_EXT); | 1289     validators_.render_buffer_format.AddValue(GL_R8_EXT); | 
| 1290     validators_.render_buffer_format.AddValue(GL_RG8_EXT); | 1290     validators_.render_buffer_format.AddValue(GL_RG8_EXT); | 
| 1291     validators_.texture_unsized_internal_format.AddValue(GL_RED_EXT); | 1291     validators_.texture_unsized_internal_format.AddValue(GL_RED_EXT); | 
| 1292     validators_.texture_unsized_internal_format.AddValue(GL_RG_EXT); | 1292     validators_.texture_unsized_internal_format.AddValue(GL_RG_EXT); | 
| 1293   } | 1293   } | 
| 1294   UMA_HISTOGRAM_BOOLEAN("GPU.TextureRG", feature_flags_.ext_texture_rg); | 1294   UMA_HISTOGRAM_BOOLEAN("GPU.TextureRG", feature_flags_.ext_texture_rg); | 
| 1295 | 1295 | 
|  | 1296   if (gl_version_info_->is_desktop_core_profile || | 
|  | 1297       extensions.Contains("GL_EXT_texture_norm16")) { | 
|  | 1298     feature_flags_.ext_texture_norm16 = true; | 
|  | 1299     AddExtensionString("GL_EXT_texture_norm16"); | 
|  | 1300 | 
|  | 1301     // Note: EXT_texture_norm16 is not exposed through WebGL API so we validate | 
|  | 1302     // only the combinations used internally. | 
|  | 1303     validators_.texture_format.AddValue(GL_RED_EXT); | 
|  | 1304     validators_.texture_internal_format.AddValue(GL_R16_EXT); | 
|  | 1305     validators_.texture_internal_format.AddValue(GL_RED_EXT); | 
|  | 1306     validators_.texture_unsized_internal_format.AddValue(GL_RED_EXT); | 
|  | 1307   } | 
|  | 1308 | 
| 1296   bool has_opengl_dual_source_blending = | 1309   bool has_opengl_dual_source_blending = | 
| 1297       gl_version_info_->IsAtLeastGL(3, 3) || | 1310       gl_version_info_->IsAtLeastGL(3, 3) || | 
| 1298       (gl_version_info_->IsAtLeastGL(3, 2) && | 1311       (gl_version_info_->IsAtLeastGL(3, 2) && | 
| 1299        extensions.Contains("GL_ARB_blend_func_extended")); | 1312        extensions.Contains("GL_ARB_blend_func_extended")); | 
| 1300   if (!disable_shader_translator_ && | 1313   if (!disable_shader_translator_ && | 
| 1301       !workarounds_.get_frag_data_info_bug && | 1314       !workarounds_.get_frag_data_info_bug && | 
| 1302       ((gl_version_info_->IsAtLeastGL(3, 2) && | 1315       ((gl_version_info_->IsAtLeastGL(3, 2) && | 
| 1303         has_opengl_dual_source_blending) || | 1316         has_opengl_dual_source_blending) || | 
| 1304        (gl_version_info_->IsAtLeastGLES(3, 0) && | 1317        (gl_version_info_->IsAtLeastGLES(3, 0) && | 
| 1305         extensions.Contains("GL_EXT_blend_func_extended")))) { | 1318         extensions.Contains("GL_EXT_blend_func_extended")))) { | 
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1683   if (pos == std::string::npos) { | 1696   if (pos == std::string::npos) { | 
| 1684     extensions_ += (extensions_.empty() ? "" : " ") + str; | 1697     extensions_ += (extensions_.empty() ? "" : " ") + str; | 
| 1685   } | 1698   } | 
| 1686 } | 1699 } | 
| 1687 | 1700 | 
| 1688 FeatureInfo::~FeatureInfo() { | 1701 FeatureInfo::~FeatureInfo() { | 
| 1689 } | 1702 } | 
| 1690 | 1703 | 
| 1691 }  // namespace gles2 | 1704 }  // namespace gles2 | 
| 1692 }  // namespace gpu | 1705 }  // namespace gpu | 
| OLD | NEW | 
|---|