зеркало из https://github.com/mozilla/pjs.git
Back out bug 703484 on this CLOSED TREE.
This commit is contained in:
Родитель
24c41456c0
Коммит
76ab386296
|
@ -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);
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче