Bug 881609: Call InitLayersAccelerationPrefs only once. r?nrc
MozReview-Commit-ID: DTBHmvjqn1e
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -2149,21 +2149,21 @@ gfxPlatform::GetScaledFontForFontWithCai
}
return nullptr;
}
/* static */ bool
gfxPlatform::UsesOffMainThreadCompositing()
{
- InitLayersAccelerationPrefs();
static bool firstTime = true;
static bool result = false;
if (firstTime) {
+ InitLayersAccelerationPrefs();
result =
sPrefBrowserTabsRemoteAutostart ||
gfxPrefs::LayersOffMainThreadCompositionEnabled() ||
gfxPrefs::LayersOffMainThreadCompositionForceEnabled();
#if defined(MOZ_WIDGET_GTK)
// Linux users who chose OpenGL are being grandfathered in to OMTC
result |= gfxPrefs::LayersAccelerationForceEnabled();