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/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 FeatureInfo::Workarounds::Workarounds() | 87 FeatureInfo::Workarounds::Workarounds() |
88 : clear_alpha_in_readpixels(false), | 88 : clear_alpha_in_readpixels(false), |
89 needs_glsl_built_in_function_emulation(false), | 89 needs_glsl_built_in_function_emulation(false), |
90 needs_offscreen_buffer_workaround(false), | 90 needs_offscreen_buffer_workaround(false), |
91 reverse_point_sprite_coord_origin(false), | 91 reverse_point_sprite_coord_origin(false), |
92 set_texture_filter_before_generating_mipmap(false), | 92 set_texture_filter_before_generating_mipmap(false), |
93 use_current_program_after_successful_link(false), | 93 use_current_program_after_successful_link(false), |
94 restore_scissor_on_fbo_change(false), | 94 restore_scissor_on_fbo_change(false), |
95 flush_on_context_switch(false), | 95 flush_on_context_switch(false), |
96 delete_instead_of_resize_fbo(false), | 96 delete_instead_of_resize_fbo(false), |
| 97 // use_client_side_arrays_for_stream_buffers(false), |
| 98 use_client_side_arrays_for_stream_buffers(true), |
97 max_texture_size(0), | 99 max_texture_size(0), |
98 max_cube_map_texture_size(0) { | 100 max_cube_map_texture_size(0) { |
99 } | 101 } |
100 | 102 |
101 FeatureInfo::FeatureInfo() { | 103 FeatureInfo::FeatureInfo() { |
102 static const GLenum kAlphaTypes[] = { | 104 static const GLenum kAlphaTypes[] = { |
103 GL_UNSIGNED_BYTE, | 105 GL_UNSIGNED_BYTE, |
104 }; | 106 }; |
105 static const GLenum kRGBTypes[] = { | 107 static const GLenum kRGBTypes[] = { |
106 GL_UNSIGNED_BYTE, | 108 GL_UNSIGNED_BYTE, |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 validators_.pixel_type.AddValue(GL_UNSIGNED_INT_24_8); | 331 validators_.pixel_type.AddValue(GL_UNSIGNED_INT_24_8); |
330 } | 332 } |
331 validators_.render_buffer_format.AddValue(GL_DEPTH24_STENCIL8); | 333 validators_.render_buffer_format.AddValue(GL_DEPTH24_STENCIL8); |
332 } | 334 } |
333 | 335 |
334 if (extensions.Contains("GL_OES_vertex_array_object") || | 336 if (extensions.Contains("GL_OES_vertex_array_object") || |
335 extensions.Contains("GL_ARB_vertex_array_object") || | 337 extensions.Contains("GL_ARB_vertex_array_object") || |
336 extensions.Contains("GL_APPLE_vertex_array_object")) { | 338 extensions.Contains("GL_APPLE_vertex_array_object")) { |
337 feature_flags_.native_vertex_array_object = true; | 339 feature_flags_.native_vertex_array_object = true; |
338 } | 340 } |
| 341 // remove! |
| 342 feature_flags_.native_vertex_array_object = false; |
339 | 343 |
340 if (extensions.Contains("GL_OES_element_index_uint") || | 344 if (extensions.Contains("GL_OES_element_index_uint") || |
341 gfx::HasDesktopGLFeatures()) { | 345 gfx::HasDesktopGLFeatures()) { |
342 AddExtensionString("GL_OES_element_index_uint"); | 346 AddExtensionString("GL_OES_element_index_uint"); |
343 validators_.index_type.AddValue(GL_UNSIGNED_INT); | 347 validators_.index_type.AddValue(GL_UNSIGNED_INT); |
344 } | 348 } |
345 | 349 |
346 bool enable_texture_format_bgra8888 = false; | 350 bool enable_texture_format_bgra8888 = false; |
347 bool enable_read_format_bgra = false; | 351 bool enable_read_format_bgra = false; |
348 // Check if we should allow GL_EXT_texture_format_BGRA8888 | 352 // Check if we should allow GL_EXT_texture_format_BGRA8888 |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 if (extensions_.find(str) == std::string::npos) { | 658 if (extensions_.find(str) == std::string::npos) { |
655 extensions_ += (extensions_.empty() ? "" : " ") + str; | 659 extensions_ += (extensions_.empty() ? "" : " ") + str; |
656 } | 660 } |
657 } | 661 } |
658 | 662 |
659 FeatureInfo::~FeatureInfo() { | 663 FeatureInfo::~FeatureInfo() { |
660 } | 664 } |
661 | 665 |
662 } // namespace gles2 | 666 } // namespace gles2 |
663 } // namespace gpu | 667 } // namespace gpu |
OLD | NEW |