mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 898828. Don't even try async video on Windows. r=nical
This commit is contained in:
parent
434e7ec277
commit
15d5a81b18
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user