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

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

Issue 1135943002: Pull in various gpu/command_buffer fixes from chromium (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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_context_stub_with_extensions.cc ('k') | ui/gl/gpu_timing.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 #ifndef UI_GL_GL_VERSION_INFO_H_ 5 #ifndef UI_GL_GL_VERSION_INFO_H_
6 #define UI_GL_GL_VERSION_INFO_H_ 6 #define UI_GL_GL_VERSION_INFO_H_
7 7
8 #include <string> 8 #include <string>
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "ui/gl/gl_export.h" 10 #include "ui/gl/gl_export.h"
11 11
12 namespace gfx { 12 namespace gfx {
13 13
14 struct GL_EXPORT GLVersionInfo { 14 struct GL_EXPORT GLVersionInfo {
15 GLVersionInfo(const char* version_str, const char* renderer_str); 15 GLVersionInfo(const char* version_str, const char* renderer_str);
16 16
17 bool IsAtLeastGL(unsigned major, unsigned minor) const { 17 bool IsAtLeastGL(unsigned major, unsigned minor) const {
18 return !is_es && (major_version > major || 18 return !is_es && (major_version > major ||
19 (major_version == major && minor_version >= minor)); 19 (major_version == major && minor_version >= minor));
20 } 20 }
21 21
22 bool IsLowerThanGL(unsigned major, unsigned minor) const {
23 return !is_es && (major_version < major ||
24 (major_version == major && minor_version < minor));
25 }
26
22 bool IsAtLeastGLES(unsigned major, unsigned minor) const { 27 bool IsAtLeastGLES(unsigned major, unsigned minor) const {
23 return is_es && (major_version > major || 28 return is_es && (major_version > major ||
24 (major_version == major && minor_version >= minor)); 29 (major_version == major && minor_version >= minor));
25 } 30 }
26 31
27 bool is_es; 32 bool is_es;
28 bool is_angle; 33 bool is_angle;
29 unsigned major_version; 34 unsigned major_version;
30 unsigned minor_version; 35 unsigned minor_version;
31 bool is_es3; 36 bool is_es3;
32 37
33 private: 38 private:
34 DISALLOW_COPY_AND_ASSIGN(GLVersionInfo); 39 DISALLOW_COPY_AND_ASSIGN(GLVersionInfo);
35 }; 40 };
36 41
37 } // namespace gfx 42 } // namespace gfx
38 43
39 #endif // UI_GL_GL_VERSION_INFO_H_ 44 #endif // UI_GL_GL_VERSION_INFO_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_context_stub_with_extensions.cc ('k') | ui/gl/gpu_timing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698