| 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 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 } // anonymous namespace. | 123 } // anonymous namespace. |
| 124 | 124 |
| 125 FeatureInfo::FeatureFlags::FeatureFlags() | 125 FeatureInfo::FeatureFlags::FeatureFlags() |
| 126 : chromium_color_buffer_float_rgba(false), | 126 : chromium_color_buffer_float_rgba(false), |
| 127 chromium_color_buffer_float_rgb(false), | 127 chromium_color_buffer_float_rgb(false), |
| 128 chromium_framebuffer_multisample(false), | 128 chromium_framebuffer_multisample(false), |
| 129 chromium_sync_query(false), | 129 chromium_sync_query(false), |
| 130 use_core_framebuffer_multisample(false), | 130 use_core_framebuffer_multisample(false), |
| 131 multisampled_render_to_texture(false), | 131 multisampled_render_to_texture(false), |
| 132 use_img_for_multisampled_render_to_texture(false), | 132 use_img_for_multisampled_render_to_texture(false), |
| 133 chromium_screen_space_antialiasing(false), |
| 133 oes_standard_derivatives(false), | 134 oes_standard_derivatives(false), |
| 134 oes_egl_image_external(false), | 135 oes_egl_image_external(false), |
| 135 oes_depth24(false), | 136 oes_depth24(false), |
| 136 oes_compressed_etc1_rgb8_texture(false), | 137 oes_compressed_etc1_rgb8_texture(false), |
| 137 packed_depth24_stencil8(false), | 138 packed_depth24_stencil8(false), |
| 138 npot_ok(false), | 139 npot_ok(false), |
| 139 enable_texture_float_linear(false), | 140 enable_texture_float_linear(false), |
| 140 enable_texture_half_float_linear(false), | 141 enable_texture_half_float_linear(false), |
| 141 angle_translated_shader_source(false), | 142 angle_translated_shader_source(false), |
| 142 angle_pack_reverse_row_order(false), | 143 angle_pack_reverse_row_order(false), |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 if (feature_flags_.multisampled_render_to_texture) { | 727 if (feature_flags_.multisampled_render_to_texture) { |
| 727 validators_.render_buffer_parameter.AddValue( | 728 validators_.render_buffer_parameter.AddValue( |
| 728 GL_RENDERBUFFER_SAMPLES_EXT); | 729 GL_RENDERBUFFER_SAMPLES_EXT); |
| 729 validators_.g_l_state.AddValue(GL_MAX_SAMPLES_EXT); | 730 validators_.g_l_state.AddValue(GL_MAX_SAMPLES_EXT); |
| 730 validators_.frame_buffer_parameter.AddValue( | 731 validators_.frame_buffer_parameter.AddValue( |
| 731 GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT); | 732 GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT); |
| 732 AddExtensionString("GL_EXT_multisampled_render_to_texture"); | 733 AddExtensionString("GL_EXT_multisampled_render_to_texture"); |
| 733 } | 734 } |
| 734 } | 735 } |
| 735 | 736 |
| 737 if (extensions.Contains("GL_INTEL_framebuffer_CMAA")) { |
| 738 feature_flags_.chromium_screen_space_antialiasing = true; |
| 739 AddExtensionString("GL_CHROMIUM_screen_space_antialiasing"); |
| 740 } |
| 741 |
| 736 if (extensions.Contains("GL_OES_depth24") || gfx::HasDesktopGLFeatures() || | 742 if (extensions.Contains("GL_OES_depth24") || gfx::HasDesktopGLFeatures() || |
| 737 gl_version_info_->is_es3) { | 743 gl_version_info_->is_es3) { |
| 738 AddExtensionString("GL_OES_depth24"); | 744 AddExtensionString("GL_OES_depth24"); |
| 739 feature_flags_.oes_depth24 = true; | 745 feature_flags_.oes_depth24 = true; |
| 740 validators_.render_buffer_format.AddValue(GL_DEPTH_COMPONENT24); | 746 validators_.render_buffer_format.AddValue(GL_DEPTH_COMPONENT24); |
| 741 } | 747 } |
| 742 | 748 |
| 743 if (gl_version_info_->is_es3 || | 749 if (gl_version_info_->is_es3 || |
| 744 extensions.Contains("GL_OES_standard_derivatives") || | 750 extensions.Contains("GL_OES_standard_derivatives") || |
| 745 gfx::HasDesktopGLFeatures()) { | 751 gfx::HasDesktopGLFeatures()) { |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1196 if (pos == std::string::npos) { | 1202 if (pos == std::string::npos) { |
| 1197 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1203 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 1198 } | 1204 } |
| 1199 } | 1205 } |
| 1200 | 1206 |
| 1201 FeatureInfo::~FeatureInfo() { | 1207 FeatureInfo::~FeatureInfo() { |
| 1202 } | 1208 } |
| 1203 | 1209 |
| 1204 } // namespace gles2 | 1210 } // namespace gles2 |
| 1205 } // namespace gpu | 1211 } // namespace gpu |
| OLD | NEW |