Bug 1368109: No need to sync layers.acceleration.disabled and gfx.direct2d.disabled on Windows. r=mchang
authorMilan Sreckovic <milan@mozilla.com>
Fri, 26 May 2017 13:09:56 -0400
changeset 409218 740d674779eb4dada7c7f47ef03fb3aaaa65d212
parent 409217 0b4e233d48c1554786dc8b5b098d2fd73be50f20
child 409219 d8c239da0598e80546e70316230fcc76ca486cde
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmchang
bugs1368109
milestone55.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 1368109: No need to sync layers.acceleration.disabled and gfx.direct2d.disabled on Windows. r=mchang MozReview-Commit-ID: FtyaRl0ar9X
browser/components/preferences/in-content-old/advanced.js
browser/components/preferences/in-content-old/advanced.xul
browser/components/preferences/in-content/main.js
browser/components/preferences/in-content/main.xul
browser/components/preferences/in-content/tests/browser_layersacceleration.js
testing/mozharness/configs/unittests/win_taskcluster_unittest.py
testing/mozharness/configs/unittests/win_unittest.py
--- a/browser/components/preferences/in-content-old/advanced.js
+++ b/browser/components/preferences/in-content-old/advanced.js
@@ -253,26 +253,18 @@ var gAdvancedPane = {
    */
   writeEnableOCSP() {
     var checkbox = document.getElementById("enableOCSP");
     var defaults = Services.prefs.getDefaultBranch(null);
     var defaultValue = defaults.getIntPref("security.OCSP.enabled");
     return checkbox.checked ? defaultValue : 0;
   },
 
-  /**
-   * When the user toggles the layers.acceleration.disabled pref,
-   * sync its new value to the gfx.direct2d.disabled pref too.
-   */
   updateHardwareAcceleration() {
-    if (AppConstants.platform == "win") {
-      var fromPref = document.getElementById("layers.acceleration.disabled");
-      var toPref = document.getElementById("gfx.direct2d.disabled");
-      toPref.value = fromPref.value;
-    }
+    // Placeholder for restart
   },
 
   // DATA CHOICES TAB
 
   /**
    * Set up or hide the Learn More links for various data collection options
    */
   _setupLearnMoreLink(pref, element) {
--- a/browser/components/preferences/in-content-old/advanced.xul
+++ b/browser/components/preferences/in-content-old/advanced.xul
@@ -29,22 +29,16 @@
 #endif
 
   <preference id="general.autoScroll"
               name="general.autoScroll"
               type="bool"/>
   <preference id="general.smoothScroll"
               name="general.smoothScroll"
               type="bool"/>
-#ifdef XP_WIN
-  <preference id="gfx.direct2d.disabled"
-              name="gfx.direct2d.disabled"
-              type="bool"
-              inverted="true"/>
-#endif
   <preference id="layout.spellcheckDefault"
               name="layout.spellcheckDefault"
               type="int"/>
 
 #ifdef MOZ_TELEMETRY_REPORTING
   <preference id="toolkit.telemetry.enabled"
               name="toolkit.telemetry.enabled"
               type="bool"/>
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -648,26 +648,18 @@ var gMainPane = {
     if (AppConstants.platform == "win") {
       let minVersion = Services.prefs.getBoolPref("ui.osk.require_win10") ? 10 : 6.2;
       if (Services.vc.compare(Services.sysinfo.getProperty("version"), minVersion) >= 0) {
         document.getElementById("useOnScreenKeyboard").hidden = false;
       }
     }
   },
 
-  /**
-   * When the user toggles the layers.acceleration.disabled pref,
-   * sync its new value to the gfx.direct2d.disabled pref too.
-   */
   updateHardwareAcceleration() {
-    if (AppConstants.platform == "win") {
-      var fromPref = document.getElementById("layers.acceleration.disabled");
-      var toPref = document.getElementById("gfx.direct2d.disabled");
-      toPref.value = fromPref.value;
-    }
+    // Placeholder for restart on change
   },
 
   // FONTS
 
   /**
    * Populates the default font list in UI.
    */
   _rebuildFonts() {
--- a/browser/components/preferences/in-content/main.xul
+++ b/browser/components/preferences/in-content/main.xul
@@ -174,22 +174,16 @@
      - set to true to enable finer page scrolling than line-by-line on page-up,
        page-down, and other such page movements -->
   <preference id="general.autoScroll"
               name="general.autoScroll"
               type="bool"/>
   <preference id="general.smoothScroll"
               name="general.smoothScroll"
               type="bool"/>
-#ifdef XP_WIN
-  <preference id="gfx.direct2d.disabled"
-              name="gfx.direct2d.disabled"
-              type="bool"
-              inverted="true"/>
-#endif
   <preference id="layout.spellcheckDefault"
               name="layout.spellcheckDefault"
               type="int"/>
 
 #ifdef MOZ_TELEMETRY_REPORTING
   <preference id="toolkit.telemetry.enabled"
               name="toolkit.telemetry.enabled"
               type="bool"/>
--- a/browser/components/preferences/in-content/tests/browser_layersacceleration.js
+++ b/browser/components/preferences/in-content/tests/browser_layersacceleration.js
@@ -8,23 +8,15 @@ add_task(async function() {
   is(prefs.selectedPane, "paneGeneral", "General pane was selected");
 
   let doc = gBrowser.contentDocument;
   let checkbox = doc.querySelector("#allowHWAccel");
   is(!checkbox.checked,
      Services.prefs.getBoolPref("layers.acceleration.disabled"),
      "checkbox should represent inverted pref value before clicking on checkbox");
 
-  if (AppConstants.platform == "win") {
-    is(Services.prefs.getBoolPref("gfx.direct2d.disabled"), false, "direct2d pref should be set to false");
-  }
-
   checkbox.click();
 
   is(!checkbox.checked,
      Services.prefs.getBoolPref("layers.acceleration.disabled"),
      "checkbox should represent inverted pref value after clicking on checkbox");
-  if (AppConstants.platform == "win") {
-    is(Services.prefs.getBoolPref("gfx.direct2d.disabled"), true, "direct2d pref should be set to true");
-  }
-
   await BrowserTestUtils.removeTab(gBrowser.selectedTab);
 });
--- a/testing/mozharness/configs/unittests/win_taskcluster_unittest.py
+++ b/testing/mozharness/configs/unittests/win_taskcluster_unittest.py
@@ -199,17 +199,16 @@ config = {
         },
         "reftest-gpu": {
             'options': ["--suite=reftest",
                         "--setpref=layers.gpu-process.force-enabled=true"],
             'tests': ["tests/reftest/tests/layout/reftests/reftest.list"]
         },
         "reftest-no-accel": {
             "options": ["--suite=reftest",
-                        "--setpref=gfx.direct2d.disabled=true",
                         "--setpref=layers.acceleration.disabled=true"],
             "tests": ["tests/reftest/tests/layout/reftests/reftest.list"]
         },
     },
     "all_xpcshell_suites": {
         "xpcshell": {
             'options': ["--xpcshell=%(abs_app_dir)s/" + XPCSHELL_NAME,
                         "--manifest=tests/xpcshell/tests/xpcshell.ini"],
--- a/testing/mozharness/configs/unittests/win_unittest.py
+++ b/testing/mozharness/configs/unittests/win_unittest.py
@@ -198,17 +198,16 @@ config = {
         },
         "reftest-gpu": {
             'options': ["--suite=reftest",
                         "--setpref=layers.gpu-process.force-enabled=true"],
             'tests': ["tests/reftest/tests/layout/reftests/reftest.list"]
         },
         "reftest-no-accel": {
             "options": ["--suite=reftest",
-                        "--setpref=gfx.direct2d.disabled=true",
                         "--setpref=layers.acceleration.disabled=true"],
             "tests": ["tests/reftest/tests/layout/reftests/reftest.list"]
         },
         "reftest-qr": {
             "options": ["--suite=reftest",
                         "--setpref=gfx.webrender.enabled=true"],
             "tests": ["tests/reftest/tests/layout/reftests/reftest.list"]
         },