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

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

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 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/program_manager.cc ('k') | gpu/config/gpu_info_collector_linux.cc » ('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) 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
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
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/program_manager.cc ('k') | gpu/config/gpu_info_collector_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698