| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/config/gpu_control_list.h" | 5 #include "gpu/config/gpu_control_list.h" |
| 6 | 6 |
| 7 #include "base/cpu.h" | 7 #include "base/cpu.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1008 base::SplitString(gl_version, ' ', &segments); | 1008 base::SplitString(gl_version, ' ', &segments); |
| 1009 std::string number; | 1009 std::string number; |
| 1010 GLType gl_type = kGLTypeNone; | 1010 GLType gl_type = kGLTypeNone; |
| 1011 if (segments.size() > 2 && | 1011 if (segments.size() > 2 && |
| 1012 segments[0] == "OpenGL" && segments[1] == "ES") { | 1012 segments[0] == "OpenGL" && segments[1] == "ES") { |
| 1013 bool full_match = RE2::FullMatch(segments[2], "([\\d.]+).*", &number); | 1013 bool full_match = RE2::FullMatch(segments[2], "([\\d.]+).*", &number); |
| 1014 DCHECK(full_match); | 1014 DCHECK(full_match); |
| 1015 | 1015 |
| 1016 gl_type = kGLTypeGLES; | 1016 gl_type = kGLTypeGLES; |
| 1017 if (segments.size() > 3 && | 1017 if (segments.size() > 3 && |
| 1018 StartsWithASCII(segments[3], "(ANGLE", false)) { | 1018 base::StartsWithASCII(segments[3], "(ANGLE", false)) { |
| 1019 gl_type = kGLTypeANGLE; | 1019 gl_type = kGLTypeANGLE; |
| 1020 } | 1020 } |
| 1021 } else { | 1021 } else { |
| 1022 number = segments[0]; | 1022 number = segments[0]; |
| 1023 gl_type = kGLTypeGL; | 1023 gl_type = kGLTypeGL; |
| 1024 } | 1024 } |
| 1025 | 1025 |
| 1026 if (gl_type_ != kGLTypeNone && gl_type_ != gl_type) | 1026 if (gl_type_ != kGLTypeNone && gl_type_ != gl_type) |
| 1027 return true; | 1027 return true; |
| 1028 if (gl_version_info_.get() != NULL && !gl_version_info_->Contains(number)) | 1028 if (gl_version_info_.get() != NULL && !gl_version_info_->Contains(number)) |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1510 const std::string& feature_name, int feature_id) { | 1510 const std::string& feature_name, int feature_id) { |
| 1511 feature_map_[feature_name] = feature_id; | 1511 feature_map_[feature_name] = feature_id; |
| 1512 } | 1512 } |
| 1513 | 1513 |
| 1514 void GpuControlList::set_supports_feature_type_all(bool supported) { | 1514 void GpuControlList::set_supports_feature_type_all(bool supported) { |
| 1515 supports_feature_type_all_ = supported; | 1515 supports_feature_type_all_ = supported; |
| 1516 } | 1516 } |
| 1517 | 1517 |
| 1518 } // namespace gpu | 1518 } // namespace gpu |
| 1519 | 1519 |
| OLD | NEW |