| 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 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 AddExtensionString("GL_EXT_frag_depth"); | 788 AddExtensionString("GL_EXT_frag_depth"); |
| 789 feature_flags_.ext_frag_depth = true; | 789 feature_flags_.ext_frag_depth = true; |
| 790 } | 790 } |
| 791 | 791 |
| 792 if (extensions.Contains("GL_EXT_shader_texture_lod") || | 792 if (extensions.Contains("GL_EXT_shader_texture_lod") || |
| 793 gfx::HasDesktopGLFeatures()) { | 793 gfx::HasDesktopGLFeatures()) { |
| 794 AddExtensionString("GL_EXT_shader_texture_lod"); | 794 AddExtensionString("GL_EXT_shader_texture_lod"); |
| 795 feature_flags_.ext_shader_texture_lod = true; | 795 feature_flags_.ext_shader_texture_lod = true; |
| 796 } | 796 } |
| 797 | 797 |
| 798 bool egl_khr_fence_sync = false; |
| 799 #if !defined(OS_MACOSX) |
| 800 if (workarounds_.disable_egl_khr_fence_sync) { |
| 801 gfx::g_driver_egl.ext.b_EGL_KHR_fence_sync = false; |
| 802 } |
| 803 egl_khr_fence_sync = gfx::g_driver_egl.ext.b_EGL_KHR_fence_sync; |
| 804 #endif |
| 798 bool ui_gl_fence_works = is_es3 || extensions.Contains("GL_NV_fence") || | 805 bool ui_gl_fence_works = is_es3 || extensions.Contains("GL_NV_fence") || |
| 799 extensions.Contains("GL_ARB_sync") || | 806 extensions.Contains("GL_ARB_sync") || |
| 800 extensions.Contains("EGL_KHR_fence_sync"); | 807 egl_khr_fence_sync; |
| 801 UMA_HISTOGRAM_BOOLEAN("GPU.FenceSupport", ui_gl_fence_works); | 808 UMA_HISTOGRAM_BOOLEAN("GPU.FenceSupport", ui_gl_fence_works); |
| 802 | 809 |
| 803 feature_flags_.map_buffer_range = | 810 feature_flags_.map_buffer_range = |
| 804 is_es3 || extensions.Contains("GL_ARB_map_buffer_range"); | 811 is_es3 || extensions.Contains("GL_ARB_map_buffer_range"); |
| 805 | 812 |
| 806 // Really it's part of core OpenGL 2.1 and up, but let's assume the | 813 // Really it's part of core OpenGL 2.1 and up, but let's assume the |
| 807 // extension is still advertised. | 814 // extension is still advertised. |
| 808 bool has_pixel_buffers = | 815 bool has_pixel_buffers = |
| 809 is_es3 || extensions.Contains("GL_ARB_pixel_buffer_object"); | 816 is_es3 || extensions.Contains("GL_ARB_pixel_buffer_object"); |
| 810 | 817 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 if (pos == std::string::npos) { | 851 if (pos == std::string::npos) { |
| 845 extensions_ += (extensions_.empty() ? "" : " ") + str; | 852 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 846 } | 853 } |
| 847 } | 854 } |
| 848 | 855 |
| 849 FeatureInfo::~FeatureInfo() { | 856 FeatureInfo::~FeatureInfo() { |
| 850 } | 857 } |
| 851 | 858 |
| 852 } // namespace gles2 | 859 } // namespace gles2 |
| 853 } // namespace gpu | 860 } // namespace gpu |
| OLD | NEW |