Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: gpu/command_buffer/service/feature_info.cc

Issue 2268993003: [Command Buffer] Coding style: FrameBuffer -> Framebuffer to be comformant (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 extensions.Contains("GL_OES_rgb8_rgba8")) && 562 extensions.Contains("GL_OES_rgb8_rgba8")) &&
563 extensions.Contains("GL_EXT_sRGB")) || 563 extensions.Contains("GL_EXT_sRGB")) ||
564 feature_flags_.desktop_srgb_support) && 564 feature_flags_.desktop_srgb_support) &&
565 IsWebGL1OrES2Context()) { 565 IsWebGL1OrES2Context()) {
566 AddExtensionString("GL_EXT_sRGB"); 566 AddExtensionString("GL_EXT_sRGB");
567 validators_.texture_internal_format.AddValue(GL_SRGB_EXT); 567 validators_.texture_internal_format.AddValue(GL_SRGB_EXT);
568 validators_.texture_internal_format.AddValue(GL_SRGB_ALPHA_EXT); 568 validators_.texture_internal_format.AddValue(GL_SRGB_ALPHA_EXT);
569 validators_.texture_format.AddValue(GL_SRGB_EXT); 569 validators_.texture_format.AddValue(GL_SRGB_EXT);
570 validators_.texture_format.AddValue(GL_SRGB_ALPHA_EXT); 570 validators_.texture_format.AddValue(GL_SRGB_ALPHA_EXT);
571 validators_.render_buffer_format.AddValue(GL_SRGB8_ALPHA8_EXT); 571 validators_.render_buffer_format.AddValue(GL_SRGB8_ALPHA8_EXT);
572 validators_.frame_buffer_parameter.AddValue( 572 validators_.framebuffer_parameter.AddValue(
573 GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT); 573 GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT);
574 validators_.texture_unsized_internal_format.AddValue(GL_SRGB_EXT); 574 validators_.texture_unsized_internal_format.AddValue(GL_SRGB_EXT);
575 validators_.texture_unsized_internal_format.AddValue(GL_SRGB_ALPHA_EXT); 575 validators_.texture_unsized_internal_format.AddValue(GL_SRGB_ALPHA_EXT);
576 } 576 }
577 577
578 // Note: Only APPLE_texture_format_BGRA8888 extension allows BGRA8_EXT in 578 // Note: Only APPLE_texture_format_BGRA8888 extension allows BGRA8_EXT in
579 // ES3's glTexStorage2D, whereas EXT_texture_format_BGRA8888 doesn't provide 579 // ES3's glTexStorage2D, whereas EXT_texture_format_BGRA8888 doesn't provide
580 // that compatibility. So if EXT_texture_format_BGRA8888 (but not 580 // that compatibility. So if EXT_texture_format_BGRA8888 (but not
581 // APPLE_texture_format_BGRA8888) is present on an underlying ES3 context, we 581 // APPLE_texture_format_BGRA8888) is present on an underlying ES3 context, we
582 // have to choose which one of BGRA vs texture storage we expose. 582 // have to choose which one of BGRA vs texture storage we expose.
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 gl_version_info_->is_es3 || 856 gl_version_info_->is_es3 ||
857 gl_version_info_->is_desktop_core_profile; 857 gl_version_info_->is_desktop_core_profile;
858 if (gl_version_info_->is_angle) { 858 if (gl_version_info_->is_angle) {
859 ext_has_multisample |= 859 ext_has_multisample |=
860 extensions.Contains("GL_ANGLE_framebuffer_multisample"); 860 extensions.Contains("GL_ANGLE_framebuffer_multisample");
861 } 861 }
862 feature_flags_.use_core_framebuffer_multisample = 862 feature_flags_.use_core_framebuffer_multisample =
863 gl_version_info_->is_es3 || gl_version_info_->is_desktop_core_profile; 863 gl_version_info_->is_es3 || gl_version_info_->is_desktop_core_profile;
864 if (ext_has_multisample) { 864 if (ext_has_multisample) {
865 feature_flags_.chromium_framebuffer_multisample = true; 865 feature_flags_.chromium_framebuffer_multisample = true;
866 validators_.frame_buffer_target.AddValue(GL_READ_FRAMEBUFFER_EXT); 866 validators_.framebuffer_target.AddValue(GL_READ_FRAMEBUFFER_EXT);
867 validators_.frame_buffer_target.AddValue(GL_DRAW_FRAMEBUFFER_EXT); 867 validators_.framebuffer_target.AddValue(GL_DRAW_FRAMEBUFFER_EXT);
868 validators_.g_l_state.AddValue(GL_READ_FRAMEBUFFER_BINDING_EXT); 868 validators_.g_l_state.AddValue(GL_READ_FRAMEBUFFER_BINDING_EXT);
869 validators_.g_l_state.AddValue(GL_MAX_SAMPLES_EXT); 869 validators_.g_l_state.AddValue(GL_MAX_SAMPLES_EXT);
870 validators_.render_buffer_parameter.AddValue(GL_RENDERBUFFER_SAMPLES_EXT); 870 validators_.render_buffer_parameter.AddValue(GL_RENDERBUFFER_SAMPLES_EXT);
871 AddExtensionString("GL_CHROMIUM_framebuffer_multisample"); 871 AddExtensionString("GL_CHROMIUM_framebuffer_multisample");
872 } 872 }
873 } 873 }
874 874
875 if (extensions.Contains("GL_EXT_multisampled_render_to_texture")) { 875 if (extensions.Contains("GL_EXT_multisampled_render_to_texture")) {
876 feature_flags_.multisampled_render_to_texture = true; 876 feature_flags_.multisampled_render_to_texture = true;
877 } else if (extensions.Contains("GL_IMG_multisampled_render_to_texture")) { 877 } else if (extensions.Contains("GL_IMG_multisampled_render_to_texture")) {
878 feature_flags_.multisampled_render_to_texture = true; 878 feature_flags_.multisampled_render_to_texture = true;
879 feature_flags_.use_img_for_multisampled_render_to_texture = true; 879 feature_flags_.use_img_for_multisampled_render_to_texture = true;
880 } 880 }
881 if (feature_flags_.multisampled_render_to_texture) { 881 if (feature_flags_.multisampled_render_to_texture) {
882 validators_.render_buffer_parameter.AddValue( 882 validators_.render_buffer_parameter.AddValue(
883 GL_RENDERBUFFER_SAMPLES_EXT); 883 GL_RENDERBUFFER_SAMPLES_EXT);
884 validators_.g_l_state.AddValue(GL_MAX_SAMPLES_EXT); 884 validators_.g_l_state.AddValue(GL_MAX_SAMPLES_EXT);
885 validators_.frame_buffer_parameter.AddValue( 885 validators_.framebuffer_parameter.AddValue(
886 GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT); 886 GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT);
887 AddExtensionString("GL_EXT_multisampled_render_to_texture"); 887 AddExtensionString("GL_EXT_multisampled_render_to_texture");
888 } 888 }
889 889
890 if (!gl_version_info_->is_es || 890 if (!gl_version_info_->is_es ||
891 extensions.Contains("GL_EXT_multisample_compatibility")) { 891 extensions.Contains("GL_EXT_multisample_compatibility")) {
892 AddExtensionString("GL_EXT_multisample_compatibility"); 892 AddExtensionString("GL_EXT_multisample_compatibility");
893 feature_flags_.ext_multisample_compatibility = true; 893 feature_flags_.ext_multisample_compatibility = true;
894 validators_.capability.AddValue(GL_MULTISAMPLE_EXT); 894 validators_.capability.AddValue(GL_MULTISAMPLE_EXT);
895 validators_.capability.AddValue(GL_SAMPLE_ALPHA_TO_ONE_EXT); 895 validators_.capability.AddValue(GL_SAMPLE_ALPHA_TO_ONE_EXT);
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 if (pos == std::string::npos) { 1464 if (pos == std::string::npos) {
1465 extensions_ += (extensions_.empty() ? "" : " ") + str; 1465 extensions_ += (extensions_.empty() ? "" : " ") + str;
1466 } 1466 }
1467 } 1467 }
1468 1468
1469 FeatureInfo::~FeatureInfo() { 1469 FeatureInfo::~FeatureInfo() {
1470 } 1470 }
1471 1471
1472 } // namespace gles2 1472 } // namespace gles2
1473 } // namespace gpu 1473 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698