Bug 994541 - Enable OMTC on Linux via BasicCompositor. r=Bas

This commit is contained in:
Chris Lord 2015-03-12 14:01:23 +01:00
parent d1ad564d43
commit 7484b298e0
3 changed files with 3 additions and 39 deletions

View File

@ -2292,12 +2292,6 @@ gfxPlatform::UsesOffMainThreadCompositing()
// Linux users who chose OpenGL are being grandfathered in to OMTC
result |= gfxPrefs::LayersAccelerationForceEnabled();
#if !defined(NIGHTLY_BUILD)
// Yeah, these two env vars do the same thing.
// I'm told that one of them is enabled on some test slaves config,
// so be slightly careful if you think you can remove one of them.
result &= PR_GetEnv("MOZ_USE_OMTC") || PR_GetEnv("MOZ_OMTC_ENABLED");
#endif
#endif
firstTime = false;
}

View File

@ -3982,7 +3982,7 @@ pref("layers.max-active", -1);
pref("layers.tiles.adjust", true);
// Set the default values, and then override per-platform as needed
pref("layers.offmainthreadcomposition.enabled", false);
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)
@ -3994,25 +3994,11 @@ pref("layers.offmainthreadcomposition.frame-rate", -1);
pref("layers.async-video.enabled", true);
pref("layers.async-video-oop.enabled",true);
#ifdef XP_WIN
pref("layers.offmainthreadcomposition.enabled", true);
#endif
#ifdef MOZ_WIDGET_QT
pref("layers.offmainthreadcomposition.enabled", true);
#endif
#ifdef XP_MACOSX
pref("layers.offmainthreadcomposition.enabled", true);
pref("layers.enable-tiles", true);
pref("layers.tiled-drawtarget.enabled", true);
#endif
// ANDROID covers android and b2g
#ifdef ANDROID
pref("layers.offmainthreadcomposition.enabled", true);
#endif
// same effect as layers.offmainthreadcomposition.enabled, but specifically for
// use with tests.
pref("layers.offmainthreadcomposition.testing.enabled", false);

View File

@ -3620,25 +3620,9 @@ XREMain::XRE_mainStartup(bool* aExitFlag)
}
#endif /* MOZ_WIDGET_GTK */
#ifdef MOZ_X11
// Init X11 in thread-safe mode. Must be called prior to the first call to XOpenDisplay
// Init X11 in thread-safe mode. Must be called prior to the first call to XOpenDisplay
// (called inside gdk_display_open). This is a requirement for off main tread compositing.
// This is done only on X11 platforms if the environment variable MOZ_USE_OMTC is set so
// as to avoid overhead when omtc is not used.
//
// On nightly builds, we call this by default to enable OMTC for Electrolysis testing. On
// aurora, beta, and release builds, there is a small tpaint regression from enabling this
// call, so it sits behind an environment variable.
//
// An environment variable is used instead of a pref on X11 platforms because we start having
// access to prefs long after the first call to XOpenDisplay which is hard to change due to
// interdependencies in the initialization.
# ifndef NIGHTLY_BUILD
if (PR_GetEnv("MOZ_USE_OMTC") ||
PR_GetEnv("MOZ_OMTC_ENABLED"))
# endif
{
XInitThreads();
}
XInitThreads();
#endif
#if defined(MOZ_WIDGET_GTK)
{