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

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

Issue 23855003: gpu: Map glDiscardFramebufferEXT to glInvalidateFramebuffer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | ui/gl/generate_bindings.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
OLDNEW
« no previous file with comments | « no previous file | ui/gl/generate_bindings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698