Bug 898828. Don't even try async video on Windows. r=nical

This commit is contained in:
Nicholas Cameron 2013-12-21 10:37:07 +13:00
Родитель 434e7ec277
Коммит 15d5a81b18
4 изменённых файлов: 20 добавлений и 2 удалений

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

@ -96,6 +96,7 @@
#include "nsIWebBrowserChrome.h"
#include "nsIDocShell.h"
#include "mozilla/net/NeckoMessageUtils.h"
#include "gfxPlatform.h"
#if defined(ANDROID) || defined(LINUX)
#include "nsSystemInfo.h"
@ -1385,7 +1386,7 @@ ContentParent::InitInternal(ProcessPriority aInitialPriority,
DebugOnly<bool> opened = PCompositor::Open(this);
MOZ_ASSERT(opened);
if (Preferences::GetBool("layers.async-video.enabled",false)) {
if (gfxPlatform::AsyncVideoEnabled()) {
opened = PImageBridge::Open(this);
MOZ_ASSERT(opened);
}

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

@ -415,7 +415,7 @@ gfxPlatform::Init()
if (useOffMainThreadCompositing && (XRE_GetProcessType() == GeckoProcessType_Default)) {
CompositorParent::StartUp();
if (Preferences::GetBool("layers.async-video.enabled", false)) {
if (AsyncVideoEnabled()) {
ImageBridgeChild::StartUp();
}
}
@ -2222,3 +2222,13 @@ gfxPlatform::ComponentAlphaEnabled()
InitLayersAccelerationPrefs();
return sComponentAlphaEnabled;
}
bool
gfxPlatform::AsyncVideoEnabled()
{
#ifdef XP_WIN
return false;
#else
return Preferences::GetBool("layers.async-video.enabled", false);
#endif
}

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

@ -519,6 +519,10 @@ public:
static bool ComponentAlphaEnabled();
// Async video is enabled on this platform.
// Must only be called from the main thread.
static bool AsyncVideoEnabled();
/**
* Are we going to try color management?
*/

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

@ -4102,9 +4102,12 @@ pref("layers.scroll-graph", false);
pref("layers.offmainthreadcomposition.enabled", false);
// Whether to use the deprecated texture architecture rather than the new one.
pref("layers.use-deprecated-textures", true);
#ifndef XP_WIN
// Asynchonous video compositing using the ImageBridge IPDL protocol.
// requires off-main-thread compositing.
// Never works on Windows, so no point pref'ing it on.
pref("layers.async-video.enabled",false);
#endif
#ifdef XP_MACOSX
pref("layers.offmainthreadcomposition.enabled", true);