mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1089008 - Enable e10s on Windows when acceleration is disabled. r=Mossop, r=felipe
--HG-- extra : rebase_source : f24efd7b76e111390de71d74ccace735dc9bbb88
This commit is contained in:
parent
556c9de769
commit
77a3478fd5
@ -2527,11 +2527,14 @@ let E10SUINotification = {
|
||||
} catch(e) {}
|
||||
|
||||
let isHardwareAccelerated = true;
|
||||
// Linux and Windows are currently ok, mac not so much.
|
||||
#ifdef XP_MACOSX
|
||||
try {
|
||||
let win = RecentWindow.getMostRecentBrowserWindow();
|
||||
let winutils = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
|
||||
isHardwareAccelerated = winutils.layerManagerType != "Basic";
|
||||
} catch (e) {}
|
||||
#endif
|
||||
|
||||
if (!Services.appinfo.inSafeMode &&
|
||||
!Services.appinfo.accessibilityEnabled &&
|
||||
|
@ -4613,43 +4613,24 @@ mozilla::BrowserTabsRemoteAutostart()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(XP_WIN) || defined(XP_MACOSX)
|
||||
#if defined(XP_MACOSX)
|
||||
// If for any reason we suspect acceleration will be disabled, disabled
|
||||
// e10s auto start. (bug 1068199) THIS IS A TEMPORARY WORKAROUND.
|
||||
// e10s auto start on mac.
|
||||
if (gBrowserTabsRemoteAutostart) {
|
||||
// Check prefs
|
||||
bool accelDisabled = Preferences::GetBool("layers.acceleration.disabled", false) &&
|
||||
!Preferences::GetBool("layers.acceleration.force-enabled", false);
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
accelDisabled = accelDisabled || !nsCocoaFeatures::AccelerateByDefault();
|
||||
#endif
|
||||
|
||||
// Check for blocked drivers
|
||||
if (!accelDisabled) {
|
||||
nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
|
||||
if (gfxInfo) {
|
||||
int32_t status;
|
||||
#if defined(XP_WIN)
|
||||
long flagsToCheck[4] = {
|
||||
nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS,
|
||||
nsIGfxInfo::FEATURE_DIRECT3D_10_LAYERS,
|
||||
nsIGfxInfo::FEATURE_DIRECT3D_10_1_LAYERS,
|
||||
nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS
|
||||
};
|
||||
#elif defined(XP_MACOSX)
|
||||
long flagsToCheck[1] = {
|
||||
nsIGfxInfo::FEATURE_OPENGL_LAYERS
|
||||
};
|
||||
#endif
|
||||
for (unsigned int idx = 0; idx < ArrayLength(flagsToCheck); idx++) {
|
||||
if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(flagsToCheck[idx], &status))) {
|
||||
if (status != nsIGfxInfo::FEATURE_STATUS_OK) {
|
||||
accelDisabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_OPENGL_LAYERS, &status)) &&
|
||||
status != nsIGfxInfo::FEATURE_STATUS_OK) {
|
||||
accelDisabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4666,7 +4647,7 @@ mozilla::BrowserTabsRemoteAutostart()
|
||||
LogE10sBlockedReason("Hardware acceleration is disabled");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif // defined(XP_MACOSX)
|
||||
|
||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::E10S_AUTOSTART, gBrowserTabsRemoteAutostart);
|
||||
if (Preferences::GetBool("browser.enabledE10SFromPrompt", false)) {
|
||||
|
Loading…
Reference in New Issue
Block a user