Bug 1232864 - Cauterize and release WebGL 2 to Nightly. - r=jrmuizel
authorJeff Gilbert <jgilbert@mozilla.com>
Wed, 16 Dec 2015 14:56:24 -0800
changeset 276644 10283ef31aeee98cd36692bada9f302c28e59d00
parent 276643 5351257556f06ab75c88796b165d42347d54e61c
child 276645 e46ca0ac35f5cac18b4e61cefd91e14ed203b5e8
push id69245
push userjgilbert@mozilla.com
push dateWed, 16 Dec 2015 22:56:40 +0000
treeherdermozilla-inbound@10283ef31aee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1232864
milestone46.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 1232864 - Cauterize and release WebGL 2 to Nightly. - r=jrmuizel
dom/canvas/WebGL2ContextBuffers.cpp
dom/canvas/WebGL2ContextRenderbuffers.cpp
dom/canvas/WebGL2ContextSamplers.cpp
modules/libpref/init/all.js
--- a/dom/canvas/WebGL2ContextBuffers.cpp
+++ b/dom/canvas/WebGL2ContextBuffers.cpp
@@ -14,22 +14,27 @@ namespace mozilla {
 bool
 WebGL2Context::ValidateBufferTarget(GLenum target, const char* info)
 {
     switch (target) {
     case LOCAL_GL_ARRAY_BUFFER:
     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;
     }
 }
 
 bool
 WebGL2Context::ValidateBufferIndexedTarget(GLenum target, const char* info)
--- a/dom/canvas/WebGL2ContextRenderbuffers.cpp
+++ b/dom/canvas/WebGL2ContextRenderbuffers.cpp
@@ -54,13 +54,19 @@ WebGL2Context::GetInternalformatParamete
   retval.setObjectOrNull(obj);
 }
 
 void
 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
--- a/dom/canvas/WebGL2ContextSamplers.cpp
+++ b/dom/canvas/WebGL2ContextSamplers.cpp
@@ -7,25 +7,34 @@
 #include "WebGLSampler.h"
 #include "GLContext.h"
 
 namespace mozilla {
 
 already_AddRefed<WebGLSampler>
 WebGL2Context::CreateSampler()
 {
+    const char funcName[] = "createSampler";
+
     if (IsContextLost())
         return nullptr;
 
+    /*
     GLuint sampler;
     MakeContextCurrent();
     gl->fGenSamplers(1, &sampler);
 
     RefPtr<WebGLSampler> globj = new WebGLSampler(this, sampler);
     return globj.forget();
+    */
+
+    ErrorInvalidOperation("%s: Sampler objects are still under development, and are"
+                          " currently disabled.",
+                          funcName);
+    return nullptr;
 }
 
 void
 WebGL2Context::DeleteSampler(WebGLSampler* sampler)
 {
     if (IsContextLost())
         return;
 
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -4199,21 +4199,26 @@ pref("webgl.default-no-alpha", false);
 pref("webgl.force-layers-readback", false);
 pref("webgl.lose-context-on-memory-pressure", false);
 pref("webgl.can-lose-context-in-foreground", true);
 pref("webgl.restore-context-when-visible", true);
 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);
 #else
 pref("webgl.enable-debug-renderer-info", true);
 #endif
 
 pref("webgl.renderer-string-override", "");