зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1626570 - Improve handling of copying arrays in layout/painting/. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D72352
This commit is contained in:
Родитель
ea61234b3c
Коммит
fe4c928a46
|
@ -182,7 +182,7 @@ class DisplayItemClip {
|
|||
|
||||
private:
|
||||
nsRect mClipRect;
|
||||
nsTArray<RoundedRect> mRoundedClipRects;
|
||||
CopyableTArray<RoundedRect> mRoundedClipRects;
|
||||
// If mHaveClipRect is false then this object represents no clipping at all
|
||||
// and mRoundedClipRects must be empty.
|
||||
bool mHaveClipRect;
|
||||
|
|
|
@ -333,7 +333,7 @@ void DisplayItemData::BeginUpdate(Layer* aLayer, LayerState aState,
|
|||
|
||||
// We avoid adding or removing element unnecessarily
|
||||
// since we have to modify userdata each time
|
||||
AutoTArray<nsIFrame*, 4> copy(mFrameList);
|
||||
CopyableAutoTArray<nsIFrame*, 4> copy(mFrameList);
|
||||
if (!copy.RemoveElement(aItem->Frame())) {
|
||||
AddFrame(aItem->Frame());
|
||||
mChangedFrameInvalidations.Or(mChangedFrameInvalidations,
|
||||
|
@ -5740,7 +5740,7 @@ void ContainerState::SetupScrollingMetadata(NewLayerEntry* aEntry) {
|
|||
// so add to it rather than overwriting it (we clear the list when recycling
|
||||
// a layer).
|
||||
nsTArray<RefPtr<Layer>> maskLayers(
|
||||
aEntry->mLayer->GetAllAncestorMaskLayers());
|
||||
aEntry->mLayer->GetAllAncestorMaskLayers().Clone());
|
||||
|
||||
// Iterate over the ASR chain and create the corresponding scroll metadatas.
|
||||
// This loop is slightly tricky because the scrollframe-to-clip relationship
|
||||
|
|
|
@ -52,7 +52,8 @@ MaskLayerImageCache::MaskLayerImageKey::MaskLayerImageKey()
|
|||
|
||||
MaskLayerImageCache::MaskLayerImageKey::MaskLayerImageKey(
|
||||
const MaskLayerImageKey& aKey)
|
||||
: mRoundedClipRects(aKey.mRoundedClipRects), mLayerCount(aKey.mLayerCount) {
|
||||
: mRoundedClipRects(aKey.mRoundedClipRects.Clone()),
|
||||
mLayerCount(aKey.mLayerCount) {
|
||||
MOZ_COUNT_CTOR(MaskLayerImageKey);
|
||||
}
|
||||
|
||||
|
|
|
@ -5383,7 +5383,7 @@ class nsDisplayWrapList : public nsDisplayHitTestInfoBase {
|
|||
: nsDisplayHitTestInfoBase(aBuilder, aOther),
|
||||
mListPtr(&mList),
|
||||
mFrameActiveScrolledRoot(aOther.mFrameActiveScrolledRoot),
|
||||
mMergedFrames(aOther.mMergedFrames),
|
||||
mMergedFrames(aOther.mMergedFrames.Clone()),
|
||||
mBounds(aOther.mBounds),
|
||||
mBaseBuildingRect(aOther.mBaseBuildingRect),
|
||||
mOverrideZIndex(aOther.mOverrideZIndex),
|
||||
|
@ -5567,7 +5567,7 @@ class nsDisplayWrapList : public nsDisplayHitTestInfoBase {
|
|||
buildingRect.UnionRect(GetBuildingRect(), aOther->GetBuildingRect());
|
||||
SetBuildingRect(buildingRect);
|
||||
mMergedFrames.AppendElement(aOther->mFrame);
|
||||
mMergedFrames.AppendElements(aOther->mMergedFrames);
|
||||
mMergedFrames.AppendElements(aOther->mMergedFrames.Clone());
|
||||
}
|
||||
|
||||
RetainedDisplayList mList;
|
||||
|
@ -6598,7 +6598,8 @@ class nsDisplayMasksAndClipPaths : public nsDisplayEffectsBase {
|
|||
const ActiveScrolledRoot* aActiveScrolledRoot);
|
||||
nsDisplayMasksAndClipPaths(nsDisplayListBuilder* aBuilder,
|
||||
const nsDisplayMasksAndClipPaths& aOther)
|
||||
: nsDisplayEffectsBase(aBuilder, aOther), mDestRects(aOther.mDestRects) {
|
||||
: nsDisplayEffectsBase(aBuilder, aOther),
|
||||
mDestRects(aOther.mDestRects.Clone()) {
|
||||
MOZ_COUNT_CTOR(nsDisplayMasksAndClipPaths);
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ nsDisplayMasksAndClipPathsGeometry::nsDisplayMasksAndClipPathsGeometry(
|
|||
nsDisplayMasksAndClipPaths* aItem, nsDisplayListBuilder* aBuilder)
|
||||
: nsDisplaySVGEffectGeometry(aItem, aBuilder),
|
||||
nsImageGeometryMixin(aItem, aBuilder),
|
||||
mDestRects(aItem->GetDestRects()) {}
|
||||
mDestRects(aItem->GetDestRects().Clone()) {}
|
||||
|
||||
nsDisplayFiltersGeometry::nsDisplayFiltersGeometry(
|
||||
nsDisplayFilters* aItem, nsDisplayListBuilder* aBuilder)
|
||||
|
|
Загрузка…
Ссылка в новой задаче