| 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 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 } | 1017 } |
| 1018 | 1018 |
| 1019 if (feature_flags_.oes_egl_image_external || | 1019 if (feature_flags_.oes_egl_image_external || |
| 1020 feature_flags_.nv_egl_stream_consumer_external) { | 1020 feature_flags_.nv_egl_stream_consumer_external) { |
| 1021 validators_.texture_bind_target.AddValue(GL_TEXTURE_EXTERNAL_OES); | 1021 validators_.texture_bind_target.AddValue(GL_TEXTURE_EXTERNAL_OES); |
| 1022 validators_.get_tex_param_target.AddValue(GL_TEXTURE_EXTERNAL_OES); | 1022 validators_.get_tex_param_target.AddValue(GL_TEXTURE_EXTERNAL_OES); |
| 1023 validators_.texture_parameter.AddValue(GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES); | 1023 validators_.texture_parameter.AddValue(GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES); |
| 1024 validators_.g_l_state.AddValue(GL_TEXTURE_BINDING_EXTERNAL_OES); | 1024 validators_.g_l_state.AddValue(GL_TEXTURE_BINDING_EXTERNAL_OES); |
| 1025 } | 1025 } |
| 1026 | 1026 |
| 1027 if (extensions.Contains("GL_OES_compressed_ETC1_RGB8_texture")) { | 1027 // TODO(kainino): If we add a way to query whether ANGLE is exposing |
| 1028 // native support for ETC1 textures, require that here. Otherwise, we could |
| 1029 // co-opt the native-ETC2-support query discussed below. |
| 1030 if (extensions.Contains("GL_OES_compressed_ETC1_RGB8_texture") && |
| 1031 !gl_version_info_->is_angle) { |
| 1028 AddExtensionString("GL_OES_compressed_ETC1_RGB8_texture"); | 1032 AddExtensionString("GL_OES_compressed_ETC1_RGB8_texture"); |
| 1029 feature_flags_.oes_compressed_etc1_rgb8_texture = true; | 1033 feature_flags_.oes_compressed_etc1_rgb8_texture = true; |
| 1030 validators_.compressed_texture_format.AddValue(GL_ETC1_RGB8_OES); | 1034 validators_.compressed_texture_format.AddValue(GL_ETC1_RGB8_OES); |
| 1031 validators_.texture_internal_format_storage.AddValue(GL_ETC1_RGB8_OES); | 1035 validators_.texture_internal_format_storage.AddValue(GL_ETC1_RGB8_OES); |
| 1032 } | 1036 } |
| 1033 | 1037 |
| 1034 // TODO(kainino): Once we have a way to query whether ANGLE is exposing | 1038 // TODO(kainino): Once we have a way to query whether ANGLE is exposing |
| 1035 // native support for ETC2 textures, require that here. | 1039 // native support for ETC2 textures, require that here. |
| 1036 if (gl_version_info_->is_es3 && !gl_version_info_->is_angle) { | 1040 if (gl_version_info_->is_es3 && !gl_version_info_->is_angle) { |
| 1037 AddExtensionString("GL_CHROMIUM_compressed_texture_etc"); | 1041 AddExtensionString("GL_CHROMIUM_compressed_texture_etc"); |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1570 if (pos == std::string::npos) { | 1574 if (pos == std::string::npos) { |
| 1571 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1575 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 1572 } | 1576 } |
| 1573 } | 1577 } |
| 1574 | 1578 |
| 1575 FeatureInfo::~FeatureInfo() { | 1579 FeatureInfo::~FeatureInfo() { |
| 1576 } | 1580 } |
| 1577 | 1581 |
| 1578 } // namespace gles2 | 1582 } // namespace gles2 |
| 1579 } // namespace gpu | 1583 } // namespace gpu |
| OLD | NEW |