| 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/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 if (has_pixel_buffers && ui_gl_fence_works && | 671 if (has_pixel_buffers && ui_gl_fence_works && |
| 672 !workarounds_.disable_async_readpixels) { | 672 !workarounds_.disable_async_readpixels) { |
| 673 feature_flags_.use_async_readpixels = true; | 673 feature_flags_.use_async_readpixels = true; |
| 674 } | 674 } |
| 675 | 675 |
| 676 if (is_es3 || extensions.Contains("GL_ARB_sampler_objects")) { | 676 if (is_es3 || extensions.Contains("GL_ARB_sampler_objects")) { |
| 677 feature_flags_.enable_samplers = true; | 677 feature_flags_.enable_samplers = true; |
| 678 // TODO(dsinclair): Add AddExtensionString("GL_CHROMIUM_sampler_objects") | 678 // TODO(dsinclair): Add AddExtensionString("GL_CHROMIUM_sampler_objects") |
| 679 // when available. | 679 // when available. |
| 680 } | 680 } |
| 681 |
| 682 if (is_es3) { |
| 683 // DiscardFramebufferEXT is automatically bound to InvalidateFramebuffer. |
| 684 AddExtensionString("GL_EXT_discard_framebuffer"); |
| 685 } |
| 681 } | 686 } |
| 682 | 687 |
| 683 void FeatureInfo::AddExtensionString(const std::string& str) { | 688 void FeatureInfo::AddExtensionString(const std::string& str) { |
| 684 if (extensions_.find(str) == std::string::npos) { | 689 if (extensions_.find(str) == std::string::npos) { |
| 685 extensions_ += (extensions_.empty() ? "" : " ") + str; | 690 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 686 } | 691 } |
| 687 } | 692 } |
| 688 | 693 |
| 689 FeatureInfo::~FeatureInfo() { | 694 FeatureInfo::~FeatureInfo() { |
| 690 } | 695 } |
| 691 | 696 |
| 692 } // namespace gles2 | 697 } // namespace gles2 |
| 693 } // namespace gpu | 698 } // namespace gpu |
| OLD | NEW |