Back out bug 703484 on this CLOSED TREE.

This commit is contained in:
Kyle Huey 2012-05-15 20:19:37 -07:00
Родитель 24c41456c0
Коммит 76ab386296
3 изменённых файлов: 16 добавлений и 35 удалений

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

@ -465,6 +465,7 @@ CompositorParent::AllocPLayers(const LayersBackend &backendType)
}
return new ShadowLayersParent(slm, this);
} else if (backendType == LayerManager::LAYERS_BASIC) {
// This require Cairo to be thread-safe
nsRefPtr<LayerManager> layerManager = new BasicShadowLayerManager(mWidget);
mWidget = NULL;
mLayerManager = layerManager;

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

@ -3241,20 +3241,8 @@ nsWindow::GetLayerManager(PLayersChild* aShadowManager,
}
// Fall back to software if we couldn't use any hardware backends.
if (!mLayerManager) {
// Try to use an async compositor first, if possible
bool useCompositor =
Preferences::GetBool("layers.offmainthreadcomposition.enabled", false);
if (useCompositor) {
// e10s uses the parameter to pass in the shadow manager from the TabChild
// so we don't expect to see it there since this doesn't support e10s.
NS_ASSERTION(aShadowManager == nsnull, "Async Compositor not supported with e10s");
CreateCompositor();
}
if (!mLayerManager)
mLayerManager = CreateBasicLayerManager();
}
if (!mLayerManager)
mLayerManager = CreateBasicLayerManager();
}
NS_ASSERTION(mLayerManager, "Couldn't provide a valid layer manager.");

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

@ -900,12 +900,8 @@ void nsBaseWidget::CreateCompositor()
AsyncChannel *parentChannel = mCompositorParent->GetIPCChannel();
AsyncChannel::Side childSide = mozilla::ipc::AsyncChannel::Child;
mCompositorChild->Open(parentChannel, childMessageLoop, childSide);
PLayersChild* shadowManager;
if (mUseAcceleratedRendering) {
shadowManager = mCompositorChild->SendPLayersConstructor(LayerManager::LAYERS_OPENGL);
} else {
shadowManager = mCompositorChild->SendPLayersConstructor(LayerManager::LAYERS_BASIC);
}
PLayersChild* shadowManager =
mCompositorChild->SendPLayersConstructor(LayerManager::LAYERS_OPENGL);
if (shadowManager) {
ShadowLayerForwarder* lf = lm->AsShadowForwarder();
@ -915,11 +911,7 @@ void nsBaseWidget::CreateCompositor()
return;
}
lf->SetShadowManager(shadowManager);
if (mUseAcceleratedRendering)
lf->SetParentBackendType(LayerManager::LAYERS_OPENGL);
else
lf->SetParentBackendType(LayerManager::LAYERS_BASIC);
lf->SetParentBackendType(LayerManager::LAYERS_OPENGL);
mLayerManager = lm;
} else {
@ -939,18 +931,18 @@ LayerManager* nsBaseWidget::GetLayerManager(PLayersChild* aShadowManager,
mUseAcceleratedRendering = GetShouldAccelerate();
// Try to use an async compositor first, if possible
bool useCompositor =
Preferences::GetBool("layers.offmainthreadcomposition.enabled", false);
if (useCompositor) {
// e10s uses the parameter to pass in the shadow manager from the TabChild
// so we don't expect to see it there since this doesn't support e10s.
NS_ASSERTION(aShadowManager == nsnull, "Async Compositor not supported with e10s");
CreateCompositor();
}
if (mUseAcceleratedRendering) {
// Try to use an async compositor first, if possible
bool useCompositor =
Preferences::GetBool("layers.offmainthreadcomposition.enabled", false);
if (useCompositor) {
// e10s uses the parameter to pass in the shadow manager from the TabChild
// so we don't expect to see it there since this doesn't support e10s.
NS_ASSERTION(aShadowManager == nsnull, "Async Compositor not supported with e10s");
CreateCompositor();
}
if (!mLayerManager) {
nsRefPtr<LayerManagerOGL> layerManager = new LayerManagerOGL(this);
/**