Bug 901382. Don't fall back to basic OMTC. r=mattwoodrow

This commit is contained in:
Nicholas Cameron 2013-08-09 11:32:26 +12:00
Родитель a36037a10d
Коммит a124f24edc
3 изменённых файлов: 16 добавлений и 10 удалений

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

@ -4091,6 +4091,10 @@ pref("layers.offmainthreadcomposition.enabled", false);
// 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);
// Whether to prefer normal memory over shared memory. Ignored with cross-process compositing

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

@ -1534,13 +1534,6 @@ nsChildView::ComputeShouldAccelerate(bool aDefault)
bool
nsChildView::ShouldUseOffMainThreadCompositing()
{
// When acceleration is off, default to false, but allow force-enabling
// using the layers.offmainthreadcomposition.prefer-basic pref.
if (!ComputeShouldAccelerate(mUseLayersAcceleration) &&
!Preferences::GetBool("layers.offmainthreadcomposition.prefer-basic", false)) {
return false;
}
// Don't use OMTC (which requires OpenGL) for transparent windows or for
// popup windows.
if (!mView || ![[mView window] isOpaque] ||

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

@ -947,9 +947,18 @@ void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
PLayerTransactionChild* shadowManager;
mozilla::layers::LayersBackend backendHint = GetPreferredCompositorBackend();
bool success;
shadowManager = mCompositorChild->SendPLayerTransactionConstructor(
backendHint, 0, &textureFactoryIdentifier, &success);
if (backendHint == LAYERS_BASIC &&
!Preferences::GetBool("layers.offmainthreadcomposition.force-basic", false) &&
!Preferences::GetBool("browser.tabs.remote", false)) {
// basic compositor is not stable enough for regular use
backendHint = LAYERS_NONE;
}
bool success = false;
if (backendHint) {
shadowManager = mCompositorChild->SendPLayerTransactionConstructor(
backendHint, 0, &textureFactoryIdentifier, &success);
}
if (success) {
ShadowLayerForwarder* lf = lm->AsShadowForwarder();