--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -6274,27 +6274,18 @@ nsDisplayOpacity::CreateWebRenderCommand
aManager->WrBridge()->AddWebRenderParentCommand(anim);
aManager->AddActiveCompositorAnimationId(animationsId);
} else if (animationsId) {
aManager->AddCompositorAnimationsIdForDiscard(animationsId);
animationsId = 0;
}
nsTArray<mozilla::wr::WrFilterOp> filters;
- StackingContextHelper sc(aSc,
- aBuilder,
- aDisplayListBuilder,
- this,
- &mList,
- nullptr,
- animationsId,
- opacityForSC,
- nullptr,
- nullptr,
- filters);
+ StackingContextHelper sc(aSc, aBuilder, filters, nullptr, animationsId,
+ opacityForSC);
aManager->CommandBuilder().CreateWebRenderCommandsFromDisplayList(&mList,
aDisplayListBuilder,
sc,
aBuilder,
aResources);
return true;
}
@@ -6336,19 +6327,18 @@ nsDisplayBlendMode::GetLayerState(nsDisp
bool
nsDisplayBlendMode::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
mozilla::wr::IpcResourceUpdateQueue& aResources,
const StackingContextHelper& aSc,
mozilla::layers::WebRenderLayerManager* aManager,
nsDisplayListBuilder* aDisplayListBuilder)
{
nsTArray<mozilla::wr::WrFilterOp> filters;
- StackingContextHelper sc(aSc, aBuilder, aDisplayListBuilder, this,
- &mList, nullptr, 0, nullptr, nullptr, nullptr,
- filters, nsCSSRendering::GetGFXBlendMode(mBlendMode));
+ StackingContextHelper sc(aSc, aBuilder, filters, nullptr, 0, nullptr, nullptr,
+ nullptr, nsCSSRendering::GetGFXBlendMode(mBlendMode));
return nsDisplayWrapList::CreateWebRenderCommands(aBuilder,aResources, sc,
aManager, aDisplayListBuilder);
}
// nsDisplayBlendMode uses layers for rendering
already_AddRefed<Layer>
nsDisplayBlendMode::BuildLayer(nsDisplayListBuilder* aBuilder,
@@ -6466,18 +6456,17 @@ nsDisplayBlendContainer::GetLayerState(n
bool
nsDisplayBlendContainer::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
mozilla::wr::IpcResourceUpdateQueue& aResources,
const StackingContextHelper& aSc,
mozilla::layers::WebRenderLayerManager* aManager,
nsDisplayListBuilder* aDisplayListBuilder)
{
- StackingContextHelper sc(aSc, aBuilder, aDisplayListBuilder, this,
- &mList, nullptr, 0, nullptr, nullptr);
+ StackingContextHelper sc(aSc, aBuilder);
return nsDisplayWrapList::CreateWebRenderCommands(aBuilder, aResources, sc,
aManager, aDisplayListBuilder);
}
nsDisplayOwnLayer::nsDisplayOwnLayer(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, nsDisplayList* aList,
const ActiveScrolledRoot* aActiveScrolledRoot,
@@ -6573,18 +6562,18 @@ nsDisplayOwnLayer::CreateWebRenderComman
// APZ is enabled and this is a scroll thumb, so we need to create and
// set an animation id. That way APZ can move this scrollthumb around as
// needed.
RefPtr<WebRenderAnimationData> animationData = aManager->CommandBuilder().CreateOrRecycleWebRenderUserData<WebRenderAnimationData>(this);
AnimationInfo& animationInfo = animationData->GetAnimationInfo();
animationInfo.EnsureAnimationsId();
mWrAnimationId = animationInfo.GetCompositorAnimationsId();
- StackingContextHelper sc(aSc, aBuilder, aDisplayListBuilder, this,
- &mList, nullptr, mWrAnimationId, nullptr, nullptr);
+ StackingContextHelper sc(aSc, aBuilder, nsTArray<wr::WrFilterOp>(), nullptr,
+ mWrAnimationId);
nsDisplayWrapList::CreateWebRenderCommands(aBuilder, aResources, sc,
aManager, aDisplayListBuilder);
return true;
}
bool
nsDisplayOwnLayer::UpdateScrollData(mozilla::layers::WebRenderScrollData* aData,
@@ -7126,18 +7115,17 @@ nsDisplayStickyPosition::CreateWebRender
}
// All the things inside this position:sticky item also have the main-thread
// translation already applied, so we need to make sure that gets unapplied.
// The easiest way to do it is to just create a new stacking context with an
// adjusted origin and use that for the nested items. This way all the
// ToRelativeLayoutRect calls on this StackingContextHelper object will
// include the necessary adjustment.
- StackingContextHelper sc(aSc, aBuilder, aDisplayListBuilder, this,
- &mList, nullptr, 0, nullptr, nullptr);
+ StackingContextHelper sc(aSc, aBuilder);
sc.AdjustOrigin(scTranslation);
// TODO: if, inside this nested command builder, we try to turn a gecko clip
// chain into a WR clip chain, we might end up repushing the clip stack
// without `id` which effectively throws out the sticky behaviour. The
// repushing can happen because of the need to define a new clip while
// particular things are on the stack
nsDisplayOwnLayer::CreateWebRenderCommands(aBuilder, aResources, sc,
@@ -8051,25 +8039,22 @@ nsDisplayTransform::CreateWebRenderComma
} else if (animationsId) {
aManager->AddCompositorAnimationsIdForDiscard(animationsId);
animationsId = 0;
}
nsTArray<mozilla::wr::WrFilterOp> filters;
StackingContextHelper sc(aSc,
aBuilder,
- aDisplayListBuilder,
- this,
- mStoredList.GetChildren(),
+ filters,
&newTransformMatrix,
animationsId,
nullptr,
transformForSC,
nullptr,
- filters,
gfx::CompositionOp::OP_OVER,
!BackfaceIsHidden());
return mStoredList.CreateWebRenderCommands(aBuilder, aResources, sc,
aManager, aDisplayListBuilder);
}
bool
@@ -8665,25 +8650,22 @@ nsDisplayPerspective::CreateWebRenderCom
NS_round(newOrigin.y),
0);
gfx::Matrix4x4 transformForSC = gfx::Matrix4x4::Translation(roundedOrigin);
nsTArray<mozilla::wr::WrFilterOp> filters;
StackingContextHelper sc(aSc,
aBuilder,
- aDisplayListBuilder,
- this,
- mList.GetChildren(),
+ filters,
nullptr,
0,
nullptr,
&transformForSC,
&perspectiveMatrix,
- filters,
gfx::CompositionOp::OP_OVER,
!BackfaceIsHidden());
return mList.CreateWebRenderCommands(aBuilder, aResources, sc,
aManager, aDisplayListBuilder);
}
int32_t
@@ -9404,27 +9386,17 @@ nsDisplayFilter::CreateWebRenderCommands
nsTArray<mozilla::wr::WrFilterOp> wrFilters;
const nsTArray<nsStyleFilter>& filters = mFrame->StyleEffects()->mFilters;
nsTArray<layers::CSSFilter> cssFilters = nsTArray<layers::CSSFilter>(filters.Length());
for (const nsStyleFilter& filter : filters) {
wrFilters.AppendElement(wr::ToWrFilterOp(ToCSSFilter(filter)));
}
- StackingContextHelper sc(aSc,
- aBuilder,
- aDisplayListBuilder,
- this,
- &mList,
- nullptr,
- 0,
- nullptr,
- nullptr,
- nullptr,
- wrFilters);
+ StackingContextHelper sc(aSc, aBuilder, wrFilters);
nsDisplaySVGEffects::CreateWebRenderCommands(aBuilder, aResources, sc, aManager, aDisplayListBuilder);
return true;
}
#ifdef MOZ_DUMP_PAINTING
void
nsDisplayFilter::PrintEffects(nsACString& aTo)