diff --git a/dom/canvas/WebGL2ContextBuffers.cpp b/dom/canvas/WebGL2ContextBuffers.cpp index 7e77a40f59f8..c39b3419bae5 100644 --- a/dom/canvas/WebGL2ContextBuffers.cpp +++ b/dom/canvas/WebGL2ContextBuffers.cpp @@ -19,12 +19,17 @@ WebGL2Context::ValidateBufferTarget(GLenum target, const char* info) case LOCAL_GL_COPY_READ_BUFFER: case LOCAL_GL_COPY_WRITE_BUFFER: case LOCAL_GL_ELEMENT_ARRAY_BUFFER: - case LOCAL_GL_PIXEL_PACK_BUFFER: - case LOCAL_GL_PIXEL_UNPACK_BUFFER: case LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER: case LOCAL_GL_UNIFORM_BUFFER: return true; + case LOCAL_GL_PIXEL_PACK_BUFFER: + case LOCAL_GL_PIXEL_UNPACK_BUFFER: + ErrorInvalidOperation("%s: PBOs are still under development, and are currently" + " disabled.", + info); + return false; + default: ErrorInvalidEnumInfo(info, target); return false; diff --git a/dom/canvas/WebGL2ContextRenderbuffers.cpp b/dom/canvas/WebGL2ContextRenderbuffers.cpp index 7ad686414a3a..37141db32fb2 100644 --- a/dom/canvas/WebGL2ContextRenderbuffers.cpp +++ b/dom/canvas/WebGL2ContextRenderbuffers.cpp @@ -59,8 +59,14 @@ WebGL2Context::RenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height) { - RenderbufferStorage_base("renderbufferStorageMultisample", target, samples, - internalFormat, width, height); + const char funcName[] = "renderbufferStorageMultisample"; + if (IsContextLost()) + return; + + //RenderbufferStorage_base(funcName, target, samples, internalFormat, width, height); + + ErrorInvalidOperation("%s: Multisampling is still under development, and is currently" + " disabled.", funcName); } } // namespace mozilla diff --git a/dom/canvas/WebGL2ContextSamplers.cpp b/dom/canvas/WebGL2ContextSamplers.cpp index e706d7ad8fe6..1dfa68e55e7b 100644 --- a/dom/canvas/WebGL2ContextSamplers.cpp +++ b/dom/canvas/WebGL2ContextSamplers.cpp @@ -12,15 +12,24 @@ namespace mozilla { already_AddRefed WebGL2Context::CreateSampler() { + const char funcName[] = "createSampler"; + if (IsContextLost()) return nullptr; + /* GLuint sampler; MakeContextCurrent(); gl->fGenSamplers(1, &sampler); RefPtr globj = new WebGLSampler(this, sampler); return globj.forget(); + */ + + ErrorInvalidOperation("%s: Sampler objects are still under development, and are" + " currently disabled.", + funcName); + return nullptr; } void diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 80196fda6aba..c7803e140459 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -4204,11 +4204,16 @@ pref("webgl.max-warnings-per-context", 32); pref("webgl.enable-draft-extensions", false); pref("webgl.enable-privileged-extensions", false); pref("webgl.bypass-shader-validation", false); -pref("webgl.enable-prototype-webgl2", false); pref("webgl.disable-fail-if-major-performance-caveat", false); pref("webgl.disable-DOM-blit-uploads", false); pref("webgl.webgl2-compat-mode", false); +#ifdef NIGHTLY_BUILD +pref("webgl.enable-prototype-webgl2", true); +#else +pref("webgl.enable-prototype-webgl2", false); +#endif + #ifdef RELEASE_BUILD // Keep this disabled on Release and Beta for now. (see bug 1171228) pref("webgl.enable-debug-renderer-info", false);