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

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

Issue 706173005: Enable asynchronous glReadPixels on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed DCHECK in set_chunk_size_multiple. Created 6 years, 1 month 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 <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 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 if (workarounds_.disable_egl_khr_wait_sync) { 851 if (workarounds_.disable_egl_khr_wait_sync) {
852 gfx::g_driver_egl.ext.b_EGL_KHR_wait_sync = false; 852 gfx::g_driver_egl.ext.b_EGL_KHR_wait_sync = false;
853 } 853 }
854 #endif 854 #endif
855 if (workarounds_.disable_arb_sync) 855 if (workarounds_.disable_arb_sync)
856 gfx::g_driver_gl.ext.b_GL_ARB_sync = false; 856 gfx::g_driver_gl.ext.b_GL_ARB_sync = false;
857 bool ui_gl_fence_works = gfx::GLFence::IsSupported(); 857 bool ui_gl_fence_works = gfx::GLFence::IsSupported();
858 UMA_HISTOGRAM_BOOLEAN("GPU.FenceSupport", ui_gl_fence_works); 858 UMA_HISTOGRAM_BOOLEAN("GPU.FenceSupport", ui_gl_fence_works);
859 859
860 feature_flags_.map_buffer_range = 860 feature_flags_.map_buffer_range =
861 is_es3 || extensions.Contains("GL_ARB_map_buffer_range"); 861 is_es3 || extensions.Contains("GL_ARB_map_buffer_range") ||
862 extensions.Contains("GL_EXT_map_buffer_range");
862 863
863 // Really it's part of core OpenGL 2.1 and up, but let's assume the 864 // Really it's part of core OpenGL 2.1 and up, but let's assume the
864 // extension is still advertised. 865 // extension is still advertised.
865 bool has_pixel_buffers = 866 bool has_pixel_buffers =
866 is_es3 || extensions.Contains("GL_ARB_pixel_buffer_object"); 867 is_es3 || extensions.Contains("GL_ARB_pixel_buffer_object") ||
868 extensions.Contains("GL_NV_pixel_buffer_object");
867 869
868 // We will use either glMapBuffer() or glMapBufferRange() for async readbacks. 870 // We will use either glMapBuffer() or glMapBufferRange() for async readbacks.
869 if (has_pixel_buffers && ui_gl_fence_works && 871 if (has_pixel_buffers && ui_gl_fence_works &&
870 !workarounds_.disable_async_readpixels) { 872 !workarounds_.disable_async_readpixels) {
871 feature_flags_.use_async_readpixels = true; 873 feature_flags_.use_async_readpixels = true;
872 } 874 }
873 875
874 if (is_es3 || extensions.Contains("GL_ARB_sampler_objects")) { 876 if (is_es3 || extensions.Contains("GL_ARB_sampler_objects")) {
875 feature_flags_.enable_samplers = true; 877 feature_flags_.enable_samplers = true;
876 // TODO(dsinclair): Add AddExtensionString("GL_CHROMIUM_sampler_objects") 878 // TODO(dsinclair): Add AddExtensionString("GL_CHROMIUM_sampler_objects")
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 if (pos == std::string::npos) { 947 if (pos == std::string::npos) {
946 extensions_ += (extensions_.empty() ? "" : " ") + str; 948 extensions_ += (extensions_.empty() ? "" : " ") + str;
947 } 949 }
948 } 950 }
949 951
950 FeatureInfo::~FeatureInfo() { 952 FeatureInfo::~FeatureInfo() {
951 } 953 }
952 954
953 } // namespace gles2 955 } // namespace gles2
954 } // namespace gpu 956 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/mapped_memory.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698