Bug 1289652 - Disabled arrays don't change getVertexAttrib for SIZE,TYPE. - r=mtseng
authorJeff Gilbert <jgilbert@mozilla.com>
Tue, 26 Jul 2016 19:39:16 -0700
changeset 347221 d9762a7de374a5d59dfb9119311191dace721f5c
parent 347220 a8f4d9b555443947fadfc1387ef49dfb98deb2ac
child 347222 eec926b50ce373c640223e109d1c921c88ca50ae
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmtseng
bugs1289652
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1289652 - Disabled arrays don't change getVertexAttrib for SIZE,TYPE. - r=mtseng MozReview-Commit-ID: 71RJlIFayNH
dom/canvas/WebGLContextVertices.cpp
--- a/dom/canvas/WebGLContextVertices.cpp
+++ b/dom/canvas/WebGLContextVertices.cpp
@@ -341,26 +341,20 @@ WebGLContext::GetVertexAttrib(JSContext*
     switch (pname) {
     case LOCAL_GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:
         return WebGLObjectAsJSValue(cx, mBoundVertexArray->mAttribs[index].buf.get(), rv);
 
     case LOCAL_GL_VERTEX_ATTRIB_ARRAY_STRIDE:
         return JS::Int32Value(mBoundVertexArray->mAttribs[index].stride);
 
     case LOCAL_GL_VERTEX_ATTRIB_ARRAY_SIZE:
-        if (!mBoundVertexArray->mAttribs[index].enabled)
-            return JS::Int32Value(4);
-
         return JS::Int32Value(mBoundVertexArray->mAttribs[index].size);
 
     case LOCAL_GL_VERTEX_ATTRIB_ARRAY_TYPE:
-        if (!mBoundVertexArray->mAttribs[index].enabled)
-            return JS::NumberValue(uint32_t(LOCAL_GL_FLOAT));
-
-        return JS::NumberValue(uint32_t(mBoundVertexArray->mAttribs[index].type));
+        return JS::Int32Value(mBoundVertexArray->mAttribs[index].type);
 
     case LOCAL_GL_VERTEX_ATTRIB_ARRAY_INTEGER:
         if (IsWebGL2())
             return JS::BooleanValue(mBoundVertexArray->mAttribs[index].integer);
 
         break;
 
     case LOCAL_GL_VERTEX_ATTRIB_ARRAY_DIVISOR: