Bug 1180688 - Disable the basic compositor backend on Mac. r=mstange

This commit is contained in:
Nicolas Silva 2015-07-09 12:07:51 +02:00
Родитель 522ddb2178
Коммит f5c8feb72b
1 изменённых файлов: 12 добавлений и 6 удалений

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

@ -1119,7 +1119,10 @@ nsBaseWidget::GetPreferredCompositorBackends(nsTArray<LayersBackend>& aHints)
aHints.AppendElement(LayersBackend::LAYERS_OPENGL);
}
// At the moment, BasicCompositor is broken on mac.
#ifndef XP_MACOSX
aHints.AppendElement(LayersBackend::LAYERS_BASIC);
#endif
}
nsIDocument*
@ -1175,6 +1178,13 @@ void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
return;
}
nsTArray<LayersBackend> backendHints;
GetPreferredCompositorBackends(backendHints);
if (backendHints.IsEmpty()) {
mLayerManager = nullptr;
return;
}
CreateCompositorVsyncDispatcher();
mCompositorParent = NewCompositorParent(aWidth, aHeight);
nsRefPtr<ClientLayerManager> lm = new ClientLayerManager(this);
@ -1192,14 +1202,10 @@ void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
TextureFactoryIdentifier textureFactoryIdentifier;
PLayerTransactionChild* shadowManager = nullptr;
nsTArray<LayersBackend> backendHints;
GetPreferredCompositorBackends(backendHints);
bool success = false;
if (!backendHints.IsEmpty()) {
shadowManager = mCompositorChild->SendPLayerTransactionConstructor(
backendHints, 0, &textureFactoryIdentifier, &success);
}
shadowManager = mCompositorChild->SendPLayerTransactionConstructor(
backendHints, 0, &textureFactoryIdentifier, &success);
ShadowLayerForwarder* lf = lm->AsShadowForwarder();