Backed out 6 changesets (bug 1392143) for lint failures in SanityTest.js a=backout
authorWes Kocher <wkocher@mozilla.com>
Thu, 07 Sep 2017 16:17:11 -0700
changeset 429080 b206bbf564fb45dde2f42f3474bebec24f2265f4
parent 429079 0c2b838c91e479df3995d3f34f07e0991ae0cb20
child 429081 e3bd210d60af2c2c23bb0cf8b0f33c7dbe9ec898
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1392143
milestone57.0a1
backs out5e167360b1f93acf1962e782a1f9e8a9ea7819f3
c1fcfceeefae9a3c5df092f8fce41e07e1d6ddc5
5220b19f1fc08f94118d5a475659873e55cacb4d
ff3a335e711188c57ca887f1b4c50edef96c53ca
b1627a3a5d7794782936464743993f335624b523
40e16e34df00f79a1bf23d7550d62ac01b3ea262
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
Backed out 6 changesets (bug 1392143) for lint failures in SanityTest.js a=backout Backed out changeset 5e167360b1f9 (bug 1392143) Backed out changeset c1fcfceeefae (bug 1392143) Backed out changeset 5220b19f1fc0 (bug 1392143) Backed out changeset ff3a335e7111 (bug 1392143) Backed out changeset b1627a3a5d77 (bug 1392143) Backed out changeset 40e16e34df00 (bug 1392143) MozReview-Commit-ID: KWifvOL8d9s
dom/canvas/test/webgl-mochitest/mochitest.ini
dom/media/platforms/wmf/WMFVideoMFTManager.cpp
toolkit/components/gfx/SanityTest.js
toolkit/components/gfx/content/sanitytest.html
toolkit/components/gfx/content/videotest.mp4
--- a/dom/canvas/test/webgl-mochitest/mochitest.ini
+++ b/dom/canvas/test/webgl-mochitest/mochitest.ini
@@ -94,14 +94,15 @@ skip-if = toolkit == 'android' #bug 8654
 [test_webgl2_not_exposed.html]
 skip-if = toolkit == 'android' #bug 865443- seperate suite - the non_conf* tests pass except for one on armv6 tests
 [test_webgl2_invalidate_framebuffer.html]
 skip-if = toolkit == 'android' #bug 865443- seperate suite - the non_conf* tests pass except for one on armv6 tests
 [test_webgl2_alpha_luminance.html]
 skip-if = toolkit == 'android' #bug 865443- seperate suite - the non_conf* tests pass except for one on armv6 tests
 [test_fuzzing_bugs.html]
 [test_video_fastpath_mp4.html]
+fail-if = (os == 'win' && os_version == '6.1' && !e10s)
 [test_video_fastpath_theora.html]
 [test_video_fastpath_vp8.html]
 [test_video_fastpath_vp9.html]
 [test_webglcontextcreationerror.html]
 [test_webgl_fingerprinting_resistance.html]
 fail-if = (os == 'mac') || (os == 'win') # on try server, LOCAL_GL_MAX_CUBE_MAP_TEXTURE_SIZE = 512 on mac and LOCAL_GL_ALIASED_LINE_WIDTH_RANGE = [1, 1] on win
--- a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp
+++ b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp
@@ -598,26 +598,18 @@ WMFVideoMFTManager::Init()
   }
 
   return success;
 }
 
 bool
 WMFVideoMFTManager::InitInternal()
 {
-  // The H264 SanityTest uses a 132x132 videos to determine if DXVA can be used.
-  // so we want to use the software decoder for videos with lower resolutions.
-  static const int MIN_H264_HW_WIDTH = 132;
-  static const int MIN_H264_HW_HEIGHT = 132;
-
   mUseHwAccel = false; // default value; changed if D3D setup succeeds.
-  bool useDxva = (mStreamType != H264 ||
-                  (mVideoInfo.ImageRect().width > MIN_H264_HW_WIDTH &&
-                   mVideoInfo.ImageRect().height > MIN_H264_HW_HEIGHT)) &&
-                 InitializeDXVA();
+  bool useDxva = InitializeDXVA();
 
   RefPtr<MFTDecoder> decoder;
 
   HRESULT hr;
   if (mStreamType == VP9 && useDxva && mCheckForAMDDecoder &&
       gfxPrefs::PDMWMFAMDVP9DecoderEnabled()) {
     if ((decoder = LoadAMDVP9Decoder())) {
       mAMDVP9InUse = true;
--- a/toolkit/components/gfx/SanityTest.js
+++ b/toolkit/components/gfx/SanityTest.js
@@ -7,26 +7,18 @@
 const { utils: Cu, interfaces: Ci, classes: Cc, results: Cr } = Components;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 const FRAME_SCRIPT_URL = "chrome://gfxsanity/content/gfxFrameScript.js";
 
-const PAGE_WIDTH = 160;
-const PAGE_HEIGHT = 234;
-const LEFT_EDGE = 8;
-const TOP_EDGE = 8;
-const CANVAS_WIDTH = 32;
-const CANVAS_HEIGHT = 64;
-// If those values are ever changed, make sure to update
-// WMFVideoMFTManager::CanUseDXVA accordingly.
-const VIDEO_WIDTH = 132;
-const VIDEO_HEIGHT = 132;
+const PAGE_WIDTH = 92;
+const PAGE_HEIGHT = 166;
 const DRIVER_PREF = "sanity-test.driver-version";
 const DEVICE_PREF = "sanity-test.device-id";
 const VERSION_PREF = "sanity-test.version";
 const ADVANCED_LAYERS_PREF = "sanity-test.advanced-layers";
 const DISABLE_VIDEO_PREF = "media.hardware-video-decoding.failed";
 const RUNNING_PREF = "sanity-test.running";
 const TIMEOUT_SEC = 20;
 
@@ -105,61 +97,59 @@ function takeWindowSnapshot(win, ctx) {
   var flags = ctx.DRAWWINDOW_DRAW_CARET | ctx.DRAWWINDOW_DRAW_VIEW | ctx.DRAWWINDOW_USE_WIDGET_LAYERS;
   ctx.drawWindow(win.ownerGlobal, 0, 0, PAGE_WIDTH, PAGE_HEIGHT, "rgb(255,255,255)", flags);
 }
 
 // Verify that all the 4 coloured squares of the video
 // render as expected (with a tolerance of 64 to allow for
 // yuv->rgb differences between platforms).
 //
-// The video is VIDEO_WIDTH*VIDEO_HEIGHT, and is split into quadrants of
-// different colours. The top left of the video is LEFT_EDGE,TOP_EDGE+CANVAS_HEIGHT
-// and we test a pixel into the middle of each quadrant to avoid
+// The video is 64x64, and is split into quadrants of
+// different colours. The top left of the video is 8,72
+// and we test a pixel 10,10 into each quadrant to avoid
 // blending differences at the edges.
 //
 // We allow massive amounts of fuzz for the colours since
 // it can depend hugely on the yuv -> rgb conversion, and
 // we don't want to fail unnecessarily.
 function verifyVideoRendering(ctx) {
-  return testPixel(ctx, LEFT_EDGE + VIDEO_WIDTH / 4, TOP_EDGE + CANVAS_HEIGHT + VIDEO_HEIGHT / 4, 255, 255, 255, 255, 64) &&
-    testPixel(ctx, LEFT_EDGE + 3 * VIDEO_WIDTH / 4,  TOP_EDGE + CANVAS_HEIGHT + VIDEO_HEIGHT / 4, 0, 255, 0, 255, 64) &&
-    testPixel(ctx, LEFT_EDGE + VIDEO_WIDTH / 4, TOP_EDGE + CANVAS_HEIGHT + 3 * VIDEO_HEIGHT / 4, 0, 0, 255, 255, 64) &&
-    testPixel(ctx, LEFT_EDGE+ 3 * VIDEO_WIDTH / 4, TOP_EDGE + CANVAS_HEIGHT + 3 * VIDEO_HEIGHT / 4, 255, 0, 0, 255, 64);
+  return testPixel(ctx, 18, 82, 255, 255, 255, 255, 64) &&
+    testPixel(ctx, 50, 82, 0, 255, 0, 255, 64) &&
+    testPixel(ctx, 18, 114, 0, 0, 255, 255, 64) &&
+    testPixel(ctx, 50, 114, 255, 0, 0, 255, 64);
 }
 
 // Verify that the middle of the layers test is the color we expect.
-// It's a red CANVAS_WIDTHxCANVAS_HEIGHT square, test a pixel deep into the
-// square to prevent fuzzing, and another outside the expected limit of the
-// square to check that scaling occurred properly. The square is drawn LEFT_EDGE
-// pixels from the window's left edge and TOP_EDGE from the window's top edge.
+// It's a red 64x64 square, test a pixel deep into the 64x64 square
+// to prevent fuzzing.
 function verifyLayersRendering(ctx) {
-  return testPixel(ctx, LEFT_EDGE + CANVAS_WIDTH / 2, TOP_EDGE + CANVAS_HEIGHT / 2, 255, 0, 0, 255, 64) &&
-         testPixel(ctx, LEFT_EDGE + CANVAS_WIDTH, TOP_EDGE + CANVAS_HEIGHT / 2, 255, 255, 255, 255, 64);
+  return testPixel(ctx, 18, 18, 255, 0, 0, 255, 64);
 }
 
 function testCompositor(test, win, ctx) {
   takeWindowSnapshot(win, ctx);
   var testPassed = true;
 
+  if (!verifyVideoRendering(ctx)) {
+    reportResult(TEST_FAILED_VIDEO);
+    Services.prefs.setBoolPref(DISABLE_VIDEO_PREF, true);
+    testPassed = false;
+  }
+
   if (!verifyLayersRendering(ctx)) {
-    // Try disabling advanced layers if it was enabled. Also trigger
+    // Try disabling advanced layers if it was enabled. Also trgiger
     // a device reset so the screen redraws.
     if (Services.prefs.getBoolPref(AL_ENABLED_PREF, false)) {
       Services.prefs.setBoolPref(AL_TEST_FAILED_PREF, true);
       test.utils.triggerDeviceReset();
     }
     reportResult(TEST_FAILED_RENDER);
     testPassed = false;
   } else {
     Services.prefs.setBoolPref(AL_TEST_FAILED_PREF, false);
-    if (!verifyVideoRendering(ctx)) {
-      reportResult(TEST_FAILED_VIDEO);
-      Services.prefs.setBoolPref(DISABLE_VIDEO_PREF, true);
-      testPassed = false;
-    }
   }
 
   if (testPassed) {
     reportResult(TEST_PASSED);
   }
 
   return testPassed;
 }
@@ -348,16 +338,13 @@ SanityTest.prototype = {
         "chrome://gfxsanity/content/sanityparent.html",
         "Test Page",
         "width=" + PAGE_WIDTH + ",height=" + PAGE_HEIGHT + ",chrome,titlebar=0,scrollbars=0",
         null);
 
     // There's no clean way to have an invisible window and ensure it's always painted.
     // Instead, move the window far offscreen so it doesn't show up during launch.
     sanityTest.moveTo(100000000, 1000000000);
-    // In multi-screens with different dpi setup, the window may have been
-    // incorrectly resized.
-    sanityTest.resizeTo(PAGE_WIDTH, PAGE_HEIGHT);
     tester.scheduleTest(sanityTest);
   },
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([SanityTest]);
--- a/toolkit/components/gfx/content/sanitytest.html
+++ b/toolkit/components/gfx/content/sanitytest.html
@@ -1,6 +1,6 @@
 <html>
     <body>
-        <div style="width:32px; height:64px; background-color:red;"></div>
+        <div style="width:64px; height:64px; background-color:red;"></div>
         <video src="videotest.mp4"></video>
     </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