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/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "gpu/command_buffer/service/gl_utils.h" | 10 #include "gpu/command_buffer/service/gl_utils.h" |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 #if defined(OS_MACOSX) | 380 #if defined(OS_MACOSX) |
381 if (IOSurfaceSupport::Initialize()) { | 381 if (IOSurfaceSupport::Initialize()) { |
382 AddExtensionString("GL_CHROMIUM_iosurface"); | 382 AddExtensionString("GL_CHROMIUM_iosurface"); |
383 } | 383 } |
384 #endif | 384 #endif |
385 | 385 |
386 // TODO(gman): Add support for these extensions. | 386 // TODO(gman): Add support for these extensions. |
387 // GL_OES_depth32 | 387 // GL_OES_depth32 |
388 // GL_OES_element_index_uint | 388 // GL_OES_element_index_uint |
389 | 389 |
390 feature_flags_.enable_texture_float_linear = enable_texture_float_linear; | 390 feature_flags_.enable_texture_float_linear |= enable_texture_float_linear; |
391 feature_flags_.enable_texture_half_float_linear = | 391 feature_flags_.enable_texture_half_float_linear |= |
392 enable_texture_half_float_linear; | 392 enable_texture_half_float_linear; |
393 feature_flags_.npot_ok = npot_ok; | 393 feature_flags_.npot_ok |= npot_ok; |
394 | 394 |
395 if (ext.HaveAndDesire("GL_CHROMIUM_post_sub_buffer")) { | 395 if (ext.HaveAndDesire("GL_CHROMIUM_post_sub_buffer")) { |
396 AddExtensionString("GL_CHROMIUM_post_sub_buffer"); | 396 AddExtensionString("GL_CHROMIUM_post_sub_buffer"); |
397 } | 397 } |
398 | 398 |
399 if (ext.HaveAndDesire("GL_CHROMIUM_front_buffer_cached")) { | 399 if (ext.HaveAndDesire("GL_CHROMIUM_front_buffer_cached")) { |
400 AddExtensionString("GL_CHROMIUM_front_buffer_cached"); | 400 AddExtensionString("GL_CHROMIUM_front_buffer_cached"); |
401 } | 401 } |
402 | 402 |
403 if (ext.Desire("GL_ANGLE_pack_reverse_row_order") && | 403 if (ext.Desire("GL_ANGLE_pack_reverse_row_order") && |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 } | 440 } |
441 | 441 |
442 void FeatureInfo::AddExtensionString(const std::string& str) { | 442 void FeatureInfo::AddExtensionString(const std::string& str) { |
443 if (extensions_.find(str) == std::string::npos) { | 443 if (extensions_.find(str) == std::string::npos) { |
444 extensions_ += (extensions_.empty() ? "" : " ") + str; | 444 extensions_ += (extensions_.empty() ? "" : " ") + str; |
445 } | 445 } |
446 } | 446 } |
447 | 447 |
448 } // namespace gles2 | 448 } // namespace gles2 |
449 } // namespace gpu | 449 } // namespace gpu |
OLD | NEW |