Bug 1259466. Rename layers.offmainthreadcomposition.enabled. r=milan
☠☠ backed out by 55fb4cbbdfae ☠ ☠
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Mon, 04 Apr 2016 17:15:00 -0400
changeset 291542 864320b75e76dfd6ceba723e54e72a131a7b8bb8
parent 291541 e8c276c75965b936bcaddc4b6b828fc4e2bf216e
child 291543 e174b6bf5439095c7b28c48ff43fbd812c797882
push id74611
push userjmuizelaar@mozilla.com
push dateMon, 04 Apr 2016 21:19:47 +0000
treeherdermozilla-inbound@864320b75e76 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmilan
bugs1259466
milestone48.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 1259466. Rename layers.offmainthreadcomposition.enabled. r=milan We would rather people not use this pref.
b2g/app/b2g.js
b2g/components/OopCommandLine.js
browser/base/content/browser.js
gfx/gl/GLLibraryEGL.cpp
gfx/thebes/gfxPlatform.cpp
gfx/thebes/gfxPrefs.h
mobile/android/app/mobile.js
modules/libpref/init/all.js
testing/mozharness/configs/unittests/win_unittest.py
toolkit/components/telemetry/TelemetryEnvironment.jsm
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -293,17 +293,16 @@ pref("editor.singleLine.pasteNewlines", 
 
 // threshold where a tap becomes a drag, in 1/240" reference pixels
 // The names of the preferences are to be in sync with EventStateManager.cpp
 pref("ui.dragThresholdX", 25);
 pref("ui.dragThresholdY", 25);
 
 // Layers Acceleration.  We can only have nice things on gonk, because
 // they're not maintained anywhere else.
-pref("layers.offmainthreadcomposition.enabled", true);
 #ifndef MOZ_WIDGET_GONK
 pref("dom.ipc.tabs.disabled", true);
 #else
 pref("dom.ipc.tabs.disabled", false);
 pref("layers.acceleration.disabled", false);
 pref("layers.async-pan-zoom.enabled", true);
 pref("gfx.content.azure.backends", "cairo");
 #endif
--- a/b2g/components/OopCommandLine.js
+++ b/b2g/components/OopCommandLine.js
@@ -21,17 +21,16 @@ oopCommandlineHandler.prototype = {
             let prefs = Services.prefs
             let branch = prefs.getDefaultBranch("");
 
             try {
                 // Turn on all OOP services, making desktop run similar to phone
                 // environment
                 branch.setBoolPref("dom.ipc.tabs.disabled", false);
                 branch.setBoolPref("layers.acceleration.disabled", false);
-                branch.setBoolPref("layers.offmainthreadcomposition.enabled", true);
                 branch.setBoolPref("layers.offmainthreadcomposition.async-animations", true);
                 branch.setBoolPref("layers.async-video.enabled", true);
                 branch.setBoolPref("layers.async-pan-zoom.enabled", true);
                 branch.setCharPref("gfx.content.azure.backends", "cairo");
             } catch (e) { }
 
         }
         if (cmdLine.state == Ci.nsICommandLine.STATE_REMOTE_AUTO) {
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -3862,20 +3862,20 @@ function OpenBrowserWindow(options)
     }
   } else {
     extraFeatures = ",non-private";
   }
 
   if (options && options.remote) {
     // If we're using remote tabs by default, then OMTC will be force-enabled,
     // despite the preference returning as false.
-    let omtcEnabled = gPrefService.getBoolPref("layers.offmainthreadcomposition.enabled")
+    let omtcEnabled = !gPrefService.getBoolPref("layers.offmainthreadcomposition.force-disabled")
                       || Services.appinfo.browserTabsRemoteAutostart;
     if (!omtcEnabled) {
-      alert("To use out-of-process tabs, you must set the layers.offmainthreadcomposition.enabled preference and restart. Opening a normal window instead.");
+      alert("To use out-of-process tabs, you must unset the layers.offmainthreadcomposition.force-disabled preference and restart. Opening a normal window instead.");
     } else {
       extraFeatures += ",remote";
     }
   } else if (options && options.remote === false) {
     extraFeatures += ",non-remote";
   }
 
   // if and only if the current window is a browser window and it has a document with a character
--- a/gfx/gl/GLLibraryEGL.cpp
+++ b/gfx/gl/GLLibraryEGL.cpp
@@ -156,17 +156,17 @@ GetAndInitDisplay(GLLibraryEGL& egl, voi
 static EGLDisplay
 GetAndInitDisplayForAccelANGLE(GLLibraryEGL& egl)
 {
     EGLDisplay ret = 0;
 
     // D3D11 ANGLE only works with OMTC; there's a bug in the non-OMTC layer
     // manager, and it's pointless to try to fix it.  We also don't try
     // D3D11 ANGLE if the layer manager is prefering D3D9 (hrm, do we care?)
-    if (gfxPrefs::LayersOffMainThreadCompositionEnabled() &&
+    if (!gfxPrefs::LayersOffMainThreadCompositionForceDisabled() &&
         !gfxPrefs::LayersPreferD3D9())
     {
         if (gfxPrefs::WebGLANGLEForceD3D11())
             return GetAndInitDisplay(egl, LOCAL_EGL_D3D11_ONLY_DISPLAY_ANGLE);
 
         if (gfxPrefs::WebGLANGLETryD3D11() &&
             gfxPlatform::CanUseDirect3D11ANGLE())
         {
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -594,23 +594,22 @@ gfxPlatform::Init()
     {
       nsAutoCString forcedPrefs;
       // D2D prefs
       forcedPrefs.AppendPrintf("FP(D%d%d%d",
                                gfxPrefs::Direct2DDisabled(),
                                gfxPrefs::Direct2DForceEnabled(),
                                gfxPrefs::DirectWriteFontRenderingForceEnabled());
       // Layers prefs
-      forcedPrefs.AppendPrintf("-L%d%d%d%d%d%d",
+      forcedPrefs.AppendPrintf("-L%d%d%d%d%d",
                                gfxPrefs::LayersAMDSwitchableGfxEnabled(),
                                gfxPrefs::LayersAccelerationDisabled(),
                                gfxPrefs::LayersAccelerationForceEnabled(),
                                gfxPrefs::LayersD3D11DisableWARP(),
-                               gfxPrefs::LayersD3D11ForceWARP(),
-                               gfxPrefs::LayersOffMainThreadCompositionForceEnabled());
+                               gfxPrefs::LayersD3D11ForceWARP());
       // WebGL prefs
       forcedPrefs.AppendPrintf("-W%d%d%d%d%d%d%d%d",
                                gfxPrefs::WebGLANGLEForceD3D11(),
                                gfxPrefs::WebGLANGLEForceWARP(),
                                gfxPrefs::WebGLDisabled(),
                                gfxPrefs::WebGLDisableANGLE(),
                                gfxPrefs::WebGLDXGLEnabled(),
                                gfxPrefs::WebGLForceEnabled(),
@@ -2215,18 +2214,17 @@ gfxPlatform::UsesOffMainThreadCompositin
 {
   InitLayersAccelerationPrefs();
   static bool firstTime = true;
   static bool result = false;
 
   if (firstTime) {
     result =
       sPrefBrowserTabsRemoteAutostart ||
-      gfxPrefs::LayersOffMainThreadCompositionEnabled() ||
-      gfxPrefs::LayersOffMainThreadCompositionForceEnabled();
+      !gfxPrefs::LayersOffMainThreadCompositionForceDisabled();
 #if defined(MOZ_WIDGET_GTK)
     // Linux users who chose OpenGL are being grandfathered in to OMTC
     result |= gfxPrefs::LayersAccelerationForceEnabled();
 
 #endif
     firstTime = false;
   }
 
--- a/gfx/thebes/gfxPrefs.h
+++ b/gfx/thebes/gfxPrefs.h
@@ -364,18 +364,17 @@ private:
   DECL_GFX_PREF(Live, "layers.flash-borders",                  FlashLayerBorders, bool, false);
   DECL_GFX_PREF(Once, "layers.force-shmem-tiles",              ForceShmemTiles, bool, false);
   DECL_GFX_PREF(Live, "layers.frame-counter",                  DrawFrameCounter, bool, false);
   DECL_GFX_PREF(Once, "layers.gralloc.disable",                DisableGralloc, bool, false);
   DECL_GFX_PREF(Live, "layers.low-precision-buffer",           UseLowPrecisionBuffer, bool, false);
   DECL_GFX_PREF(Live, "layers.low-precision-opacity",          LowPrecisionOpacity, float, 1.0f);
   DECL_GFX_PREF(Live, "layers.low-precision-resolution",       LowPrecisionResolution, float, 0.25f);
   DECL_GFX_PREF(Live, "layers.max-active",                     MaxActiveLayers, int32_t, -1);
-  DECL_GFX_PREF(Once, "layers.offmainthreadcomposition.enabled", LayersOffMainThreadCompositionEnabled, bool, false);
-  DECL_GFX_PREF(Once, "layers.offmainthreadcomposition.force-enabled", LayersOffMainThreadCompositionForceEnabled, bool, false);
+  DECL_GFX_PREF(Once, "layers.offmainthreadcomposition.force-disabled", LayersOffMainThreadCompositionForceDisabled, bool, false);
   DECL_GFX_PREF(Live, "layers.offmainthreadcomposition.frame-rate", LayersCompositionFrameRate, int32_t,-1);
   DECL_GFX_PREF(Live, "layers.orientation.sync.timeout",       OrientationSyncMillis, uint32_t, (uint32_t)0);
   DECL_GFX_PREF(Once, "layers.overzealous-gralloc-unlocking",  OverzealousGrallocUnlocking, bool, false);
   DECL_GFX_PREF(Once, "layers.prefer-d3d9",                    LayersPreferD3D9, bool, false);
   DECL_GFX_PREF(Once, "layers.prefer-opengl",                  LayersPreferOpenGL, bool, false);
   DECL_GFX_PREF(Live, "layers.progressive-paint",              ProgressivePaintDoNotUseDirectly, bool, false);
   DECL_GFX_PREF(Once, "layers.stereo-video.enabled",           StereoVideoEnabled, bool, false);
 
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -575,17 +575,16 @@ pref("app.update.channel", "@MOZ_UPDATE_
 pref("editor.singleLine.pasteNewlines", 2);
 
 // threshold where a tap becomes a drag, in 1/240" reference pixels
 // The names of the preferences are to be in sync with EventStateManager.cpp
 pref("ui.dragThresholdX", 25);
 pref("ui.dragThresholdY", 25);
 
 pref("layers.acceleration.disabled", false);
-pref("layers.offmainthreadcomposition.enabled", true);
 pref("layers.async-video.enabled", true);
 
 #ifdef MOZ_ANDROID_APZ
 pref("layers.async-pan-zoom.enabled", true);
 // APZ prefs that are different from B2G
 pref("apz.allow_immediate_handoff", false);
 pref("apz.touch_start_tolerance", "0.06");
 pref("apz.axis_lock.breakout_angle", "0.7853982");    // PI / 4 (45 degrees)
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -4417,18 +4417,16 @@ pref("layers.tile-height", 256);
 pref("layers.max-active", -1);
 // If this is set the tile size will only be treated as a suggestion.
 // On B2G we will round this to the stride of the underlying allocation.
 // On any platform we may later use the screen size and ignore
 // tile-width/tile-height entirely. Its recommended to turn this off
 // if you change the tile size.
 pref("layers.tiles.adjust", true);
 
-// Set the default values, and then override per-platform as needed
-pref("layers.offmainthreadcomposition.enabled", true);
 // Compositor target frame rate. NOTE: If vsync is enabled the compositor
 // frame rate will still be capped.
 // -1 -> default (match layout.frame_rate or 60 FPS)
 // 0  -> full-tilt mode: Recomposite even if not transaction occured.
 pref("layers.offmainthreadcomposition.frame-rate", -1);
 
 #ifdef XP_MACOSX
 pref("layers.enable-tiles", true);
--- a/testing/mozharness/configs/unittests/win_unittest.py
+++ b/testing/mozharness/configs/unittests/win_unittest.py
@@ -191,21 +191,16 @@ config = {
             'tests': ['tests/reftest/tests/layout/reftests/reftest-sanity/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-omtc": {
-            "options": ["--suite=reftest",
-                        "--setpref=layers.offmainthreadcomposition.enabled=true"],
-            "tests": ["tests/reftest/tests/layout/reftests/reftest.list"]
-        },
         "crashtest-ipc": {
             "options": ["--suite=crashtest",
                         '--setpref=browser.tabs.remote=true',
                         '--setpref=browser.tabs.remote.autostart=true',
                         '--setpref=extensions.e10sBlocksEnabling=false',
                         '--setpref=layers.async-pan-zoom.enabled=true'],
             "tests": ['tests/reftest/tests/testing/crashtest/crashtests.list'],
         },
--- a/toolkit/components/telemetry/TelemetryEnvironment.jsm
+++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm
@@ -141,17 +141,17 @@ const DEFAULT_ENVIRONMENT_PREFS = new Ma
   ["layers.acceleration.disabled", {what: RECORD_PREF_VALUE}],
   ["layers.acceleration.force-enabled", {what: RECORD_PREF_VALUE}],
   ["layers.async-pan-zoom.enabled", {what: RECORD_PREF_VALUE}],
   ["layers.async-video-oop.enabled", {what: RECORD_PREF_VALUE}],
   ["layers.async-video.enabled", {what: RECORD_PREF_VALUE}],
   ["layers.componentalpha.enabled", {what: RECORD_PREF_VALUE}],
   ["layers.d3d11.disable-warp", {what: RECORD_PREF_VALUE}],
   ["layers.d3d11.force-warp", {what: RECORD_PREF_VALUE}],
-  ["layers.offmainthreadcomposition.enabled", {what: RECORD_PREF_VALUE}],
+  ["layers.offmainthreadcomposition.force-disabled", {what: RECORD_PREF_VALUE}],
   ["layers.prefer-d3d9", {what: RECORD_PREF_VALUE}],
   ["layers.prefer-opengl", {what: RECORD_PREF_VALUE}],
   ["layout.css.devPixelsPerPx", {what: RECORD_PREF_VALUE}],
   ["network.proxy.autoconfig_url", {what: RECORD_PREF_STATE}],
   ["network.proxy.http", {what: RECORD_PREF_STATE}],
   ["network.proxy.ssl", {what: RECORD_PREF_STATE}],
   ["pdfjs.disabled", {what: RECORD_PREF_VALUE}],
   ["places.history.enabled", {what: RECORD_PREF_VALUE}],