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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
464 bool enable_immutable_texture_format_bgra_on_es3 = | 464 bool enable_immutable_texture_format_bgra_on_es3 = |
465 extensions.Contains("GL_APPLE_texture_format_BGRA8888"); | 465 extensions.Contains("GL_APPLE_texture_format_BGRA8888"); |
466 | 466 |
467 // Check if we should allow GL_EXT_texture_format_BGRA8888 | 467 // Check if we should allow GL_EXT_texture_format_BGRA8888 |
468 if (extensions.Contains("GL_EXT_texture_format_BGRA8888") || | 468 if (extensions.Contains("GL_EXT_texture_format_BGRA8888") || |
469 enable_immutable_texture_format_bgra_on_es3 || | 469 enable_immutable_texture_format_bgra_on_es3 || |
470 extensions.Contains("GL_EXT_bgra")) { | 470 extensions.Contains("GL_EXT_bgra")) { |
471 enable_texture_format_bgra8888 = true; | 471 enable_texture_format_bgra8888 = true; |
472 } | 472 } |
473 | 473 |
474 if (extensions.Contains("GL_EXT_bgra")) { | 474 // Only desktop GL and ANGLE guarantee that we can allocate a renderbuffer |
vmiura
2015/02/25 00:44:13
nit: Could you clarify the comment to say "Only de
| |
475 // with this format. | |
476 if (extensions.Contains("GL_EXT_bgra") || gl_version_info_->is_angle) { | |
475 enable_render_buffer_bgra = true; | 477 enable_render_buffer_bgra = true; |
476 } | 478 } |
477 | 479 |
478 if (extensions.Contains("GL_EXT_read_format_bgra") || | 480 if (extensions.Contains("GL_EXT_read_format_bgra") || |
479 extensions.Contains("GL_EXT_bgra")) { | 481 extensions.Contains("GL_EXT_bgra")) { |
480 enable_read_format_bgra = true; | 482 enable_read_format_bgra = true; |
481 } | 483 } |
482 | 484 |
483 if (enable_texture_format_bgra8888) { | 485 if (enable_texture_format_bgra8888) { |
484 feature_flags_.ext_texture_format_bgra8888 = true; | 486 feature_flags_.ext_texture_format_bgra8888 = true; |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1044 if (pos == std::string::npos) { | 1046 if (pos == std::string::npos) { |
1045 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1047 extensions_ += (extensions_.empty() ? "" : " ") + str; |
1046 } | 1048 } |
1047 } | 1049 } |
1048 | 1050 |
1049 FeatureInfo::~FeatureInfo() { | 1051 FeatureInfo::~FeatureInfo() { |
1050 } | 1052 } |
1051 | 1053 |
1052 } // namespace gles2 | 1054 } // namespace gles2 |
1053 } // namespace gpu | 1055 } // namespace gpu |
OLD | NEW |