Chromium Code Reviews| Index: ui/gl/gl_version_info.cc |
| diff --git a/ui/gl/gl_version_info.cc b/ui/gl/gl_version_info.cc |
| index aae40dd1f3f82a79633dbd863655255dbd78b8bf..a9365e0c768233712088abf327056539cf0bb7a1 100644 |
| --- a/ui/gl/gl_version_info.cc |
| +++ b/ui/gl/gl_version_info.cc |
| @@ -83,13 +83,23 @@ bool GLVersionInfo::IsES3Capable( |
| return true; |
| } |
| - // Don't try supporting ES3 on ES2, or desktop before 4.0. |
| - if (is_es || !IsAtLeastGL(4, 0)) { |
| + // Don't try supporting ES3 on ES2, or desktop before 3.3. |
| + if (is_es || !IsAtLeastGL(3, 3)) { |
| return false; |
| } |
| - bool has_tex_storage = has_extension("GL_ARB_texture_storage"); |
| - return has_tex_storage; |
| + bool has_transform_feedback = |
| + (IsAtLeastGL(4, 0) || has_extension("GL_ARB_transform_feedback2")); |
| + bool has_sampler_indexing = |
| + (IsAtLeastGL(4, 0) || has_extension("GL_ARB_gpu_shader5")); |
| + bool has_tex_storage = |
| + (IsAtLeastGL(4, 2) || has_extension("GL_ARB_texture_storage")); |
|
piman
2016/10/28 20:01:21
nit: you can skip IsAtLeastGL(4, 2), since it's al
Zhenyao Mo
2016/10/28 23:22:12
Done.
|
| + |
| + // TODO(cwallez) check for texture related extensions. See crbug.com/623577 |
| + |
| + return (has_transform_feedback && |
| + has_sampler_indexing && |
| + has_tex_storage); |
| } |
| void GLVersionInfo::ParseVersionString(const char* version_str, |