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

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

Issue 1013463003: Update from https://crrev.com/320931 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « gpu/command_buffer/service/BUILD.gn ('k') | gpu/command_buffer/service/gl_context_virtual.h » ('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/macros.h" 10 #include "base/macros.h"
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 // TODO(zmo): For experimentation purpose on MacOSX with core profile, 1063 // TODO(zmo): For experimentation purpose on MacOSX with core profile,
1064 // allow 3.2 or plus for now. 1064 // allow 3.2 or plus for now.
1065 if (gl_version_info_->IsAtLeastGL(3, 2)) 1065 if (gl_version_info_->IsAtLeastGL(3, 2))
1066 return true; 1066 return true;
1067 #endif 1067 #endif
1068 return false; 1068 return false;
1069 } 1069 }
1070 1070
1071 void FeatureInfo::EnableES3Validators() { 1071 void FeatureInfo::EnableES3Validators() {
1072 DCHECK(IsES3Capable()); 1072 DCHECK(IsES3Capable());
1073 validators_.AddES3Values(); 1073 validators_.UpdateValuesES3();
1074 } 1074 }
1075 1075
1076 void FeatureInfo::AddExtensionString(const char* s) { 1076 void FeatureInfo::AddExtensionString(const char* s) {
1077 std::string str(s); 1077 std::string str(s);
1078 size_t pos = extensions_.find(str); 1078 size_t pos = extensions_.find(str);
1079 while (pos != std::string::npos && 1079 while (pos != std::string::npos &&
1080 pos + str.length() < extensions_.length() && 1080 pos + str.length() < extensions_.length() &&
1081 extensions_.substr(pos + str.length(), 1) != " ") { 1081 extensions_.substr(pos + str.length(), 1) != " ") {
1082 // This extension name is a substring of another. 1082 // This extension name is a substring of another.
1083 pos = extensions_.find(str, pos + str.length()); 1083 pos = extensions_.find(str, pos + str.length());
1084 } 1084 }
1085 if (pos == std::string::npos) { 1085 if (pos == std::string::npos) {
1086 extensions_ += (extensions_.empty() ? "" : " ") + str; 1086 extensions_ += (extensions_.empty() ? "" : " ") + str;
1087 } 1087 }
1088 } 1088 }
1089 1089
1090 FeatureInfo::~FeatureInfo() { 1090 FeatureInfo::~FeatureInfo() {
1091 } 1091 }
1092 1092
1093 } // namespace gles2 1093 } // namespace gles2
1094 } // namespace gpu 1094 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/BUILD.gn ('k') | gpu/command_buffer/service/gl_context_virtual.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698