Chromium Code Reviews| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 546 extensions.Contains("GL_EXT_sRGB")) || | 546 extensions.Contains("GL_EXT_sRGB")) || |
| 547 gfx::HasDesktopGLFeatures()) { | 547 gfx::HasDesktopGLFeatures()) { |
| 548 AddExtensionString("GL_EXT_sRGB"); | 548 AddExtensionString("GL_EXT_sRGB"); |
| 549 validators_.texture_internal_format.AddValue(GL_SRGB_EXT); | 549 validators_.texture_internal_format.AddValue(GL_SRGB_EXT); |
| 550 validators_.texture_internal_format.AddValue(GL_SRGB_ALPHA_EXT); | 550 validators_.texture_internal_format.AddValue(GL_SRGB_ALPHA_EXT); |
| 551 validators_.texture_format.AddValue(GL_SRGB_EXT); | 551 validators_.texture_format.AddValue(GL_SRGB_EXT); |
| 552 validators_.texture_format.AddValue(GL_SRGB_ALPHA_EXT); | 552 validators_.texture_format.AddValue(GL_SRGB_ALPHA_EXT); |
| 553 validators_.render_buffer_format.AddValue(GL_SRGB8_ALPHA8_EXT); | 553 validators_.render_buffer_format.AddValue(GL_SRGB8_ALPHA8_EXT); |
| 554 validators_.frame_buffer_parameter.AddValue( | 554 validators_.frame_buffer_parameter.AddValue( |
| 555 GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT); | 555 GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT); |
| 556 validators_.texture_unsized_internal_format.AddValue(GL_SRGB_ALPHA_EXT); | 556 if (context_type_ == CONTEXT_TYPE_WEBGL1 || |
| 557 context_type_ == CONTEXT_TYPE_OPENGLES2) { | |
|
Zhenyao Mo
2016/04/27 17:12:26
This should be part of the "if" condition in line
xinghua.cao
2016/04/28 09:59:27
Done.
| |
| 558 validators_.texture_unsized_internal_format.AddValue(GL_SRGB_EXT); | |
| 559 validators_.texture_unsized_internal_format.AddValue(GL_SRGB_ALPHA_EXT); | |
| 560 } | |
| 557 } | 561 } |
| 558 | 562 |
| 559 bool enable_texture_format_bgra8888 = false; | 563 bool enable_texture_format_bgra8888 = false; |
| 560 bool enable_read_format_bgra = false; | 564 bool enable_read_format_bgra = false; |
| 561 bool enable_render_buffer_bgra = false; | 565 bool enable_render_buffer_bgra = false; |
| 562 bool enable_immutable_texture_format_bgra_on_es3 = | 566 bool enable_immutable_texture_format_bgra_on_es3 = |
| 563 extensions.Contains("GL_APPLE_texture_format_BGRA8888"); | 567 extensions.Contains("GL_APPLE_texture_format_BGRA8888"); |
| 564 | 568 |
| 565 // Check if we should allow GL_EXT_texture_format_BGRA8888. | 569 // Check if we should allow GL_EXT_texture_format_BGRA8888. |
| 566 if (extensions.Contains("GL_EXT_texture_format_BGRA8888") || | 570 if (extensions.Contains("GL_EXT_texture_format_BGRA8888") || |
| (...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1367 if (pos == std::string::npos) { | 1371 if (pos == std::string::npos) { |
| 1368 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1372 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 1369 } | 1373 } |
| 1370 } | 1374 } |
| 1371 | 1375 |
| 1372 FeatureInfo::~FeatureInfo() { | 1376 FeatureInfo::~FeatureInfo() { |
| 1373 } | 1377 } |
| 1374 | 1378 |
| 1375 } // namespace gles2 | 1379 } // namespace gles2 |
| 1376 } // namespace gpu | 1380 } // namespace gpu |
| OLD | NEW |