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); |