Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Unified Diff: gpu/command_buffer/service/feature_info.cc

Issue 2689203002: Check for some extensions before calling potentially NULL GL entry points. (Closed)
Patch Set: Revert discard_framebuffer functional change Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 a4acdd15c4927e7548fe0e35fc3e52f1aed62aa5..a8d5a8e3ccfccdc902b0431bc18f2b24506ebc52 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -701,7 +701,9 @@ void FeatureInfo::InitializeFeatures() {
// fallback to an implementation that does not depend on glGetInteger64v on
// ES2. Thus we can enable GL_EXT_disjoint_timer_query on ES2 contexts even
// though it does not support glGetInteger64v due to a specification bug.
- if (extensions.Contains("GL_EXT_disjoint_timer_query") ||
+ feature_flags_.ext_disjoint_timer_query =
+ extensions.Contains("GL_EXT_disjoint_timer_query");
+ if (feature_flags_.ext_disjoint_timer_query ||
extensions.Contains("GL_ARB_timer_query") ||
extensions.Contains("GL_EXT_timer_query")) {
AddExtensionString("GL_EXT_disjoint_timer_query");
@@ -896,8 +898,9 @@ void FeatureInfo::InitializeFeatures() {
gl_version_info_->is_es3 ||
gl_version_info_->is_desktop_core_profile;
if (gl_version_info_->is_angle) {
- ext_has_multisample |=
+ feature_flags_.angle_framebuffer_multisample =
extensions.Contains("GL_ANGLE_framebuffer_multisample");
+ ext_has_multisample |= feature_flags_.angle_framebuffer_multisample;
}
feature_flags_.use_core_framebuffer_multisample =
gl_version_info_->is_es3 || gl_version_info_->is_desktop_core_profile;
@@ -1401,6 +1404,10 @@ void FeatureInfo::InitializeFeatures() {
extensions.Contains("GL_CHROMIUM_bind_generates_resource");
feature_flags_.angle_webgl_compatibility =
extensions.Contains("GL_ANGLE_webgl_compatibility");
+ feature_flags_.chromium_copy_texture =
+ extensions.Contains("GL_CHROMIUM_copy_texture");
+ feature_flags_.chromium_copy_compressed_texture =
+ extensions.Contains("GL_CHROMIUM_copy_compressed_texture");
}
bool FeatureInfo::IsES3Capable() const {
« no previous file with comments | « gpu/command_buffer/service/feature_info.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698