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/macros.h" | 10 #include "base/macros.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 StringSet(const std::string& str) { | 44 StringSet(const std::string& str) { |
45 Init(str); | 45 Init(str); |
46 } | 46 } |
47 | 47 |
48 void Init(const char* s) { | 48 void Init(const char* s) { |
49 std::string str(s ? s : ""); | 49 std::string str(s ? s : ""); |
50 Init(str); | 50 Init(str); |
51 } | 51 } |
52 | 52 |
53 void Init(const std::string& str) { | 53 void Init(const std::string& str) { |
54 std::vector<std::string> tokens; | 54 std::vector<std::string> tokens = base::SplitString( |
55 Tokenize(str, " ", &tokens); | 55 str, " ", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY); |
56 string_set_.insert(tokens.begin(), tokens.end()); | 56 string_set_.insert(tokens.begin(), tokens.end()); |
57 } | 57 } |
58 | 58 |
59 bool Contains(const char* s) { | 59 bool Contains(const char* s) { |
60 return string_set_.find(s) != string_set_.end(); | 60 return string_set_.find(s) != string_set_.end(); |
61 } | 61 } |
62 | 62 |
63 bool Contains(const std::string& s) { | 63 bool Contains(const std::string& s) { |
64 return string_set_.find(s) != string_set_.end(); | 64 return string_set_.find(s) != string_set_.end(); |
65 } | 65 } |
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1153 if (pos == std::string::npos) { | 1153 if (pos == std::string::npos) { |
1154 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1154 extensions_ += (extensions_.empty() ? "" : " ") + str; |
1155 } | 1155 } |
1156 } | 1156 } |
1157 | 1157 |
1158 FeatureInfo::~FeatureInfo() { | 1158 FeatureInfo::~FeatureInfo() { |
1159 } | 1159 } |
1160 | 1160 |
1161 } // namespace gles2 | 1161 } // namespace gles2 |
1162 } // namespace gpu | 1162 } // namespace gpu |
OLD | NEW |