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

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

Issue 2021413003: Remove GL_CHROMIUM_iosurface extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 validators_.texture_internal_format_storage.AddValue( 954 validators_.texture_internal_format_storage.AddValue(
955 GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG); 955 GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG);
956 validators_.texture_internal_format_storage.AddValue( 956 validators_.texture_internal_format_storage.AddValue(
957 GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG); 957 GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG);
958 validators_.texture_internal_format_storage.AddValue( 958 validators_.texture_internal_format_storage.AddValue(
959 GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG); 959 GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG);
960 validators_.texture_internal_format_storage.AddValue( 960 validators_.texture_internal_format_storage.AddValue(
961 GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG); 961 GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG);
962 } 962 }
963 963
964 // Ideally we would only expose this extension on Mac OS X, to 964 // Ideally we would only expose this extension on Mac OS X, to support
965 // support GL_CHROMIUM_iosurface and the compositor. We don't want 965 // IOSurface backed textures. We don't want applications to start using it;
966 // applications to start using it; they should use ordinary non- 966 // they should use ordinary non-power-of-two textures. However, for unit
967 // power-of-two textures. However, for unit testing purposes we 967 // testing purposes we expose it on all supported platforms.
968 // expose it on all supported platforms.
969 if (extensions.Contains("GL_ARB_texture_rectangle") || 968 if (extensions.Contains("GL_ARB_texture_rectangle") ||
970 gl_version_info_->is_desktop_core_profile) { 969 gl_version_info_->is_desktop_core_profile) {
971 AddExtensionString("GL_ARB_texture_rectangle"); 970 AddExtensionString("GL_ARB_texture_rectangle");
972 feature_flags_.arb_texture_rectangle = true; 971 feature_flags_.arb_texture_rectangle = true;
973 // Rectangle textures are used as samplers via glBindTexture, framebuffer 972 // Rectangle textures are used as samplers via glBindTexture, framebuffer
974 // textures via glFramebufferTexture2D, and copy destinations via 973 // textures via glFramebufferTexture2D, and copy destinations via
975 // glCopyPixels. 974 // glCopyPixels.
976 validators_.texture_bind_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); 975 validators_.texture_bind_target.AddValue(GL_TEXTURE_RECTANGLE_ARB);
977 validators_.texture_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); 976 validators_.texture_target.AddValue(GL_TEXTURE_RECTANGLE_ARB);
978 validators_.get_tex_param_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); 977 validators_.get_tex_param_target.AddValue(GL_TEXTURE_RECTANGLE_ARB);
979 validators_.g_l_state.AddValue(GL_TEXTURE_BINDING_RECTANGLE_ARB); 978 validators_.g_l_state.AddValue(GL_TEXTURE_BINDING_RECTANGLE_ARB);
980 } 979 }
981 980
982 #if defined(OS_MACOSX) 981 #if defined(OS_MACOSX)
983 if (gl::GetGLImplementation() != gl::kGLImplementationOSMesaGL) { 982 if (gl::GetGLImplementation() != gl::kGLImplementationOSMesaGL) {
984 AddExtensionString("GL_CHROMIUM_iosurface");
985 AddExtensionString("GL_CHROMIUM_ycbcr_420v_image"); 983 AddExtensionString("GL_CHROMIUM_ycbcr_420v_image");
986 feature_flags_.chromium_image_ycbcr_420v = true; 984 feature_flags_.chromium_image_ycbcr_420v = true;
987 } 985 }
988 #endif 986 #endif
989 987
990 if (extensions.Contains("GL_APPLE_ycbcr_422")) { 988 if (extensions.Contains("GL_APPLE_ycbcr_422")) {
991 AddExtensionString("GL_CHROMIUM_ycbcr_422_image"); 989 AddExtensionString("GL_CHROMIUM_ycbcr_422_image");
992 feature_flags_.chromium_image_ycbcr_422 = true; 990 feature_flags_.chromium_image_ycbcr_422 = true;
993 } 991 }
994 992
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 if (pos == std::string::npos) { 1393 if (pos == std::string::npos) {
1396 extensions_ += (extensions_.empty() ? "" : " ") + str; 1394 extensions_ += (extensions_.empty() ? "" : " ") + str;
1397 } 1395 }
1398 } 1396 }
1399 1397
1400 FeatureInfo::~FeatureInfo() { 1398 FeatureInfo::~FeatureInfo() {
1401 } 1399 }
1402 1400
1403 } // namespace gles2 1401 } // namespace gles2
1404 } // namespace gpu 1402 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_ids_autogen.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698