Backed out 2 changesets (bug 1477817) for build bustage on WebGLExtensionMOZDebug.cpp. a=backout
authorCsoregi Natalia <ncsoregi@mozilla.com>
Fri, 10 Aug 2018 20:44:20 +0300
changeset 478369 823e87ee7475
parent 478368 af8e3fb57cb7
child 478370 7d7f2612ca51
push id9637
push userncsoregi@mozilla.com
push dateFri, 10 Aug 2018 17:44:59 +0000
treeherdermozilla-beta@823e87ee7475 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1477817
milestone62.0
backs out7701b607a455
8e8f202579a1
Backed out 2 changesets (bug 1477817) for build bustage on WebGLExtensionMOZDebug.cpp. a=backout Backed out changeset 7701b607a455 (bug 1477817) Backed out changeset 8e8f202579a1 (bug 1477817)
dom/canvas/WebGLContext.h
dom/canvas/WebGLExtensionMOZDebug.cpp
dom/canvas/test/webgl-mochitest/mochitest.ini
dom/canvas/test/webgl-mochitest/test_has_rbab.html
dom/webidl/WebGLRenderingContext.webidl
gfx/gl/GLContextProviderEGL.cpp
--- a/dom/canvas/WebGLContext.h
+++ b/dom/canvas/WebGLContext.h
@@ -308,17 +308,16 @@ class WebGLContext
     friend class WebGLExtensionCompressedTextureETC1;
     friend class WebGLExtensionCompressedTexturePVRTC;
     friend class WebGLExtensionCompressedTextureS3TC;
     friend class WebGLExtensionCompressedTextureS3TC_SRGB;
     friend class WebGLExtensionDepthTexture;
     friend class WebGLExtensionDisjointTimerQuery;
     friend class WebGLExtensionDrawBuffers;
     friend class WebGLExtensionLoseContext;
-    friend class WebGLExtensionMOZDebug;
     friend class WebGLExtensionVertexArray;
     friend class WebGLMemoryTracker;
     friend class webgl::AvailabilityRunnable;
     friend struct webgl::LinkedProgramInfo;
     friend struct webgl::UniformBlockInfo;
 
     enum {
         UNPACK_FLIP_Y_WEBGL = 0x9240,
--- a/dom/canvas/WebGLExtensionMOZDebug.cpp
+++ b/dom/canvas/WebGLExtensionMOZDebug.cpp
@@ -54,28 +54,24 @@ WebGLExtensionMOZDebug::GetParameter(JSC
     case LOCAL_GL_VENDOR:
     case LOCAL_GL_VERSION:
         {
             const auto raw = (const char*)gl->fGetString(pname);
             retval.set(StringValue(cx, NS_ConvertUTF8toUTF16(raw), er));
             return;
         }
 
-    case dom::MOZ_debug_Binding::WSI_INFO:
+    case 0x10000: // "WSI_INFO"
         {
             nsCString info;
             gl->GetWSIInfo(&info);
             retval.set(StringValue(cx, NS_ConvertUTF8toUTF16(info), er));
             return;
         }
 
-    case dom::MOZ_debug_Binding::DOES_INDEX_VALIDATION:
-        retval.set(JS::BooleanValue(mContext->mNeedsIndexValidation));
-        return;
-
     default:
         mContext->ErrorInvalidEnumArg("MOZ_debug.getParameter", "pname", pname);
         retval.set(JS::NullValue());
         return;
     }
 }
 
 IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionMOZDebug, MOZ_debug)
--- a/dom/canvas/test/webgl-mochitest/mochitest.ini
+++ b/dom/canvas/test/webgl-mochitest/mochitest.ini
@@ -61,18 +61,16 @@ skip-if = os == 'win' && debug # Bug 138
 support-files = ../captureStream_common.js
 # Even though we use ../ here, in the test HTML, we need to omit this. Sub-CWD relative
 # paths are fine, but they locate the file and dump it in the current directory.
 [test_cubemap_must_be_square.html]
 [test_depth_tex_lazy_clear.html]
 [test_draw.html]
 [test_fb_param.html]
 [test_fb_param_crash.html]
-[test_has_rbab.html]
-fail-if = (os == 'linux') || (os == 'mac')
 [test_hidden_alpha.html]
 [test_hidden_depth_stencil.html]
 [test_implicit_color_buffer_float.html]
 [test_highp_fs.html]
 [test_no_arr_points.html]
 skip-if = android_version == '18' #Android 4.3 aws only; bug 1030942
 [test_noprog_draw.html]
 [test_pixel_pack_buffer.html]
deleted file mode 100644
--- a/dom/canvas/test/webgl-mochitest/test_has_rbab.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset='UTF-8'>
-  <title>Fail without robust_buffer_access_behavior</title>
-  <script src='/tests/SimpleTest/SimpleTest.js'></script>
-  <link rel='stylesheet' href='/tests/SimpleTest/test.css'>
-</head>
-<body>
-<script>
-
-function AssertRBAB() {
-  const c = document.createElement('canvas');
-  const g = c.getContext('webgl');
-  const e = g.getExtension('MOZ_debug');
-  ok(e, 'Should have MOZ_debug.');
-
-  const does_index_validation = e.getParameter(e.DOES_INDEX_VALIDATION);
-  ok(!does_index_validation,
-     "Should have RBAB. Mark this test as failing on platforms that can't support it.");
-
-  SimpleTest.finish();
-}
-
-// -
-
-SimpleTest.waitForExplicitFinish();
-
-const prefPairList = [
-  ['webgl.force-enabled', true],
-  ['webgl.enable-privileged-extensions', true],
-];
-const prefEnv = {'set': prefPairList};
-SpecialPowers.pushPrefEnv(prefEnv, AssertRBAB);
-
-</script>
-</body>
-</html>
--- a/dom/webidl/WebGLRenderingContext.webidl
+++ b/dom/webidl/WebGLRenderingContext.webidl
@@ -1091,16 +1091,14 @@ interface EXT_disjoint_timer_query {
     void queryCounterEXT(WebGLQuery query, GLenum target);
     any getQueryEXT(GLenum target, GLenum pname);
     any getQueryObjectEXT(WebGLQuery query, GLenum pname);
 };
 
 [NoInterfaceObject]
 interface MOZ_debug {
     const GLenum EXTENSIONS = 0x1F03;
-
     const GLenum WSI_INFO   = 0x10000;
     const GLenum UNPACK_REQUIRE_FASTPATH = 0x10001;
-    const GLenum DOES_INDEX_VALIDATION   = 0x10002;
 
     [Throws]
     any getParameter(GLenum pname);
 };
--- a/gfx/gl/GLContextProviderEGL.cpp
+++ b/gfx/gl/GLContextProviderEGL.cpp
@@ -568,26 +568,25 @@ GLContextEGL::CreateGLContext(CreateCont
 
     std::vector<EGLint> robustness_attribs;
     std::vector<EGLint> rbab_attribs; // RBAB: Robust Buffer Access Behavior
     if (flags & CreateContextFlags::PREFER_ROBUSTNESS) {
         if (egl->IsExtensionSupported(GLLibraryEGL::EXT_create_context_robustness)) {
             robustness_attribs = required_attribs;
             robustness_attribs.push_back(LOCAL_EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT);
             robustness_attribs.push_back(LOCAL_EGL_LOSE_CONTEXT_ON_RESET_EXT);
+            // Skip EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT, since it doesn't help us.
+        }
 
-            rbab_attribs = robustness_attribs;
-            rbab_attribs.push_back(LOCAL_EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT);
-            rbab_attribs.push_back(LOCAL_EGL_TRUE);
-        } else if (egl->IsExtensionSupported(GLLibraryEGL::KHR_create_context)) {
-            robustness_attribs = required_attribs;
-            robustness_attribs.push_back(LOCAL_EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR);
-            robustness_attribs.push_back(LOCAL_EGL_LOSE_CONTEXT_ON_RESET_KHR);
-
-            rbab_attribs = robustness_attribs;
+        if (egl->IsExtensionSupported(GLLibraryEGL::KHR_create_context) &&
+            !egl->IsANGLE())
+        {
+            rbab_attribs = required_attribs;
+            rbab_attribs.push_back(LOCAL_EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR);
+            rbab_attribs.push_back(LOCAL_EGL_LOSE_CONTEXT_ON_RESET_KHR);
             rbab_attribs.push_back(LOCAL_EGL_CONTEXT_FLAGS_KHR);
             rbab_attribs.push_back(LOCAL_EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR);
         }
     }
 
     const auto fnCreate = [&](const std::vector<EGLint>& attribs) {
         auto terminated_attribs = attribs;