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
Родитель cd5b55f8d6
Коммит d56fb0e2aa
1 изменённых файлов: 11 добавлений и 9 удалений

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

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