OLD | NEW |
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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 bool IsAtLeastGLES(unsigned major, unsigned minor) const { | 33 bool IsAtLeastGLES(unsigned major, unsigned minor) const { |
34 return is_es && (major_version > major || | 34 return is_es && (major_version > major || |
35 (major_version == major && minor_version >= minor)); | 35 (major_version == major && minor_version >= minor)); |
36 } | 36 } |
37 | 37 |
38 bool BehavesLikeGLES() const { | 38 bool BehavesLikeGLES() const { |
39 return is_es || is_desktop_core_profile; | 39 return is_es || is_desktop_core_profile; |
40 } | 40 } |
41 | 41 |
| 42 bool SupportsFixedType() const { |
| 43 return is_es || IsAtLeastGL(4, 1); |
| 44 } |
| 45 |
42 static void ParseVersionString(const char* version_str, | 46 static void ParseVersionString(const char* version_str, |
43 unsigned* major_version, | 47 unsigned* major_version, |
44 unsigned* minor_version, | 48 unsigned* minor_version, |
45 bool* is_es, | 49 bool* is_es, |
46 bool* is_es2, | 50 bool* is_es2, |
47 bool* is_es3); | 51 bool* is_es3); |
48 | 52 |
49 bool is_es; | 53 bool is_es; |
50 bool is_angle; | 54 bool is_angle; |
51 bool is_mesa; | 55 bool is_mesa; |
(...skipping 10 matching lines...) Expand all Loading... |
62 const char* renderer_str, | 66 const char* renderer_str, |
63 const std::set<std::string>& extensions); | 67 const std::set<std::string>& extensions); |
64 bool IsES3Capable(const std::set<std::string>& extensions) const; | 68 bool IsES3Capable(const std::set<std::string>& extensions) const; |
65 | 69 |
66 DISALLOW_COPY_AND_ASSIGN(GLVersionInfo); | 70 DISALLOW_COPY_AND_ASSIGN(GLVersionInfo); |
67 }; | 71 }; |
68 | 72 |
69 } // namespace gl | 73 } // namespace gl |
70 | 74 |
71 #endif // UI_GL_GL_VERSION_INFO_H_ | 75 #endif // UI_GL_GL_VERSION_INFO_H_ |
OLD | NEW |