| 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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   612     // and the desktop extension GL_ARB_framebuffer_sRGB (part of the core in |   612     // and the desktop extension GL_ARB_framebuffer_sRGB (part of the core in | 
|   613     // 3.0). |   613     // 3.0). | 
|   614     if (feature_flags_.desktop_srgb_support || |   614     if (feature_flags_.desktop_srgb_support || | 
|   615         extensions.Contains("GL_EXT_sRGB_write_control")) { |   615         extensions.Contains("GL_EXT_sRGB_write_control")) { | 
|   616       feature_flags_.ext_srgb_write_control = true; |   616       feature_flags_.ext_srgb_write_control = true; | 
|   617       AddExtensionString("GL_EXT_sRGB_write_control"); |   617       AddExtensionString("GL_EXT_sRGB_write_control"); | 
|   618       validators_.capability.AddValue(GL_FRAMEBUFFER_SRGB_EXT); |   618       validators_.capability.AddValue(GL_FRAMEBUFFER_SRGB_EXT); | 
|   619     } |   619     } | 
|   620   } |   620   } | 
|   621  |   621  | 
|   622   // The extension GL_EXT_texture_sRGB_decode is the same on desktop and GLES. |  | 
|   623   if (extensions.Contains("GL_EXT_texture_sRGB_decode") && !IsWebGLContext()) { |  | 
|   624     AddExtensionString("GL_EXT_texture_sRGB_decode"); |  | 
|   625     validators_.texture_parameter.AddValue(GL_TEXTURE_SRGB_DECODE_EXT); |  | 
|   626   } |  | 
|   627  |  | 
|   628   // On desktop, GL_EXT_texture_sRGB is required regardless of GL version, |   622   // On desktop, GL_EXT_texture_sRGB is required regardless of GL version, | 
|   629   // since the sRGB formats in OpenGL 3.0 Core do not support S3TC. |   623   // since the sRGB formats in OpenGL 3.0 Core do not support S3TC. | 
|   630   // TODO(kainino): Support GL_EXT_texture_compression_s3tc_srgb once ratified. |   624   // TODO(kainino): Support GL_EXT_texture_compression_s3tc_srgb once ratified. | 
|   631   if ((gl_version_info_->is_es && extensions.Contains("GL_NV_sRGB_formats")) || |   625   if ((gl_version_info_->is_es && extensions.Contains("GL_NV_sRGB_formats")) || | 
|   632       (!gl_version_info_->is_es && |   626       (!gl_version_info_->is_es && | 
|   633        extensions.Contains("GL_EXT_texture_sRGB") && |   627        extensions.Contains("GL_EXT_texture_sRGB") && | 
|   634        extensions.Contains("GL_EXT_texture_compression_s3tc"))) { |   628        extensions.Contains("GL_EXT_texture_compression_s3tc"))) { | 
|   635     AddExtensionString("GL_EXT_texture_compression_s3tc_srgb"); |   629     AddExtensionString("GL_EXT_texture_compression_s3tc_srgb"); | 
|   636  |   630  | 
|   637     validators_.compressed_texture_format.AddValue( |   631     validators_.compressed_texture_format.AddValue( | 
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1563   if (pos == std::string::npos) { |  1557   if (pos == std::string::npos) { | 
|  1564     extensions_ += (extensions_.empty() ? "" : " ") + str; |  1558     extensions_ += (extensions_.empty() ? "" : " ") + str; | 
|  1565   } |  1559   } | 
|  1566 } |  1560 } | 
|  1567  |  1561  | 
|  1568 FeatureInfo::~FeatureInfo() { |  1562 FeatureInfo::~FeatureInfo() { | 
|  1569 } |  1563 } | 
|  1570  |  1564  | 
|  1571 }  // namespace gles2 |  1565 }  // namespace gles2 | 
|  1572 }  // namespace gpu |  1566 }  // namespace gpu | 
| OLD | NEW |