Backed out changeset ea2341b06e6f (bug 994541) for reftest timeouts

This commit is contained in:
Ed Morley 2014-07-21 17:26:40 +01:00
Родитель ee83a296c9
Коммит da39eb8543
2 изменённых файлов: 36 добавлений и 1 удалений

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

@ -3832,7 +3832,7 @@ pref("layers.max-active", -1);
pref("layers.scroll-graph", false);
// Set the default values, and then override per-platform as needed
pref("layers.offmainthreadcomposition.enabled", true);
pref("layers.offmainthreadcomposition.enabled", false);
// 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)
@ -3845,14 +3845,31 @@ pref("layers.async-video.enabled", true);
pref("layers.async-video-oop.enabled",true);
#ifdef XP_WIN
pref("layers.offmainthreadcomposition.enabled", true);
// XXX - see bug 1009616
pref("layers.async-video-oop.enabled", false);
#endif
#ifdef MOZ_WIDGET_QT
pref("layers.offmainthreadcomposition.enabled", true);
#endif
#ifdef XP_MACOSX
pref("layers.offmainthreadcomposition.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);
// whether to allow use of the basic compositor
pref("layers.offmainthreadcomposition.force-basic", false);
// Whether to animate simple opacity and transforms on the compositor
pref("layers.offmainthreadcomposition.async-animations", false);

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

@ -872,6 +872,20 @@ nsBaseWidget::GetPreferredCompositorBackends(nsTArray<LayersBackend>& aHints)
aHints.AppendElement(LayersBackend::LAYERS_BASIC);
}
static void
CheckForBasicBackends(nsTArray<LayersBackend>& aHints)
{
#ifndef XP_WIN
for (size_t i = 0; i < aHints.Length(); ++i) {
if (aHints[i] == LayersBackend::LAYERS_BASIC &&
!Preferences::GetBool("layers.offmainthreadcomposition.force-basic", false)) {
// basic compositor is not stable enough for regular use
aHints[i] = LayersBackend::LAYERS_NONE;
}
}
#endif
}
void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
{
MOZ_ASSERT(gfxPlatform::UsesOffMainThreadCompositing(),
@ -901,6 +915,10 @@ void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
nsTArray<LayersBackend> backendHints;
GetPreferredCompositorBackends(backendHints);
if (!mRequireOffMainThreadCompositing) {
CheckForBasicBackends(backendHints);
}
bool success = false;
if (!backendHints.IsEmpty()) {
shadowManager = mCompositorChild->SendPLayerTransactionConstructor(