| 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 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 ext_discard_framebuffer(false), | 157 ext_discard_framebuffer(false), |
| 158 angle_depth_texture(false), | 158 angle_depth_texture(false), |
| 159 is_swiftshader(false), | 159 is_swiftshader(false), |
| 160 angle_texture_usage(false), | 160 angle_texture_usage(false), |
| 161 ext_texture_storage(false), | 161 ext_texture_storage(false), |
| 162 chromium_path_rendering(false), | 162 chromium_path_rendering(false), |
| 163 blend_equation_advanced(false), | 163 blend_equation_advanced(false), |
| 164 blend_equation_advanced_coherent(false), | 164 blend_equation_advanced_coherent(false), |
| 165 ext_texture_rg(false), | 165 ext_texture_rg(false), |
| 166 enable_subscribe_uniform(false), | 166 enable_subscribe_uniform(false), |
| 167 emulate_primitive_restart_fixed_index(false) { | 167 emulate_primitive_restart_fixed_index(false), |
| 168 ext_render_buffer_format_bgra8888(false) { |
| 168 } | 169 } |
| 169 | 170 |
| 170 FeatureInfo::Workarounds::Workarounds() : | 171 FeatureInfo::Workarounds::Workarounds() : |
| 171 #define GPU_OP(type, name) name(false), | 172 #define GPU_OP(type, name) name(false), |
| 172 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) | 173 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) |
| 173 #undef GPU_OP | 174 #undef GPU_OP |
| 174 max_texture_size(0), | 175 max_texture_size(0), |
| 175 max_cube_map_texture_size(0), | 176 max_cube_map_texture_size(0), |
| 176 max_fragment_uniform_vectors(0), | 177 max_fragment_uniform_vectors(0), |
| 177 max_varying_vectors(0), | 178 max_varying_vectors(0), |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 validators_.texture_internal_format.AddValue(GL_BGRA_EXT); | 506 validators_.texture_internal_format.AddValue(GL_BGRA_EXT); |
| 506 validators_.texture_format.AddValue(GL_BGRA_EXT); | 507 validators_.texture_format.AddValue(GL_BGRA_EXT); |
| 507 } | 508 } |
| 508 | 509 |
| 509 if (enable_read_format_bgra) { | 510 if (enable_read_format_bgra) { |
| 510 AddExtensionString("GL_EXT_read_format_bgra"); | 511 AddExtensionString("GL_EXT_read_format_bgra"); |
| 511 validators_.read_pixel_format.AddValue(GL_BGRA_EXT); | 512 validators_.read_pixel_format.AddValue(GL_BGRA_EXT); |
| 512 } | 513 } |
| 513 | 514 |
| 514 if (enable_render_buffer_bgra) { | 515 if (enable_render_buffer_bgra) { |
| 516 feature_flags_.ext_render_buffer_format_bgra8888 = true; |
| 515 AddExtensionString("GL_CHROMIUM_renderbuffer_format_BGRA8888"); | 517 AddExtensionString("GL_CHROMIUM_renderbuffer_format_BGRA8888"); |
| 516 validators_.render_buffer_format.AddValue(GL_BGRA8_EXT); | 518 validators_.render_buffer_format.AddValue(GL_BGRA8_EXT); |
| 517 } | 519 } |
| 518 | 520 |
| 519 if (extensions.Contains("GL_OES_rgb8_rgba8") || gfx::HasDesktopGLFeatures()) { | 521 if (extensions.Contains("GL_OES_rgb8_rgba8") || gfx::HasDesktopGLFeatures()) { |
| 520 AddExtensionString("GL_OES_rgb8_rgba8"); | 522 AddExtensionString("GL_OES_rgb8_rgba8"); |
| 521 validators_.render_buffer_format.AddValue(GL_RGB8_OES); | 523 validators_.render_buffer_format.AddValue(GL_RGB8_OES); |
| 522 validators_.render_buffer_format.AddValue(GL_RGBA8_OES); | 524 validators_.render_buffer_format.AddValue(GL_RGBA8_OES); |
| 523 } | 525 } |
| 524 | 526 |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 if (pos == std::string::npos) { | 1140 if (pos == std::string::npos) { |
| 1139 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1141 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 1140 } | 1142 } |
| 1141 } | 1143 } |
| 1142 | 1144 |
| 1143 FeatureInfo::~FeatureInfo() { | 1145 FeatureInfo::~FeatureInfo() { |
| 1144 } | 1146 } |
| 1145 | 1147 |
| 1146 } // namespace gles2 | 1148 } // namespace gles2 |
| 1147 } // namespace gpu | 1149 } // namespace gpu |
| OLD | NEW |