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

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

Issue 1537403003: WebGL2: add types to fix bugs for vertexAttribPointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a small fix 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/WebGLRenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index 794b00e4886875c093ce712228ee90bf3aa9da48..08cd7077f736accd948189a19026e70184941f35 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -1412,7 +1412,7 @@ int WebGLRenderingContextBase::drawingBufferHeight() const
return isContextLost() ? 0 : drawingBuffer()->size().height();
}
-unsigned WebGLRenderingContextBase::sizeInBytes(GLenum type)
+unsigned WebGLRenderingContextBase::sizeInBytes(GLenum type, bool isIntegerAPI) const
{
switch (type) {
case GL_BYTE:
@@ -5171,7 +5171,7 @@ void WebGLRenderingContextBase::vertexAttribPointer(ScriptState* scriptState, GL
synthesizeGLError(GL_INVALID_OPERATION, "vertexAttribPointer", "no bound ARRAY_BUFFER");
return;
}
- unsigned typeSize = sizeInBytes(type);
+ unsigned typeSize = sizeInBytes(type, false);
ASSERT((typeSize & (typeSize - 1)) == 0); // Ensure that the value is POT.
if ((stride & (typeSize - 1)) || (static_cast<GLintptr>(offset) & (typeSize - 1))) {
synthesizeGLError(GL_INVALID_OPERATION, "vertexAttribPointer", "stride or offset not valid for type");

Powered by Google App Engine
This is Rietveld 408576698