Bug 1703244 - Flush pending async resource updates when clearing layer manager cache. r=jrmuizel

Differential Revision: https://phabricator.services.mozilla.com/D110925
This commit is contained in:
Andrew Osmond 2021-04-06 12:50:21 +00:00
Родитель 5c433fde4b
Коммит 32291224dd
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -623,6 +623,11 @@ void WebRenderLayerManager::ClearCachedResources(Layer* aSubtree) {
return;
}
WrBridge()->BeginClearCachedResources();
// We flush any pending async resource updates before we clear the display
// list items because some resources (e.g. images) might be shared between
// multiple layer managers, not get freed here, and we want to keep their
// states consistent.
mStateManager.FlushAsyncResourceUpdates();
mWebRenderCommandBuilder.ClearCachedResources();
DiscardImages();
mStateManager.ClearCachedResources();