Bug 1622360 - Remove kRenderRoots. r=jrmuizel

Differential Revision: https://phabricator.services.mozilla.com/D74403
This commit is contained in:
Kartikaya Gupta
2020-05-11 20:08:05 +00:00
parent 40c8535a80
commit 88f0c3f9e5
3 changed files with 30 additions and 45 deletions

View File

@@ -388,10 +388,9 @@ void WebRenderLayerManager::EndTransactionWithoutLayer(
mStateManager.DiscardImagesInTransaction(
resourceUpdates.SubQueue(wr::RenderRoot::Default));
for (auto renderRoot : wr::kRenderRoots) {
if (resourceUpdates.HasSubQueue(renderRoot)) {
WrBridge()->RemoveExpiredFontKeys(resourceUpdates.SubQueue(renderRoot));
}
if (resourceUpdates.HasSubQueue(wr::RenderRoot::Default)) {
WrBridge()->RemoveExpiredFontKeys(
resourceUpdates.SubQueue(wr::RenderRoot::Default));
}
// Skip the synchronization for buffer since we also skip the painting during
@@ -408,18 +407,16 @@ void WebRenderLayerManager::EndTransactionWithoutLayer(
{
AUTO_PROFILER_TRACING_MARKER("Paint", "ForwardDPTransaction", GRAPHICS);
nsTArray<RenderRootDisplayListData> renderRootDLs;
for (auto renderRoot : wr::kRenderRoots) {
auto renderRootDL = renderRootDLs.AppendElement();
renderRootDL->mRenderRoot = renderRoot;
builder.Finalize(*renderRootDL);
mLastDisplayListSize = renderRootDL->mDL->mCapacity;
resourceUpdates.SubQueue(renderRoot)
.Flush(renderRootDL->mResourceUpdates, renderRootDL->mSmallShmems,
renderRootDL->mLargeShmems);
renderRootDL->mRect =
LayoutDeviceRect(LayoutDevicePoint(), LayoutDeviceSize(size));
renderRootDL->mScrollData.emplace(std::move(mScrollData));
}
auto renderRootDL = renderRootDLs.AppendElement();
renderRootDL->mRenderRoot = wr::RenderRoot::Default;
builder.Finalize(*renderRootDL);
mLastDisplayListSize = renderRootDL->mDL->mCapacity;
resourceUpdates.SubQueue(wr::RenderRoot::Default)
.Flush(renderRootDL->mResourceUpdates, renderRootDL->mSmallShmems,
renderRootDL->mLargeShmems);
renderRootDL->mRect =
LayoutDeviceRect(LayoutDevicePoint(), LayoutDeviceSize(size));
renderRootDL->mScrollData.emplace(std::move(mScrollData));
bool ret = WrBridge()->EndTransaction(
renderRootDLs, mLatestTransactionId, containsSVGGroup,