Chromium Code Reviews| Index: gpu/command_buffer/service/feature_info.cc |
| diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc |
| index 897afd3477adb3a314093c8849077a6d1b1fc9b3..8bcabdad6143b41c90d79a55cf1f7fdafc0c74df 100644 |
| --- a/gpu/command_buffer/service/feature_info.cc |
| +++ b/gpu/command_buffer/service/feature_info.cc |
| @@ -1052,6 +1052,27 @@ void FeatureInfo::InitializeFeatures() { |
| #endif |
| } |
| +bool FeatureInfo::IsES3Capable() const { |
| + if (gl_version_info_->IsAtLeastGLES(3, 0)) |
| + return true; |
| + // TODO(zmo): For Desktop GL, with anything lower than 4.2, we need to check |
| + // the existence of a few extensions to have full WebGL 2 capabilities. |
| + if (gl_version_info_->IsAtLeastGL(4, 2)) |
| + return true; |
| +#if defined(OS_MACOSX) |
| + // TODO(zmo): For experimentation purpose on MacOSX with core profile, |
| + // allow 3.2 or plus for now. |
| + if (gl_version_info_->IsAtLeastGL(3, 2)) |
| + return true; |
| +#endif |
| + return false; |
| +} |
| + |
| +void FeatureInfo::EnableES3() { |
|
no sievers
2015/03/09 22:48:20
nit: Maybe EnableES3Validators()? Or even EnableUn
Zhenyao Mo
2015/03/09 23:27:02
Done.
|
| + DCHECK(IsES3Capable()); |
| + validators_.AddES3Values(); |
| +} |
| + |
| void FeatureInfo::AddExtensionString(const char* s) { |
| std::string str(s); |
| size_t pos = extensions_.find(str); |