mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 01:35:35 +00:00
Bug 1435650 - Cache the offset from AGR to reference frame in ProcessDisplayItems. r=jnicol
This commit is contained in:
parent
cf9c739dc2
commit
b32db1556e
@ -4041,6 +4041,8 @@ ContainerState::ProcessDisplayItems(nsDisplayList* aList)
|
||||
bool hadCompositorHitTestInfo = false;
|
||||
#endif
|
||||
|
||||
AnimatedGeometryRoot* lastAnimatedGeometryRoot = nullptr;
|
||||
nsPoint lastTopLeft;
|
||||
FlattenedDisplayItemIterator iter(mBuilder, aList);
|
||||
while (nsDisplayItem* i = iter.GetNext()) {
|
||||
nsDisplayItem* item = i;
|
||||
@ -4145,7 +4147,12 @@ ContainerState::ProcessDisplayItems(nsDisplayList* aList)
|
||||
itemASR = mContainerASR;
|
||||
item->FuseClipChainUpTo(mBuilder, mContainerASR);
|
||||
}
|
||||
topLeft = (*animatedGeometryRoot)->GetOffsetToCrossDoc(mContainerReferenceFrame);
|
||||
if (animatedGeometryRoot == lastAnimatedGeometryRoot) {
|
||||
topLeft = lastTopLeft;
|
||||
} else {
|
||||
lastTopLeft = topLeft = (*animatedGeometryRoot)->GetOffsetToCrossDoc(mContainerReferenceFrame);
|
||||
lastAnimatedGeometryRoot = animatedGeometryRoot;
|
||||
}
|
||||
|
||||
const ActiveScrolledRoot* scrollMetadataASR =
|
||||
layerClipChain ? ActiveScrolledRoot::PickDescendant(itemASR, layerClipChain->mASR) : itemASR;
|
||||
|
Loading…
Reference in New Issue
Block a user