diff --git a/gfx/layers/wr/WebRenderLayerManager.cpp b/gfx/layers/wr/WebRenderLayerManager.cpp index 2158365b7aaa..dfa4bad5ece3 100644 --- a/gfx/layers/wr/WebRenderLayerManager.cpp +++ b/gfx/layers/wr/WebRenderLayerManager.cpp @@ -225,24 +225,6 @@ WebRenderLayerManager::EndEmptyTransaction(EndTransactionFlags aFlags) return true; } -/*static*/ int32_t -PopulateScrollData(WebRenderScrollData& aTarget, Layer* aLayer) -{ - MOZ_ASSERT(aLayer); - - // We want to allocate a WebRenderLayerScrollData object for this layer, - // but don't keep a pointer to it since it might get memmove'd during the - // recursion below. Instead keep the index and get the pointer later. - size_t index = aTarget.AddNewLayerData(); - - int32_t descendants = 0; - for (Layer* child = aLayer->GetLastChild(); child; child = child->GetPrevSibling()) { - descendants += PopulateScrollData(aTarget, child); - } - aTarget.GetLayerDataMutable(index)->Initialize(aTarget, aLayer, descendants); - return descendants + 1; -} - void WebRenderLayerManager::EndTransaction(DrawPaintedLayerCallback aCallback, void* aCallbackData, diff --git a/gfx/layers/wr/WebRenderScrollData.cpp b/gfx/layers/wr/WebRenderScrollData.cpp index 1dcd30e2f199..97ce9a5b1de0 100644 --- a/gfx/layers/wr/WebRenderScrollData.cpp +++ b/gfx/layers/wr/WebRenderScrollData.cpp @@ -32,37 +32,6 @@ WebRenderLayerScrollData::~WebRenderLayerScrollData() { } -void -WebRenderLayerScrollData::Initialize(WebRenderScrollData& aOwner, - Layer* aLayer, - int32_t aDescendantCount) -{ - MOZ_ASSERT(aDescendantCount >= 0); // Ensure value is valid - MOZ_ASSERT(mDescendantCount == -1); // Don't allow re-setting an already set value - mDescendantCount = aDescendantCount; - - MOZ_ASSERT(aLayer); - for (uint32_t i = 0; i < aLayer->GetScrollMetadataCount(); i++) { - mScrollIds.AppendElement(aOwner.AddMetadata(aLayer->GetScrollMetadata(i))); - } - - mTransform = aLayer->GetTransform(); - mTransformIsPerspective = aLayer->GetTransformIsPerspective(); - mEventRegions = aLayer->GetEventRegions(); - mVisibleRegion = aLayer->GetVisibleRegion(); - mReferentId = aLayer->AsRefLayer() - ? Some(aLayer->AsRefLayer()->GetReferentId()) - : Nothing(); - mEventRegionsOverride = aLayer->AsContainerLayer() - ? aLayer->AsContainerLayer()->GetEventRegionsOverride() - : EventRegionsOverride::NoOverride; - mScrollThumbData = aLayer->GetScrollThumbData(); - mScrollbarAnimationId = aLayer->GetCompositorAnimationsId(); - mScrollbarTargetContainerId = aLayer->GetScrollbarTargetContainerId(); - mIsScrollbarContainer = aLayer->IsScrollbarContainer(); - mFixedPosScrollContainerId = aLayer->GetFixedPositionScrollContainerId(); -} - void WebRenderLayerScrollData::InitializeRoot(int32_t aDescendantCount) { diff --git a/gfx/layers/wr/WebRenderScrollData.h b/gfx/layers/wr/WebRenderScrollData.h index 0ec680e5ecae..1e016331a604 100644 --- a/gfx/layers/wr/WebRenderScrollData.h +++ b/gfx/layers/wr/WebRenderScrollData.h @@ -42,12 +42,6 @@ public: WebRenderLayerScrollData(); // needed for IPC purposes ~WebRenderLayerScrollData(); - // Actually initialize the object. This is not done during the constructor - // for optimization purposes (the call site is hard to write efficiently - // if we do this in the constructor). - void Initialize(WebRenderScrollData& aOwner, - Layer* aLayer, - int32_t aDescendantCount); void InitializeRoot(int32_t aDescendantCount); void Initialize(WebRenderScrollData& aOwner, nsDisplayItem* aItem,