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 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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; | 798 bool egl_khr_fence_sync = false; |
799 #if !defined(OS_MACOSX) | 799 #if !defined(OS_MACOSX) |
800 if (workarounds_.disable_egl_khr_fence_sync) { | 800 if (workarounds_.disable_egl_khr_fence_sync) { |
801 gfx::g_driver_egl.ext.b_EGL_KHR_fence_sync = false; | 801 gfx::g_driver_egl.ext.b_EGL_KHR_fence_sync = false; |
802 } | 802 } |
803 egl_khr_fence_sync = gfx::g_driver_egl.ext.b_EGL_KHR_fence_sync; | 803 egl_khr_fence_sync = gfx::g_driver_egl.ext.b_EGL_KHR_fence_sync; |
804 #endif | 804 #endif |
| 805 if (workarounds_.disable_arb_sync) |
| 806 gfx::g_driver_gl.ext.b_GL_ARB_sync = false; |
805 bool ui_gl_fence_works = is_es3 || extensions.Contains("GL_NV_fence") || | 807 bool ui_gl_fence_works = is_es3 || extensions.Contains("GL_NV_fence") || |
806 extensions.Contains("GL_ARB_sync") || | 808 gfx::g_driver_gl.ext.b_GL_ARB_sync || |
807 egl_khr_fence_sync; | 809 egl_khr_fence_sync; |
808 UMA_HISTOGRAM_BOOLEAN("GPU.FenceSupport", ui_gl_fence_works); | 810 UMA_HISTOGRAM_BOOLEAN("GPU.FenceSupport", ui_gl_fence_works); |
809 | 811 |
810 feature_flags_.map_buffer_range = | 812 feature_flags_.map_buffer_range = |
811 is_es3 || extensions.Contains("GL_ARB_map_buffer_range"); | 813 is_es3 || extensions.Contains("GL_ARB_map_buffer_range"); |
812 | 814 |
813 // Really it's part of core OpenGL 2.1 and up, but let's assume the | 815 // Really it's part of core OpenGL 2.1 and up, but let's assume the |
814 // extension is still advertised. | 816 // extension is still advertised. |
815 bool has_pixel_buffers = | 817 bool has_pixel_buffers = |
816 is_es3 || extensions.Contains("GL_ARB_pixel_buffer_object"); | 818 is_es3 || extensions.Contains("GL_ARB_pixel_buffer_object"); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 if (pos == std::string::npos) { | 853 if (pos == std::string::npos) { |
852 extensions_ += (extensions_.empty() ? "" : " ") + str; | 854 extensions_ += (extensions_.empty() ? "" : " ") + str; |
853 } | 855 } |
854 } | 856 } |
855 | 857 |
856 FeatureInfo::~FeatureInfo() { | 858 FeatureInfo::~FeatureInfo() { |
857 } | 859 } |
858 | 860 |
859 } // namespace gles2 | 861 } // namespace gles2 |
860 } // namespace gpu | 862 } // namespace gpu |
OLD | NEW |