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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 enable_texture_format_bgra8888 = true; | 520 enable_texture_format_bgra8888 = true; |
521 } | 521 } |
522 | 522 |
523 // Only desktop GL extension GL_EXT_bgra or ANGLE guarantee that we can | 523 // Only desktop GL extension GL_EXT_bgra or ANGLE guarantee that we can |
524 // allocate a renderbuffer with this format. | 524 // allocate a renderbuffer with this format. |
525 if (extensions.Contains("GL_EXT_bgra") || gl_version_info_->is_angle) { | 525 if (extensions.Contains("GL_EXT_bgra") || gl_version_info_->is_angle) { |
526 enable_render_buffer_bgra = true; | 526 enable_render_buffer_bgra = true; |
527 } | 527 } |
528 | 528 |
529 if (extensions.Contains("GL_EXT_read_format_bgra") || | 529 if (extensions.Contains("GL_EXT_read_format_bgra") || |
530 extensions.Contains("GL_EXT_bgra")) { | 530 extensions.Contains("GL_EXT_bgra") || |
| 531 workarounds_.support_bgra_color_read_format) { |
531 enable_read_format_bgra = true; | 532 enable_read_format_bgra = true; |
532 } | 533 } |
533 | 534 |
534 if (enable_texture_format_bgra8888) { | 535 if (enable_texture_format_bgra8888) { |
535 feature_flags_.ext_texture_format_bgra8888 = true; | 536 feature_flags_.ext_texture_format_bgra8888 = true; |
536 AddExtensionString("GL_EXT_texture_format_BGRA8888"); | 537 AddExtensionString("GL_EXT_texture_format_BGRA8888"); |
537 texture_format_validators_[GL_BGRA_EXT].AddValue(GL_UNSIGNED_BYTE); | 538 texture_format_validators_[GL_BGRA_EXT].AddValue(GL_UNSIGNED_BYTE); |
538 validators_.texture_internal_format.AddValue(GL_BGRA_EXT); | 539 validators_.texture_internal_format.AddValue(GL_BGRA_EXT); |
539 validators_.texture_format.AddValue(GL_BGRA_EXT); | 540 validators_.texture_format.AddValue(GL_BGRA_EXT); |
540 } | 541 } |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1132 if (pos == std::string::npos) { | 1133 if (pos == std::string::npos) { |
1133 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1134 extensions_ += (extensions_.empty() ? "" : " ") + str; |
1134 } | 1135 } |
1135 } | 1136 } |
1136 | 1137 |
1137 FeatureInfo::~FeatureInfo() { | 1138 FeatureInfo::~FeatureInfo() { |
1138 } | 1139 } |
1139 | 1140 |
1140 } // namespace gles2 | 1141 } // namespace gles2 |
1141 } // namespace gpu | 1142 } // namespace gpu |
OLD | NEW |