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

Unified Diff: ui/gl/gl_version_info.h

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl_surface_x11.cc ('k') | ui/gl/gl_version_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_version_info.h
diff --git a/ui/gl/gl_version_info.h b/ui/gl/gl_version_info.h
index 21ca07aad5267eaf3f8a4828c0ac4862c4fdce54..d8f27308b9bb5bb4e3d29b6312a2cb95b6836f56 100644
--- a/ui/gl/gl_version_info.h
+++ b/ui/gl/gl_version_info.h
@@ -14,19 +14,21 @@ namespace gfx {
struct GL_EXPORT GLVersionInfo {
GLVersionInfo(const char* version_str, const char* renderer_str);
- // New flags, such as is_gl4_4 could be introduced as needed.
- // For now, this level of granularity is enough.
- bool is_es;
- bool is_es1;
- bool is_es2;
- bool is_es3;
+ bool IsAtLeastGL(unsigned major, unsigned minor) const {
+ return !is_es && (major_version > major ||
+ (major_version == major && minor_version >= minor));
+ }
- bool is_gl1;
- bool is_gl2;
- bool is_gl3;
- bool is_gl4;
+ bool IsAtLeastGLES(unsigned major, unsigned minor) const {
+ return is_es && (major_version > major ||
+ (major_version == major && minor_version >= minor));
+ }
+ bool is_es;
bool is_angle;
+ unsigned major_version;
+ unsigned minor_version;
+ bool is_es3;
private:
DISALLOW_COPY_AND_ASSIGN(GLVersionInfo);
« no previous file with comments | « ui/gl/gl_surface_x11.cc ('k') | ui/gl/gl_version_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698