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

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: addressed zmo@'s feedback 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
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9fd31c3354ef21ef4111d608c0f703ca399eb65e 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) const
{
switch (type) {
case GL_BYTE:
@@ -1429,6 +1429,12 @@ unsigned WebGLRenderingContextBase::sizeInBytes(GLenum type)
return sizeof(GLuint);
case GL_FLOAT:
return sizeof(GLfloat);
+ case GL_HALF_FLOAT:
+ return sizeof(GLushort);
+ case GL_INT_2_10_10_10_REV:
+ return sizeof(GLint);
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ return sizeof(GLuint);
}
ASSERT_NOT_REACHED();
return 0;
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698