Bug 1068674 - Don't turn off e10s if hardware acceleration is disabled. r?jimm
MozReview-Commit-ID: 8NIUSSHy2dt
--- a/browser/components/customizableui/CustomizableWidgets.jsm
+++ b/browser/components/customizableui/CustomizableWidgets.jsm
@@ -1207,28 +1207,19 @@ if (Services.prefs.getBoolPref("privacy.
onViewHiding: function(aEvent) {
let forgetButton = aEvent.target.querySelector("#PanelUI-panic-view-button");
forgetButton.removeEventListener("command", this);
},
});
}
if (AppConstants.E10S_TESTING_ONLY) {
- var e10sDisabled = false;
-
- if (AppConstants.platform == "macosx") {
- // On OS X, "Disable Hardware Acceleration" also disables OMTC and forces
- // a fallback to Basic Layers. This is incompatible with e10s.
- e10sDisabled |= Services.prefs.getBoolPref("layers.acceleration.disabled");
- }
-
if (Services.appinfo.browserTabsRemoteAutostart) {
CustomizableWidgets.push({
id: "e10s-button",
- disabled: e10sDisabled,
defaultArea: CustomizableUI.AREA_PANEL,
onBuild: function(aDocument) {
node.setAttribute("label", CustomizableUI.getLocalizedProperty(this, "label"));
node.setAttribute("tooltiptext", CustomizableUI.getLocalizedProperty(this, "tooltiptext"));
},
onCommand: function(aEvent) {
let win = aEvent.view;
if (win && typeof win.OpenBrowserWindow == "function") {
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -86,17 +86,16 @@
#include "nsIXULAppInfo.h"
#include "nsIXULRuntime.h"
#include "nsPIDOMWindow.h"
#include "nsIBaseWindow.h"
#include "nsIWidget.h"
#include "nsIDocShell.h"
#include "nsAppShellCID.h"
#include "mozilla/scache/StartupCache.h"
-#include "nsIGfxInfo.h"
#include "gfxPrefs.h"
#include "base/histogram.h"
#include "mozilla/unused.h"
#ifdef XP_WIN
#include "nsIWinAppHelper.h"
@@ -4629,17 +4628,17 @@ XRE_IsContentProcess()
// If you add anything to this enum, please update about:support to reflect it
enum {
kE10sEnabledByUser = 0,
kE10sEnabledByDefault = 1,
kE10sDisabledByUser = 2,
// kE10sDisabledInSafeMode = 3, was removed in bug 1172491.
kE10sDisabledForAccessibility = 4,
- kE10sDisabledForMacGfx = 5,
+ // kE10sDisabledForMacGfx = 5, was removed in bug 1068674.
kE10sDisabledForBidi = 6,
kE10sDisabledForAddons = 7,
kE10sForceDisabled = 8,
};
#ifdef XP_WIN
const char* kAccessibilityLastRunDatePref = "accessibility.lastLoadDate";
const char* kAccessibilityLoadedLastSessionPref = "accessibility.loadedInLastSession";
@@ -4728,51 +4727,16 @@ MultiprocessBlockPolicy() {
}
if (disabledForBidi) {
gMultiprocessBlockPolicy = kE10sDisabledForBidi;
return gMultiprocessBlockPolicy;
}
-#if defined(XP_MACOSX)
- // If for any reason we suspect acceleration will be disabled, disable
- // e10s auto start on mac.
-
- // Check prefs
- bool accelDisabled = gfxPrefs::GetSingleton().LayersAccelerationDisabled() &&
- !gfxPrefs::LayersAccelerationForceEnabled();
-
- accelDisabled = accelDisabled || !nsCocoaFeatures::AccelerateByDefault();
-
- // Check for blocked drivers
- if (!accelDisabled) {
- nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
- if (gfxInfo) {
- int32_t status;
- if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_OPENGL_LAYERS, &status)) &&
- status != nsIGfxInfo::FEATURE_STATUS_OK) {
- accelDisabled = true;
- }
- }
- }
-
- // Check env flags
- if (accelDisabled) {
- const char *acceleratedEnv = PR_GetEnv("MOZ_ACCELERATED");
- if (acceleratedEnv && (*acceleratedEnv != '0')) {
- accelDisabled = false;
- }
- }
-
- if (accelDisabled) {
- gMultiprocessBlockPolicy = kE10sDisabledForMacGfx;
- return gMultiprocessBlockPolicy;
- }
-#endif // defined(XP_MACOSX)
/*
* None of the blocking policies matched, so e10s is allowed to run.
* Cache the information and return 0, indicating success.
*/
gMultiprocessBlockPolicy = 0;
return 0;
}