mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1469472 - Ensure we don't merge multiple display items with the same frame. r=mattwoodrow
This commit is contained in:
parent
8b47047d0c
commit
f2b10c6146
@ -244,6 +244,7 @@ void
|
||||
DisplayItemData::AddFrame(nsIFrame* aFrame)
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(mLayer);
|
||||
MOZ_RELEASE_ASSERT(!mFrameList.Contains(aFrame));
|
||||
mFrameList.AppendElement(aFrame);
|
||||
|
||||
SmallPointerArray<DisplayItemData>& array = aFrame->DisplayItemData();
|
||||
|
@ -2781,7 +2781,7 @@ public:
|
||||
|
||||
bool HasSameTypeAndClip(const nsDisplayItem* aOther) const
|
||||
{
|
||||
return GetType() == aOther->GetType() &&
|
||||
return GetPerFrameKey() == aOther->GetPerFrameKey() &&
|
||||
GetClipChain() == aOther->GetClipChain();
|
||||
}
|
||||
|
||||
@ -5700,12 +5700,6 @@ public:
|
||||
return mozilla::LAYER_ACTIVE;
|
||||
}
|
||||
|
||||
virtual bool CanMerge(const nsDisplayItem* aItem) const override
|
||||
{
|
||||
// Items with the same fixed position frame can be merged.
|
||||
return HasSameTypeAndClip(aItem) && mFrame == aItem->Frame();
|
||||
}
|
||||
|
||||
virtual bool CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
|
||||
mozilla::wr::IpcResourceUpdateQueue& aResources,
|
||||
const StackingContextHelper& aSc,
|
||||
@ -5767,12 +5761,6 @@ public:
|
||||
return mozilla::LAYER_ACTIVE_FORCE;
|
||||
}
|
||||
|
||||
virtual bool CanMerge(const nsDisplayItem* aItem) const override
|
||||
{
|
||||
// Items with the same fixed position frame can be merged.
|
||||
return HasSameTypeAndClip(aItem) && mFrame == aItem->Frame();
|
||||
}
|
||||
|
||||
virtual bool ShouldFixToViewport(nsDisplayListBuilder* aBuilder) const override
|
||||
{
|
||||
return mIsFixedBackground;
|
||||
|
Loading…
Reference in New Issue
Block a user