| 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 if (feature_flags_.multisampled_render_to_texture) { | 692 if (feature_flags_.multisampled_render_to_texture) { |
| 692 validators_.render_buffer_parameter.AddValue( | 693 validators_.render_buffer_parameter.AddValue( |
| 693 GL_RENDERBUFFER_SAMPLES_EXT); | 694 GL_RENDERBUFFER_SAMPLES_EXT); |
| 694 validators_.g_l_state.AddValue(GL_MAX_SAMPLES_EXT); | 695 validators_.g_l_state.AddValue(GL_MAX_SAMPLES_EXT); |
| 695 validators_.frame_buffer_parameter.AddValue( | 696 validators_.frame_buffer_parameter.AddValue( |
| 696 GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT); | 697 GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT); |
| 697 AddExtensionString("GL_EXT_multisampled_render_to_texture"); | 698 AddExtensionString("GL_EXT_multisampled_render_to_texture"); |
| 698 } | 699 } |
| 699 } | 700 } |
| 700 | 701 |
| 702 if (extensions.Contains("GL_INTEL_framebuffer_CMAA")) { |
| 703 feature_flags_.chromium_screen_space_antialiasing = true; |
| 704 AddExtensionString("GL_CHROMIUM_screen_space_antialiasing"); |
| 705 } |
| 706 |
| 701 if (extensions.Contains("GL_OES_depth24") || gfx::HasDesktopGLFeatures() || | 707 if (extensions.Contains("GL_OES_depth24") || gfx::HasDesktopGLFeatures() || |
| 702 gl_version_info_->is_es3) { | 708 gl_version_info_->is_es3) { |
| 703 AddExtensionString("GL_OES_depth24"); | 709 AddExtensionString("GL_OES_depth24"); |
| 704 feature_flags_.oes_depth24 = true; | 710 feature_flags_.oes_depth24 = true; |
| 705 validators_.render_buffer_format.AddValue(GL_DEPTH_COMPONENT24); | 711 validators_.render_buffer_format.AddValue(GL_DEPTH_COMPONENT24); |
| 706 } | 712 } |
| 707 | 713 |
| 708 if (gl_version_info_->is_es3 || | 714 if (gl_version_info_->is_es3 || |
| 709 extensions.Contains("GL_OES_standard_derivatives") || | 715 extensions.Contains("GL_OES_standard_derivatives") || |
| 710 gfx::HasDesktopGLFeatures()) { | 716 gfx::HasDesktopGLFeatures()) { |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1155 if (pos == std::string::npos) { | 1161 if (pos == std::string::npos) { |
| 1156 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1162 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 1157 } | 1163 } |
| 1158 } | 1164 } |
| 1159 | 1165 |
| 1160 FeatureInfo::~FeatureInfo() { | 1166 FeatureInfo::~FeatureInfo() { |
| 1161 } | 1167 } |
| 1162 | 1168 |
| 1163 } // namespace gles2 | 1169 } // namespace gles2 |
| 1164 } // namespace gpu | 1170 } // namespace gpu |
| OLD | NEW |