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

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

Issue 240273006: Revert of gpu: Add CHROMIUM_sync_query extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 if (workarounds->max_cube_map_texture_size_limit_512) 96 if (workarounds->max_cube_map_texture_size_limit_512)
97 workarounds->max_cube_map_texture_size = 512; 97 workarounds->max_cube_map_texture_size = 512;
98 } 98 }
99 99
100 } // anonymous namespace. 100 } // anonymous namespace.
101 101
102 FeatureInfo::FeatureFlags::FeatureFlags() 102 FeatureInfo::FeatureFlags::FeatureFlags()
103 : chromium_color_buffer_float_rgba(false), 103 : chromium_color_buffer_float_rgba(false),
104 chromium_color_buffer_float_rgb(false), 104 chromium_color_buffer_float_rgb(false),
105 chromium_framebuffer_multisample(false), 105 chromium_framebuffer_multisample(false),
106 chromium_sync_query(false),
107 use_core_framebuffer_multisample(false), 106 use_core_framebuffer_multisample(false),
108 multisampled_render_to_texture(false), 107 multisampled_render_to_texture(false),
109 use_img_for_multisampled_render_to_texture(false), 108 use_img_for_multisampled_render_to_texture(false),
110 oes_standard_derivatives(false), 109 oes_standard_derivatives(false),
111 oes_egl_image_external(false), 110 oes_egl_image_external(false),
112 oes_depth24(false), 111 oes_depth24(false),
113 oes_compressed_etc1_rgb8_texture(false), 112 oes_compressed_etc1_rgb8_texture(false),
114 packed_depth24_stencil8(false), 113 packed_depth24_stencil8(false),
115 npot_ok(false), 114 npot_ok(false),
116 enable_texture_float_linear(false), 115 enable_texture_float_linear(false),
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 // TODO(dsinclair): Add AddExtensionString("GL_CHROMIUM_sampler_objects") 770 // TODO(dsinclair): Add AddExtensionString("GL_CHROMIUM_sampler_objects")
772 // when available. 771 // when available.
773 } 772 }
774 773
775 if ((is_es3 || extensions.Contains("GL_EXT_discard_framebuffer")) && 774 if ((is_es3 || extensions.Contains("GL_EXT_discard_framebuffer")) &&
776 !workarounds_.disable_ext_discard_framebuffer) { 775 !workarounds_.disable_ext_discard_framebuffer) {
777 // DiscardFramebufferEXT is automatically bound to InvalidateFramebuffer. 776 // DiscardFramebufferEXT is automatically bound to InvalidateFramebuffer.
778 AddExtensionString("GL_EXT_discard_framebuffer"); 777 AddExtensionString("GL_EXT_discard_framebuffer");
779 feature_flags_.ext_discard_framebuffer = true; 778 feature_flags_.ext_discard_framebuffer = true;
780 } 779 }
781
782 if (ui_gl_fence_works) {
783 AddExtensionString("GL_CHROMIUM_sync_query");
784 feature_flags_.chromium_sync_query = true;
785 }
786 } 780 }
787 781
788 void FeatureInfo::AddExtensionString(const std::string& str) { 782 void FeatureInfo::AddExtensionString(const std::string& str) {
789 size_t pos = extensions_.find(str); 783 size_t pos = extensions_.find(str);
790 while (pos != std::string::npos && 784 while (pos != std::string::npos &&
791 pos + str.length() < extensions_.length() && 785 pos + str.length() < extensions_.length() &&
792 extensions_.substr(pos + str.length(), 1) != " ") { 786 extensions_.substr(pos + str.length(), 1) != " ") {
793 // This extension name is a substring of another. 787 // This extension name is a substring of another.
794 pos = extensions_.find(str, pos + str.length()); 788 pos = extensions_.find(str, pos + str.length());
795 } 789 }
796 if (pos == std::string::npos) { 790 if (pos == std::string::npos) {
797 extensions_ += (extensions_.empty() ? "" : " ") + str; 791 extensions_ += (extensions_.empty() ? "" : " ") + str;
798 } 792 }
799 } 793 }
800 794
801 FeatureInfo::~FeatureInfo() { 795 FeatureInfo::~FeatureInfo() {
802 } 796 }
803 797
804 } // namespace gles2 798 } // namespace gles2
805 } // namespace gpu 799 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.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