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

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

Issue 2497503004: Revert of Refactor context creation parameters into a struct. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « gpu/command_buffer/service/feature_info.h ('k') | gpu/command_buffer/service/gl_context_virtual.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8c1c5320251a74aaf72b634a990c33396886df63..40ee28fbd7a1229cc06d23dbf1351b2241b48d82 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -1405,11 +1405,6 @@
feature_flags_.khr_debug = gl_version_info_->IsAtLeastGL(4, 3) ||
gl_version_info_->IsAtLeastGLES(3, 2) ||
extensions.Contains("GL_KHR_debug");
-
- feature_flags_.chromium_bind_generates_resource =
- extensions.Contains("GL_CHROMIUM_bind_generates_resource");
- feature_flags_.angle_webgl_compatibility =
- extensions.Contains("GL_ANGLE_webgl_compatibility");
}
bool FeatureInfo::IsES3Capable() const {
@@ -1494,7 +1489,18 @@
}
bool FeatureInfo::IsWebGLContext() const {
- return IsWebGLContextType(context_type_);
+ // Switch statement to cause a compile-time error if we miss a case.
+ switch (context_type_) {
+ case CONTEXT_TYPE_WEBGL1:
+ case CONTEXT_TYPE_WEBGL2:
+ return true;
+ case CONTEXT_TYPE_OPENGLES2:
+ case CONTEXT_TYPE_OPENGLES3:
+ return false;
+ }
+
+ NOTREACHED();
+ return false;
}
bool FeatureInfo::IsWebGL1OrES2Context() const {
« no previous file with comments | « gpu/command_buffer/service/feature_info.h ('k') | gpu/command_buffer/service/gl_context_virtual.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698