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

Side by Side Diff: gpu/config/gpu_control_list.cc

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress 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
OLDNEW
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 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 1003
1004 if (gl_version_info_.get() == NULL && gl_type_ == kGLTypeNone) 1004 if (gl_version_info_.get() == NULL && gl_type_ == kGLTypeNone)
1005 return false; 1005 return false;
1006 1006
1007 std::vector<std::string> segments; 1007 std::vector<std::string> segments;
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 number = segments[2]; 1013 bool full_match = RE2::FullMatch(segments[2], "([\\d.]+).*", &number);
1014 DCHECK(full_match);
1015
1014 gl_type = kGLTypeGLES; 1016 gl_type = kGLTypeGLES;
1015 if (segments.size() > 3 && 1017 if (segments.size() > 3 &&
1016 StartsWithASCII(segments[3], "(ANGLE", false)) { 1018 StartsWithASCII(segments[3], "(ANGLE", false)) {
1017 gl_type = kGLTypeANGLE; 1019 gl_type = kGLTypeANGLE;
1018 } 1020 }
1019 } else { 1021 } else {
1020 number = segments[0]; 1022 number = segments[0];
1021 gl_type = kGLTypeGL; 1023 gl_type = kGLTypeGL;
1022 } 1024 }
1023 1025
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1521 const std::string& feature_name, int feature_id) { 1523 const std::string& feature_name, int feature_id) {
1522 feature_map_[feature_name] = feature_id; 1524 feature_map_[feature_name] = feature_id;
1523 } 1525 }
1524 1526
1525 void GpuControlList::set_supports_feature_type_all(bool supported) { 1527 void GpuControlList::set_supports_feature_type_all(bool supported) {
1526 supports_feature_type_all_ = supported; 1528 supports_feature_type_all_ = supported;
1527 } 1529 }
1528 1530
1529 } // namespace gpu 1531 } // namespace gpu
1530 1532
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/shader_manager_unittest.cc ('k') | gpu/config/gpu_control_list_entry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698