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

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

Issue 2148723004: WebGL 2: make sure VertexAttrib type match the corresponding attrib type in shader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update vertex attrib base type for vertexAttrib{I}Pointer only if the vertex attrib array is enabled Created 4 years, 5 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 19a8cb6bc411ee9afa9e881fea6d97ca63943dd3..7a566b3784e9f5d2c501c1b15b285c16fa7360a4 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -1417,6 +1417,14 @@ bool FeatureInfo::IsWebGLContext() const {
return false;
}
+bool FeatureInfo::IsWebGL2Context() const {
+ // Switch statement to cause a compile-time error if we miss a case.
Ken Russell (switch to Gerrit) 2016/07/21 00:16:21 This comment is wrong. Please use a switch stateme
yunchao 2016/07/22 13:43:53 Done.
+ if (context_type_ == CONTEXT_TYPE_WEBGL2) {
+ return true;
+ }
+ return false;
+}
+
void FeatureInfo::AddExtensionString(const char* s) {
std::string str(s);
size_t pos = extensions_.find(str);

Powered by Google App Engine
This is Rietveld 408576698