зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1546018 - parent the legend clip chains. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D29528 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
27fc6a03c9
Коммит
ac602e64ff
|
@ -807,10 +807,11 @@ void DisplayListBuilder::PopStackingContext(bool aIsReferenceFrame) {
|
|||
}
|
||||
|
||||
wr::WrClipChainId DisplayListBuilder::DefineClipChain(
|
||||
const nsTArray<wr::WrClipId>& aClips, const wr::WrClipChainId* aParent) {
|
||||
const nsTArray<wr::WrClipId>& aClips, bool aParentWithCurrentChain) {
|
||||
const uint64_t* parent = nullptr;
|
||||
if (aParent && aParent->id != wr::ROOT_CLIP_CHAIN) {
|
||||
parent = &aParent->id;
|
||||
if (aParentWithCurrentChain &&
|
||||
mCurrentSpaceAndClipChain.clip_chain != wr::ROOT_CLIP_CHAIN) {
|
||||
parent = &mCurrentSpaceAndClipChain.clip_chain;
|
||||
}
|
||||
uint64_t clipchainId = wr_dp_define_clipchain(
|
||||
mWrState, parent, aClips.Elements(), aClips.Length());
|
||||
|
@ -1170,9 +1171,8 @@ void DisplayListBuilder::SuspendClipLeafMerging() {
|
|||
mSuspendedClipChainLeaf = mClipChainLeaf;
|
||||
mSuspendedSpaceAndClipChain = Some(mCurrentSpaceAndClipChain);
|
||||
|
||||
wr::WrClipChainId currentClipChainId{mCurrentSpaceAndClipChain.clip_chain};
|
||||
auto clipId = DefineClip(Nothing(), *mClipChainLeaf);
|
||||
auto clipChainId = DefineClipChain({clipId}, ¤tClipChainId);
|
||||
auto clipChainId = DefineClipChain({clipId}, true);
|
||||
|
||||
mCurrentSpaceAndClipChain.clip_chain = clipChainId.id;
|
||||
mClipChainLeaf = Nothing();
|
||||
|
|
|
@ -394,7 +394,7 @@ class DisplayListBuilder final {
|
|||
void PopStackingContext(bool aIsReferenceFrame);
|
||||
|
||||
wr::WrClipChainId DefineClipChain(const nsTArray<wr::WrClipId>& aClips,
|
||||
const wr::WrClipChainId* aParent = nullptr);
|
||||
bool aParentWithCurrentChain = false);
|
||||
|
||||
wr::WrClipId DefineClip(
|
||||
const Maybe<wr::WrSpaceAndClip>& aParent, const wr::LayoutRect& aClipRect,
|
||||
|
|
|
@ -196,7 +196,7 @@ bool nsDisplayFieldSetBorder::CreateWebRenderCommands(
|
|||
nsTArray<mozilla::wr::ComplexClipRegion> array{region};
|
||||
|
||||
auto clip = aBuilder.DefineClip(Nothing(), layoutRect, &array, nullptr);
|
||||
auto clipChain = aBuilder.DefineClipChain({clip});
|
||||
auto clipChain = aBuilder.DefineClipChain({clip}, true);
|
||||
clipOut.emplace(aBuilder, clipChain);
|
||||
}
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче