Bug 1499002 - Stop to trigger device reset in gfx/SanityTest if WebRender is used r=mattwoodrow
authorsotaro <sotaro.ikeda.g@gmail.com>
Tue, 23 Oct 2018 11:42:59 +0900
changeset 490735 99bd9a8c917c23dad65f2853a2c7a6c9be58957c
parent 490734 77f4c84bebf05b7fddb3f5bdb8e7de0d2eb3ebd6
child 490736 a0fac96b947ef3dbcd50106e66d14b8ff4b5a7fa
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersmattwoodrow
bugs1499002
milestone65.0a1
Bug 1499002 - Stop to trigger device reset in gfx/SanityTest if WebRender is used r=mattwoodrow
toolkit/components/gfx/SanityTest.js
--- a/toolkit/components/gfx/SanityTest.js
+++ b/toolkit/components/gfx/SanityTest.js
@@ -137,17 +137,21 @@ function testCompositor(test, win, ctx) 
   takeWindowSnapshot(win, ctx);
   var testPassed = true;
 
   if (!verifyLayersRendering(ctx)) {
     // Try disabling advanced layers if it was enabled. Also trigger
     // 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();
+      // Do not need to reset device when WebRender is used.
+      // When WebRender is used, advanced layers are not used.
+      if (test.utils.layerManagerType != "WebRender") {
+        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);