Bug 1800133 - Optimize out empty sublists a bit better. r=tnikkel

This avoids unnecessarily starting clip lists.

Depends on D161890

Differential Revision: https://phabricator.services.mozilla.com/D161891
This commit is contained in:
Emilio Cobos Álvarez 2022-11-14 13:20:27 +00:00
Родитель 3c6c9b87df
Коммит 7bec49411b
1 изменённых файлов: 8 добавлений и 5 удалений

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

@ -1922,15 +1922,18 @@ void WebRenderCommandBuilder::CreateWebRenderCommandsFromDisplayList(
aBuilder.Dump(mDumpIndent + 1, Some(mBuilderDumpIndex), Nothing());
}
FlattenedDisplayListIterator iter(aDisplayListBuilder, aDisplayList);
if (!iter.HasNext()) {
return;
}
mDumpIndent++;
if (aNewClipList) {
mClipManager.BeginList(aSc);
}
bool apzEnabled = mManager->AsyncPanZoomEnabled();
FlattenedDisplayListIterator iter(aDisplayListBuilder, aDisplayList);
while (iter.HasNext()) {
const bool apzEnabled = mManager->AsyncPanZoomEnabled();
do {
nsDisplayItem* item = iter.GetNextItem();
DisplayItemType itemType = item->GetType();
@ -2148,7 +2151,7 @@ void WebRenderCommandBuilder::CreateWebRenderCommandsFromDisplayList(
}
}
}
}
} while (iter.HasNext());
mDumpIndent--;
if (aNewClipList) {