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

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

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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/gl/gl_version_info.h ('k') | ui/gl/gl_wgl_api_implementation.h » ('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 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
11 namespace { 11 namespace {
12 12
13 bool DesktopCoreCommonCheck( 13 bool DesktopCoreCommonCheck(
14 bool is_es, unsigned major_version, unsigned minor_version) { 14 bool is_es, unsigned major_version, unsigned minor_version) {
15 return (!is_es && 15 return (!is_es &&
16 ((major_version == 3 && minor_version >= 2) || 16 ((major_version == 3 && minor_version >= 2) ||
17 major_version > 3)); 17 major_version > 3));
18 } 18 }
19 19
20 } 20 }
21 21
22 22 namespace gl {
23 namespace gfx {
24 23
25 GLVersionInfo::GLVersionInfo(const char* version_str, const char* renderer_str, 24 GLVersionInfo::GLVersionInfo(const char* version_str, const char* renderer_str,
26 const char* extensions_str) 25 const char* extensions_str)
27 : GLVersionInfo(version_str, renderer_str) { 26 : GLVersionInfo(version_str, renderer_str) {
28 is_desktop_core_profile = 27 is_desktop_core_profile =
29 DesktopCoreCommonCheck(is_es, major_version, minor_version) && 28 DesktopCoreCommonCheck(is_es, major_version, minor_version) &&
30 !strstr(extensions_str, "GL_ARB_compatibility"); 29 !strstr(extensions_str, "GL_ARB_compatibility");
31 } 30 }
32 31
33 GLVersionInfo::GLVersionInfo(const char* version_str, const char* renderer_str, 32 GLVersionInfo::GLVersionInfo(const char* version_str, const char* renderer_str,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 *minor_version = minor; 83 *minor_version = minor;
85 } 84 }
86 } 85 }
87 if (*is_es && *major_version == 2) 86 if (*is_es && *major_version == 2)
88 *is_es2 = true; 87 *is_es2 = true;
89 if (*is_es && *major_version == 3) 88 if (*is_es && *major_version == 3)
90 *is_es3 = true; 89 *is_es3 = true;
91 DCHECK(major_version != 0); 90 DCHECK(major_version != 0);
92 } 91 }
93 92
94 } // namespace gfx 93 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_version_info.h ('k') | ui/gl/gl_wgl_api_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698