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 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 // Rectangle textures are used as samplers via glBindTexture, framebuffer | 996 // Rectangle textures are used as samplers via glBindTexture, framebuffer |
997 // textures via glFramebufferTexture2D, and copy destinations via | 997 // textures via glFramebufferTexture2D, and copy destinations via |
998 // glCopyPixels. | 998 // glCopyPixels. |
999 validators_.texture_bind_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); | 999 validators_.texture_bind_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); |
1000 validators_.texture_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); | 1000 validators_.texture_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); |
1001 validators_.get_tex_param_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); | 1001 validators_.get_tex_param_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); |
1002 validators_.g_l_state.AddValue(GL_TEXTURE_BINDING_RECTANGLE_ARB); | 1002 validators_.g_l_state.AddValue(GL_TEXTURE_BINDING_RECTANGLE_ARB); |
1003 } | 1003 } |
1004 | 1004 |
1005 #if defined(OS_MACOSX) | 1005 #if defined(OS_MACOSX) |
1006 AddExtensionString("GL_CHROMIUM_iosurface"); | 1006 if (gfx::GetGLImplementation() != gfx::kGLImplementationOSMesaGL) { |
1007 AddExtensionString("GL_CHROMIUM_ycbcr_420v_image"); | 1007 AddExtensionString("GL_CHROMIUM_iosurface"); |
1008 feature_flags_.chromium_image_ycbcr_420v = true; | 1008 AddExtensionString("GL_CHROMIUM_ycbcr_420v_image"); |
| 1009 feature_flags_.chromium_image_ycbcr_420v = true; |
| 1010 } |
1009 #endif | 1011 #endif |
1010 | 1012 |
1011 if (extensions.Contains("GL_APPLE_ycbcr_422")) { | 1013 if (extensions.Contains("GL_APPLE_ycbcr_422")) { |
1012 AddExtensionString("GL_CHROMIUM_ycbcr_422_image"); | 1014 AddExtensionString("GL_CHROMIUM_ycbcr_422_image"); |
1013 feature_flags_.chromium_image_ycbcr_422 = true; | 1015 feature_flags_.chromium_image_ycbcr_422 = true; |
1014 } | 1016 } |
1015 | 1017 |
1016 // TODO(gman): Add support for these extensions. | 1018 // TODO(gman): Add support for these extensions. |
1017 // GL_OES_depth32 | 1019 // GL_OES_depth32 |
1018 | 1020 |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1427 if (pos == std::string::npos) { | 1429 if (pos == std::string::npos) { |
1428 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1430 extensions_ += (extensions_.empty() ? "" : " ") + str; |
1429 } | 1431 } |
1430 } | 1432 } |
1431 | 1433 |
1432 FeatureInfo::~FeatureInfo() { | 1434 FeatureInfo::~FeatureInfo() { |
1433 } | 1435 } |
1434 | 1436 |
1435 } // namespace gles2 | 1437 } // namespace gles2 |
1436 } // namespace gpu | 1438 } // namespace gpu |
OLD | NEW |