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
3 // found in the LICENSE file.
5 #ifndef UI_GL_GL_VERSION_INFO_H_
6 #define UI_GL_GL_VERSION_INFO_H_
9 #include "base/basictypes.h"
10 #include "ui/gl/gl_export.h"
14 struct GL_EXPORT GLVersionInfo
{
15 GLVersionInfo(const char* version_str
, const char* renderer_str
);
17 bool IsAtLeastGL(unsigned major
, unsigned minor
) const {
18 return !is_es
&& (major_version
> major
||
19 (major_version
== major
&& minor_version
>= minor
));
22 bool IsAtLeastGLES(unsigned major
, unsigned minor
) const {
23 return is_es
&& (major_version
> major
||
24 (major_version
== major
&& minor_version
>= minor
));
29 unsigned major_version
;
30 unsigned minor_version
;
34 DISALLOW_COPY_AND_ASSIGN(GLVersionInfo
);
39 #endif // UI_GL_GL_VERSION_INFO_H_