Bug 1157327 - Don't cull out container layers, because their prepared data might be null and cause crashes. r=nical

This commit is contained in:
Kartikaya Gupta 2015-04-23 15:15:11 -04:00
parent 8ec41da08a
commit d330a7876b

View File

@ -263,17 +263,19 @@ ContainerPrepare(ContainerT* aContainer,
for (uint32_t i = 0; i < children.Length(); i++) {
LayerComposite* layerToRender = static_cast<LayerComposite*>(children.ElementAt(i)->ImplData());
if (layerToRender->GetLayer()->GetEffectiveVisibleRegion().IsEmpty() &&
!layerToRender->GetLayer()->AsContainerLayer()) {
CULLING_LOG("Sublayer %p has no effective visible region\n", layerToRender->GetLayer());
continue;
}
RenderTargetIntRect clipRect = layerToRender->GetLayer()->
CalculateScissorRect(aClipRect);
if (clipRect.IsEmpty()) {
CULLING_LOG("Sublayer %p has an empty world clip rect\n", layerToRender->GetLayer());
continue;
if (!layerToRender->GetLayer()->AsContainerLayer()) {
if (layerToRender->GetLayer()->GetEffectiveVisibleRegion().IsEmpty()) {
CULLING_LOG("Sublayer %p has no effective visible region\n", layerToRender->GetLayer());
continue;
}
if (clipRect.IsEmpty()) {
CULLING_LOG("Sublayer %p has an empty world clip rect\n", layerToRender->GetLayer());
continue;
}
}
CULLING_LOG("Preparing sublayer %p\n", layerToRender->GetLayer());