зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1353958 - Add Gpu process reset handling for QuantumRender. r=kats
MozReview-Commit-ID: 6ZkB1ezyWlK
This commit is contained in:
Родитель
7783684b2f
Коммит
1b3f1e93ba
|
@ -3076,23 +3076,31 @@ TabChild::ReinitRendering()
|
|||
Unused << cb->SendGetCompositorOptions(mLayersId, &options);
|
||||
mCompositorOptions = Some(options);
|
||||
|
||||
bool success;
|
||||
nsTArray<LayersBackend> ignored;
|
||||
PLayerTransactionChild* shadowManager =
|
||||
cb->SendPLayerTransactionConstructor(ignored, LayersId(), &mTextureFactoryIdentifier, &success);
|
||||
if (!success) {
|
||||
NS_WARNING("failed to re-allocate layer transaction");
|
||||
return;
|
||||
}
|
||||
if (gfxVars::UseWebRender()) {
|
||||
RefPtr<LayerManager> lm = mPuppetWidget->RecreateLayerManager(nullptr);
|
||||
MOZ_ASSERT(lm->AsWebRenderLayerManager());
|
||||
lm->AsWebRenderLayerManager()->Initialize(cb,
|
||||
wr::AsPipelineId(mLayersId),
|
||||
&mTextureFactoryIdentifier);
|
||||
} else {
|
||||
bool success;
|
||||
nsTArray<LayersBackend> ignored;
|
||||
PLayerTransactionChild* shadowManager =
|
||||
cb->SendPLayerTransactionConstructor(ignored, LayersId(), &mTextureFactoryIdentifier, &success);
|
||||
if (!success) {
|
||||
NS_WARNING("failed to re-allocate layer transaction");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!shadowManager) {
|
||||
NS_WARNING("failed to re-construct LayersChild");
|
||||
return;
|
||||
}
|
||||
if (!shadowManager) {
|
||||
NS_WARNING("failed to re-construct LayersChild");
|
||||
return;
|
||||
}
|
||||
|
||||
RefPtr<LayerManager> lm = mPuppetWidget->RecreateLayerManager(shadowManager);
|
||||
ShadowLayerForwarder* lf = lm->AsShadowForwarder();
|
||||
lf->IdentifyTextureHost(mTextureFactoryIdentifier);
|
||||
RefPtr<LayerManager> lm = mPuppetWidget->RecreateLayerManager(shadowManager);
|
||||
ShadowLayerForwarder* lf = lm->AsShadowForwarder();
|
||||
lf->IdentifyTextureHost(mTextureFactoryIdentifier);
|
||||
}
|
||||
|
||||
InitAPZState();
|
||||
|
||||
|
|
|
@ -614,6 +614,7 @@ PuppetWidget::GetLayerManager(PLayerTransactionChild* aShadowManager,
|
|||
// can do drawing in this process.
|
||||
mLayerManager = new BasicLayerManager(this);
|
||||
} else if (gfxVars::UseWebRender()) {
|
||||
MOZ_ASSERT(!aShadowManager);
|
||||
mLayerManager = new WebRenderLayerManager(this);
|
||||
} else {
|
||||
mLayerManager = new ClientLayerManager(this);
|
||||
|
@ -638,6 +639,7 @@ PuppetWidget::RecreateLayerManager(PLayerTransactionChild* aShadowManager)
|
|||
|
||||
MOZ_ASSERT(mTabChild);
|
||||
if (gfxVars::UseWebRender()) {
|
||||
MOZ_ASSERT(!aShadowManager);
|
||||
mLayerManager = new WebRenderLayerManager(this);
|
||||
} else {
|
||||
mLayerManager = new ClientLayerManager(this);
|
||||
|
|
Загрузка…
Ссылка в новой задаче