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

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

Issue 2175673003: WebGL 2: Fix nits when check vertexAttrib type with variable type in vertex shader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 1426
1427 bool FeatureInfo::IsWebGL2OrES3Context() const { 1427 bool FeatureInfo::IsWebGL2OrES3Context() const {
1428 // Switch statement to cause a compile-time error if we miss a case. 1428 // Switch statement to cause a compile-time error if we miss a case.
1429 switch (context_type_) { 1429 switch (context_type_) {
1430 case CONTEXT_TYPE_WEBGL2: 1430 case CONTEXT_TYPE_WEBGL2:
1431 case CONTEXT_TYPE_OPENGLES3: 1431 case CONTEXT_TYPE_OPENGLES3:
1432 return true; 1432 return true;
1433 case CONTEXT_TYPE_WEBGL1: 1433 case CONTEXT_TYPE_WEBGL1:
1434 case CONTEXT_TYPE_OPENGLES2: 1434 case CONTEXT_TYPE_OPENGLES2:
1435 return false; 1435 return false;
1436 default:
1437 NOTREACHED();
1438 return false;
1439 } 1436 }
1437
1438 NOTREACHED();
1439 return false;
1440 } 1440 }
1441 1441
1442 void FeatureInfo::AddExtensionString(const char* s) { 1442 void FeatureInfo::AddExtensionString(const char* s) {
1443 std::string str(s); 1443 std::string str(s);
1444 size_t pos = extensions_.find(str); 1444 size_t pos = extensions_.find(str);
1445 while (pos != std::string::npos && 1445 while (pos != std::string::npos &&
1446 pos + str.length() < extensions_.length() && 1446 pos + str.length() < extensions_.length() &&
1447 extensions_.substr(pos + str.length(), 1) != " ") { 1447 extensions_.substr(pos + str.length(), 1) != " ") {
1448 // This extension name is a substring of another. 1448 // This extension name is a substring of another.
1449 pos = extensions_.find(str, pos + str.length()); 1449 pos = extensions_.find(str, pos + str.length());
1450 } 1450 }
1451 if (pos == std::string::npos) { 1451 if (pos == std::string::npos) {
1452 extensions_ += (extensions_.empty() ? "" : " ") + str; 1452 extensions_ += (extensions_.empty() ? "" : " ") + str;
1453 } 1453 }
1454 } 1454 }
1455 1455
1456 FeatureInfo::~FeatureInfo() { 1456 FeatureInfo::~FeatureInfo() {
1457 } 1457 }
1458 1458
1459 } // namespace gles2 1459 } // namespace gles2
1460 } // namespace gpu 1460 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698