Bug 1404477 - Merge ResourceUpdateQueue and TransactionBuilder. r=kats
This commit is contained in:
@@ -131,11 +131,9 @@ AsyncImagePipelineManager::RemoveAsyncImagePipeline(const wr::PipelineId& aPipel
|
||||
AsyncImagePipeline* holder = entry.Data();
|
||||
++mAsyncImageEpoch; // Update webrender epoch
|
||||
aTxn.ClearDisplayList(wr::NewEpoch(mAsyncImageEpoch), aPipelineId);
|
||||
wr::ResourceUpdateQueue resources;
|
||||
for (wr::ImageKey key : holder->mKeys) {
|
||||
resources.DeleteImage(key);
|
||||
aTxn.DeleteImage(key);
|
||||
}
|
||||
aTxn.UpdateResources(resources);
|
||||
entry.Remove();
|
||||
RemovePipeline(aPipelineId, wr::NewEpoch(mAsyncImageEpoch));
|
||||
}
|
||||
@@ -165,7 +163,7 @@ AsyncImagePipelineManager::UpdateAsyncImagePipeline(const wr::PipelineId& aPipel
|
||||
}
|
||||
|
||||
Maybe<TextureHost::ResourceUpdateOp>
|
||||
AsyncImagePipelineManager::UpdateImageKeys(wr::ResourceUpdateQueue& aResources,
|
||||
AsyncImagePipelineManager::UpdateImageKeys(wr::TransactionBuilder& aResources,
|
||||
AsyncImagePipeline* aPipeline,
|
||||
nsTArray<wr::ImageKey>& aKeys)
|
||||
{
|
||||
@@ -230,7 +228,7 @@ AsyncImagePipelineManager::UpdateImageKeys(wr::ResourceUpdateQueue& aResources,
|
||||
}
|
||||
|
||||
Maybe<TextureHost::ResourceUpdateOp>
|
||||
AsyncImagePipelineManager::UpdateWithoutExternalImage(wr::ResourceUpdateQueue& aResources,
|
||||
AsyncImagePipelineManager::UpdateWithoutExternalImage(wr::TransactionBuilder& aResources,
|
||||
TextureHost* aTexture,
|
||||
wr::ImageKey aKey,
|
||||
TextureHost::ResourceUpdateOp aOp)
|
||||
@@ -286,15 +284,11 @@ AsyncImagePipelineManager::ApplyAsyncImages()
|
||||
// We use a pipeline with a very small display list for each video element.
|
||||
// Update each of them if needed.
|
||||
for (auto iter = mAsyncImagePipelines.Iter(); !iter.Done(); iter.Next()) {
|
||||
wr::ResourceUpdateQueue resourceUpdates;
|
||||
|
||||
wr::PipelineId pipelineId = wr::AsPipelineId(iter.Key());
|
||||
AsyncImagePipeline* pipeline = iter.Data();
|
||||
|
||||
nsTArray<wr::ImageKey> keys;
|
||||
auto op = UpdateImageKeys(resourceUpdates, pipeline, keys);
|
||||
|
||||
txn.UpdateResources(resourceUpdates);
|
||||
auto op = UpdateImageKeys(txn, pipeline, keys);
|
||||
|
||||
bool updateDisplayList = pipeline->mInitialised &&
|
||||
(pipeline->mIsChanged || op == Some(TextureHost::ADD_IMAGE)) &&
|
||||
|
||||
Reference in New Issue
Block a user