Bug 892769 - Fix a bug about fake black textures in WebGLContext. r=jgilbert

This commit is contained in:
Guillaume Abadie 2013-07-12 09:54:59 -04:00
parent 48411f99e3
commit adf7d2ed85

View File

@ -1574,9 +1574,9 @@ WebGLContext::DrawArrays(GLenum mode, WebGLint first, WebGLsizei count)
return ErrorInvalidFramebufferOperation("drawArrays: incomplete framebuffer");
}
BindFakeBlackTextures();
if (!DoFakeVertexAttrib0(checked_firstPlusCount.value()))
return;
BindFakeBlackTextures();
SetupContextLossTimer();
gl->fDrawArrays(mode, first, count);
@ -1684,9 +1684,9 @@ WebGLContext::DrawElements(WebGLenum mode, WebGLsizei count, WebGLenum type,
return ErrorInvalidFramebufferOperation("drawElements: incomplete framebuffer");
}
BindFakeBlackTextures();
if (!DoFakeVertexAttrib0(maxAllowedCount))
return;
BindFakeBlackTextures();
SetupContextLossTimer();
gl->fDrawElements(mode, count, type, reinterpret_cast<GLvoid*>(byteOffset));