Bug 1622360 - Remove WebRenderScrollDataCollection. r=jrmuizel

This basically allowed managing a bunch of scroll data things in parallel
for all the render roots which we don't need anymore.

Differential Revision: https://phabricator.services.mozilla.com/D69845
This commit is contained in:
Kartikaya Gupta
2020-04-06 20:45:21 +00:00
parent 76b09208e0
commit 379e832b13
6 changed files with 72 additions and 122 deletions

View File

@@ -332,7 +332,7 @@ void WebRenderLayerManager::EndTransactionWithoutLayer(
mWebRenderCommandBuilder.BuildWebRenderCommands(
builder, resourceUpdates, aDisplayList, aDisplayListBuilder,
mScrollDatas, std::move(aFilters));
mScrollData, std::move(aFilters));
builderDumpIndex =
mWebRenderCommandBuilder.GetBuilderDumpIndex(builder.GetRenderRoot());
@@ -355,20 +355,13 @@ void WebRenderLayerManager::EndTransactionWithoutLayer(
Unused << builder.Dump(/*indent*/ 1, Some(builderDumpIndex), Nothing());
}
for (auto& stateManager : mStateManagers) {
if (AsyncPanZoomEnabled()) {
auto& scrollData = mScrollDatas[stateManager.GetRenderRoot()];
if (mIsFirstPaint) {
// Set the same flag on each scrollData instance (one per render root).
// We need to duplicate this because they will get processed by APZ at
// separate times and the flag state is relevant each time.
scrollData.SetIsFirstPaint();
}
scrollData.SetPaintSequenceNumber(mPaintSequenceNumber);
if (AsyncPanZoomEnabled()) {
if (mIsFirstPaint) {
mScrollData.SetIsFirstPaint();
mIsFirstPaint = false;
}
mScrollData.SetPaintSequenceNumber(mPaintSequenceNumber);
}
mIsFirstPaint = false;
// Since we're sending a full mScrollData that will include the new scroll
// offsets, and we can throw away the pending scroll updates we had kept for
@@ -436,7 +429,7 @@ void WebRenderLayerManager::EndTransactionWithoutLayer(
renderRootDL->mLargeShmems);
renderRootDL->mRect =
LayoutDeviceRect(LayoutDevicePoint(), LayoutDeviceSize(size));
renderRootDL->mScrollData.emplace(std::move(mScrollDatas[renderRoot]));
renderRootDL->mScrollData.emplace(std::move(mScrollData));
}
WrBridge()->EndTransaction(renderRootDLs, mLatestTransactionId,