Bug 871094 - Add a warning when calling WebGL clear(0). r=bjacob

This commit is contained in:
Guillaume Abadie 2013-08-06 10:40:37 -04:00
parent 48dd755e5f
commit 21cbc5cd18

View File

@ -22,6 +22,10 @@ WebGLContext::Clear(WebGLbitfield mask)
if (mask != m)
return ErrorInvalidValue("clear: invalid mask bits");
if (mask == 0) {
GenerateWarning("Calling gl.clear(0) has no effect.");
}
if (mBoundFramebuffer) {
if (!mBoundFramebuffer->CheckAndInitializeRenderbuffers())
return ErrorInvalidFramebufferOperation("clear: incomplete framebuffer");