Bug 1384387 - Clear frame's invalidation state bits in layers-free mode. r=kats

MozReview-Commit-ID: DRv5IcRQVs0

--HG--
extra : rebase_source : 9235e8f45a5fe7a200e63b572be61e9906ded5cc
This commit is contained in:
Ethan Lin 2017-07-26 12:05:24 +08:00
Родитель b34d63fa5b
Коммит 5f21b07b7e
1 изменённых файлов: 11 добавлений и 0 удалений

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

@ -2107,6 +2107,17 @@ already_AddRefed<LayerManager> nsDisplayList::PaintRoot(nsDisplayListBuilder* aB
MaybeSetupTransactionIdAllocator(layerManager, presContext);
bool temp = aBuilder->SetIsCompositingCheap(layerManager->IsCompositingCheap());
static_cast<WebRenderLayerManager*>(layerManager.get())->EndTransactionWithoutLayer(this, aBuilder);
// For layers-free mode, we check the invalidation state bits in the EndTransaction.
// So we clear the invalidation state bits after EndTransaction.
if (widgetTransaction ||
// SVG-as-an-image docs don't paint as part of the retained layer tree,
// but they still need the invalidation state bits cleared in order for
// invalidation for CSS/SMIL animation to work properly.
(document && document->IsBeingUsedAsImage())) {
frame->ClearInvalidationStateBits();
}
aBuilder->SetIsCompositingCheap(temp);
return layerManager.forget();
}