зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1531796 - Call NotifyApzTransaction() for skipped paints, too. r=rhunt,kats
We need to do this separately in the WR and non-WR codepaths for picking up scroll updates for skipped paints. Differential Revision: https://phabricator.services.mozilla.com/D29061 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
31a6a91d20
Коммит
50a070b645
|
@ -616,10 +616,12 @@ void Layer::ApplyPendingUpdatesForThisTransaction() {
|
|||
|
||||
for (size_t i = 0; i < mScrollMetadata.Length(); i++) {
|
||||
FrameMetrics& fm = mScrollMetadata[i].GetMetrics();
|
||||
ScrollableLayerGuid::ViewID scrollId = fm.GetScrollId();
|
||||
Maybe<ScrollUpdateInfo> update =
|
||||
Manager()->GetPendingScrollInfoUpdate(fm.GetScrollId());
|
||||
Manager()->GetPendingScrollInfoUpdate(scrollId);
|
||||
if (update) {
|
||||
fm.UpdatePendingScrollInfo(update.value());
|
||||
nsLayoutUtils::NotifyPaintSkipTransaction(scrollId);
|
||||
Mutated();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -248,6 +248,9 @@ bool WebRenderLayerManager::EndEmptyTransaction(EndTransactionFlags aFlags) {
|
|||
updates->mLargeShmems);
|
||||
}
|
||||
updates->mScrollUpdates = std::move(mPendingScrollUpdates[renderRoot]);
|
||||
for (const auto& entry : updates->mScrollUpdates) {
|
||||
nsLayoutUtils::NotifyPaintSkipTransaction(/*scroll id=*/entry.first);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1388,6 +1388,13 @@ void nsLayoutUtils::RemoveDisplayPort(nsIContent* aContent) {
|
|||
aContent->DeleteProperty(nsGkAtoms::DisplayPortMargins);
|
||||
}
|
||||
|
||||
void nsLayoutUtils::NotifyPaintSkipTransaction(ViewID aScrollId) {
|
||||
if (nsIScrollableFrame* scrollFrame =
|
||||
nsLayoutUtils::FindScrollableFrameFor(aScrollId)) {
|
||||
scrollFrame->NotifyApzTransaction();
|
||||
}
|
||||
}
|
||||
|
||||
nsContainerFrame* nsLayoutUtils::LastContinuationWithChild(
|
||||
nsContainerFrame* aFrame) {
|
||||
MOZ_ASSERT(aFrame, "NULL frame pointer");
|
||||
|
|
|
@ -321,6 +321,18 @@ class nsLayoutUtils {
|
|||
*/
|
||||
static void RemoveDisplayPort(nsIContent* aContent);
|
||||
|
||||
/**
|
||||
* Notify the scroll frame with the given scroll id that its scroll offset
|
||||
* is being sent to APZ as part of a paint-skip transaction.
|
||||
*
|
||||
* Normally, this notification happens during painting, after calls to
|
||||
* ComputeScrollMetadata(). During paint-skipping that code is skipped,
|
||||
* but it's still important for the scroll frame to be notified for
|
||||
* correctness of relative scroll updates, so the code that sends the
|
||||
* empty paint-skip transaction needs to call this.
|
||||
*/
|
||||
static void NotifyPaintSkipTransaction(ViewID aScrollId);
|
||||
|
||||
/**
|
||||
* Use heuristics to figure out the child list that
|
||||
* aChildFrame is currently in.
|
||||
|
|
Загрузка…
Ссылка в новой задаче