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

Side by Side Diff: ui/gl/gl_version_info.cc

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y Created 5 years, 5 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 | « ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/gl/gl_version_info.h" 5 #include "ui/gl/gl_version_info.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/strings/string_tokenizer.h" 8 #include "base/strings/string_tokenizer.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 is_angle(false), 43 is_angle(false),
44 major_version(0), 44 major_version(0),
45 minor_version(0), 45 minor_version(0),
46 is_es3(false), 46 is_es3(false),
47 is_desktop_core_profile(false) { 47 is_desktop_core_profile(false) {
48 if (version_str) { 48 if (version_str) {
49 ParseVersionString(version_str, &major_version, &minor_version, 49 ParseVersionString(version_str, &major_version, &minor_version,
50 &is_es, &is_es3); 50 &is_es, &is_es3);
51 } 51 }
52 if (renderer_str) { 52 if (renderer_str) {
53 is_angle = base::StartsWithASCII(renderer_str, "ANGLE", true); 53 is_angle = base::StartsWith(renderer_str, "ANGLE",
54 base::CompareCase::SENSITIVE);
54 } 55 }
55 } 56 }
56 57
57 void GLVersionInfo::ParseVersionString(const char* version_str, 58 void GLVersionInfo::ParseVersionString(const char* version_str,
58 unsigned* major_version, 59 unsigned* major_version,
59 unsigned* minor_version, 60 unsigned* minor_version,
60 bool* is_es, 61 bool* is_es,
61 bool* is_es3) { 62 bool* is_es3) {
62 // Make sure the outputs are always initialized. 63 // Make sure the outputs are always initialized.
63 *major_version = 0; 64 *major_version = 0;
(...skipping 14 matching lines...) Expand all
78 if (tokenizer.GetNext() && 79 if (tokenizer.GetNext() &&
79 base::StringToUint(tokenizer.token_piece(), &minor)) { 80 base::StringToUint(tokenizer.token_piece(), &minor)) {
80 *minor_version = minor; 81 *minor_version = minor;
81 } 82 }
82 } 83 }
83 if (*is_es && *major_version == 3) 84 if (*is_es && *major_version == 3)
84 *is_es3 = true; 85 *is_es3 = true;
85 } 86 }
86 87
87 } // namespace gfx 88 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698