| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 ext_discard_framebuffer(false), | 160 ext_discard_framebuffer(false), |
| 161 angle_depth_texture(false), | 161 angle_depth_texture(false), |
| 162 is_swiftshader(false), | 162 is_swiftshader(false), |
| 163 angle_texture_usage(false), | 163 angle_texture_usage(false), |
| 164 ext_texture_storage(false), | 164 ext_texture_storage(false), |
| 165 chromium_path_rendering(false), | 165 chromium_path_rendering(false), |
| 166 blend_equation_advanced(false), | 166 blend_equation_advanced(false), |
| 167 blend_equation_advanced_coherent(false), | 167 blend_equation_advanced_coherent(false), |
| 168 ext_texture_rg(false), | 168 ext_texture_rg(false), |
| 169 enable_subscribe_uniform(false), | 169 enable_subscribe_uniform(false), |
| 170 emulate_primitive_restart_fixed_index(false) { | 170 emulate_primitive_restart_fixed_index(false), |
| 171 ext_render_buffer_format_bgra8888(false) { |
| 171 } | 172 } |
| 172 | 173 |
| 173 FeatureInfo::Workarounds::Workarounds() : | 174 FeatureInfo::Workarounds::Workarounds() : |
| 174 #define GPU_OP(type, name) name(false), | 175 #define GPU_OP(type, name) name(false), |
| 175 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) | 176 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) |
| 176 #undef GPU_OP | 177 #undef GPU_OP |
| 177 max_texture_size(0), | 178 max_texture_size(0), |
| 178 max_cube_map_texture_size(0), | 179 max_cube_map_texture_size(0), |
| 179 max_fragment_uniform_vectors(0), | 180 max_fragment_uniform_vectors(0), |
| 180 max_varying_vectors(0), | 181 max_varying_vectors(0), |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 validators_.texture_internal_format.AddValue(GL_BGRA_EXT); | 510 validators_.texture_internal_format.AddValue(GL_BGRA_EXT); |
| 510 validators_.texture_format.AddValue(GL_BGRA_EXT); | 511 validators_.texture_format.AddValue(GL_BGRA_EXT); |
| 511 } | 512 } |
| 512 | 513 |
| 513 if (enable_read_format_bgra) { | 514 if (enable_read_format_bgra) { |
| 514 AddExtensionString("GL_EXT_read_format_bgra"); | 515 AddExtensionString("GL_EXT_read_format_bgra"); |
| 515 validators_.read_pixel_format.AddValue(GL_BGRA_EXT); | 516 validators_.read_pixel_format.AddValue(GL_BGRA_EXT); |
| 516 } | 517 } |
| 517 | 518 |
| 518 if (enable_render_buffer_bgra) { | 519 if (enable_render_buffer_bgra) { |
| 520 feature_flags_.ext_render_buffer_format_bgra8888 = true; |
| 519 AddExtensionString("GL_CHROMIUM_renderbuffer_format_BGRA8888"); | 521 AddExtensionString("GL_CHROMIUM_renderbuffer_format_BGRA8888"); |
| 520 validators_.render_buffer_format.AddValue(GL_BGRA8_EXT); | 522 validators_.render_buffer_format.AddValue(GL_BGRA8_EXT); |
| 521 } | 523 } |
| 522 | 524 |
| 523 if (extensions.Contains("GL_OES_rgb8_rgba8") || gfx::HasDesktopGLFeatures()) { | 525 if (extensions.Contains("GL_OES_rgb8_rgba8") || gfx::HasDesktopGLFeatures()) { |
| 524 AddExtensionString("GL_OES_rgb8_rgba8"); | 526 AddExtensionString("GL_OES_rgb8_rgba8"); |
| 525 validators_.render_buffer_format.AddValue(GL_RGB8_OES); | 527 validators_.render_buffer_format.AddValue(GL_RGB8_OES); |
| 526 validators_.render_buffer_format.AddValue(GL_RGBA8_OES); | 528 validators_.render_buffer_format.AddValue(GL_RGBA8_OES); |
| 527 } | 529 } |
| 528 | 530 |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 if (pos == std::string::npos) { | 1133 if (pos == std::string::npos) { |
| 1132 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1134 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 1133 } | 1135 } |
| 1134 } | 1136 } |
| 1135 | 1137 |
| 1136 FeatureInfo::~FeatureInfo() { | 1138 FeatureInfo::~FeatureInfo() { |
| 1137 } | 1139 } |
| 1138 | 1140 |
| 1139 } // namespace gles2 | 1141 } // namespace gles2 |
| 1140 } // namespace gpu | 1142 } // namespace gpu |
| OLD | NEW |