зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1068674 - Don't turn off e10s if hardware acceleration is disabled. r=jimm
MozReview-Commit-ID: 8NIUSSHy2dt --HG-- extra : rebase_source : d34c4721af319e6f8632940a4105534f8c8c4a01
This commit is contained in:
Родитель
04177e1aa2
Коммит
8a772acd42
|
@ -1212,18 +1212,9 @@ if (Services.prefs.getBoolPref("privacy.panicButton.enabled")) {
|
|||
}
|
||||
|
||||
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"));
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
#include "nsIDocShell.h"
|
||||
#include "nsAppShellCID.h"
|
||||
#include "mozilla/scache/StartupCache.h"
|
||||
#include "nsIGfxInfo.h"
|
||||
#include "gfxPrefs.h"
|
||||
|
||||
#include "base/histogram.h"
|
||||
|
@ -4634,7 +4633,7 @@ enum {
|
|||
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,
|
||||
|
@ -4733,41 +4732,6 @@ MultiprocessBlockPolicy() {
|
|||
}
|
||||
|
||||
|
||||
#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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче