Add BrowserTabsRemoteAutostart to gfxVars. (bug 1288259 part 6, r=jrmuizel)

--HG--
extra : rebase_source : 4e9dce46b658ecf7a13afaa2e9bb1ba35714c38f
This commit is contained in:
David Anderson 2016-08-04 11:33:44 -07:00
Родитель 27679a9d30
Коммит cf5f37f7c3
3 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -23,6 +23,7 @@ class gfxVarReceiver;
// Generator for graphics vars.
#define GFX_VARS_LIST(_) \
/* C++ Name, Data Type, Default Value */ \
_(BrowserTabsRemoteAutostart, bool, false) \
_(ContentBackend, BackendType, BackendType::NONE) \
_(TileSize, IntSize, IntSize(-1, -1)) \
_(UseXRender, bool, false) \

Просмотреть файл

@ -60,7 +60,6 @@
#include "nsTArray.h" // for nsTArray
#include "nsThreadUtils.h" // for NS_IsMainThread
#include "nsXULAppAPI.h" // for XRE_GetIOMessageLoop
#include "nsIXULRuntime.h" // for BrowserTabsRemoteAutostart
#ifdef XP_WIN
#include "mozilla/layers/CompositorD3D11.h"
#include "mozilla/layers/CompositorD3D9.h"
@ -1209,7 +1208,7 @@ CompositorBridgeParent::CompositeToTarget(DrawTarget* aTarget, const gfx::IntRec
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
// We do not support plugins in local content. When switching tabs
// to local pages, hide every plugin associated with the window.
if (!hasRemoteContent && BrowserTabsRemoteAutostart() &&
if (!hasRemoteContent && gfxVars::BrowserTabsRemoteAutostart() &&
mCachedPluginData.Length()) {
Unused << SendHideAllPlugins(GetWidget()->GetWidgetKey());
mCachedPluginData.Clear();

Просмотреть файл

@ -2079,7 +2079,6 @@ gfxPlatform::OptimalFormatForContent(gfxContentType aContent)
static mozilla::Atomic<bool> sLayersSupportsHardwareVideoDecoding(false);
static bool sLayersHardwareVideoDecodingFailed = false;
static bool sBufferRotationCheckPref = true;
static bool sPrefBrowserTabsRemoteAutostart = false;
static mozilla::Atomic<bool> sLayersAccelerationPrefsInitialized(false);
@ -2099,7 +2098,10 @@ gfxPlatform::InitAcceleration()
MOZ_ASSERT(NS_IsMainThread(), "can only initialize prefs on the main thread");
gfxPrefs::GetSingleton();
sPrefBrowserTabsRemoteAutostart = BrowserTabsRemoteAutostart();
if (XRE_IsParentProcess()) {
gfxVars::SetBrowserTabsRemoteAutostart(BrowserTabsRemoteAutostart());
}
nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
nsCString discardFailureId;
@ -2241,7 +2243,7 @@ gfxPlatform::UsesOffMainThreadCompositing()
if (firstTime) {
MOZ_ASSERT(sLayersAccelerationPrefsInitialized);
result =
sPrefBrowserTabsRemoteAutostart ||
gfxVars::BrowserTabsRemoteAutostart() ||
!gfxPrefs::LayersOffMainThreadCompositionForceDisabled();
#if defined(MOZ_WIDGET_GTK)
// Linux users who chose OpenGL are being grandfathered in to OMTC