diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index 012b2d14a15..02dc2a6f398 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -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 && diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 0b2a9a72097..3706343b06a 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -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 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)) {