Bug 1691065 - Discard invalid resource update transactions due to namespace changes. r=jrmuizel
When we change the namespace, we discard all cached resources and their associated keys from the WebRender cache. As such if any transaction comes in with the old namespace ID, we can safefully discard the entire update, since we will need to recreate any that we are using anyways. This patch also adds new asserts to ensure we never get old namespace IDs for individual keys in a valid resource update. This should never happen in practice. Differential Revision: https://phabricator.services.mozilla.com/D104236
This commit is contained in:
@@ -285,6 +285,7 @@ bool WebRenderLayerManager::EndEmptyTransaction(EndTransactionFlags aFlags) {
|
||||
if (mStateManager.mAsyncResourceUpdates || !mPendingScrollUpdates.IsEmpty() ||
|
||||
WrBridge()->HasWebRenderParentCommands()) {
|
||||
transactionData.emplace();
|
||||
transactionData->mIdNamespace = WrBridge()->GetNamespace();
|
||||
transactionData->mPaintSequenceNumber = mPaintSequenceNumber;
|
||||
if (mStateManager.mAsyncResourceUpdates) {
|
||||
mStateManager.mAsyncResourceUpdates->Flush(
|
||||
|
||||
Reference in New Issue
Block a user