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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp

Issue 1555523002: WebGL: remove validation code for vertexAttribPointer and vertexAttribIPointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unused validations Created 5 years 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: third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp
index 4d2e6bca09a9f8d52f09a6b316b079a0b47f75e8..5f55e256643c921d420eb2e537599f7142af2b5d 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp
@@ -90,6 +90,8 @@ WebGLVertexArrayObjectBase::VertexAttribState* WebGLVertexArrayObjectBase::getVe
void WebGLVertexArrayObjectBase::setVertexAttribState(
GLuint index, GLsizei bytesPerElement, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset, WebGLBuffer* buffer)
{
+ if (index >= context()->maxVertexAttribs())
+ return;
GLsizei validatedStride = stride ? stride : bytesPerElement;
VertexAttribState* state = getVertexAttribState(index);

Powered by Google App Engine
This is Rietveld 408576698