Bug 1415225 - Remove dead code. r?jrmuizel
This code has been unused since the removal of layers-full WR codepaths.
MozReview-Commit-ID: JQn55Kbz5rr
--- a/gfx/layers/wr/WebRenderLayerManager.cpp
+++ b/gfx/layers/wr/WebRenderLayerManager.cpp
@@ -220,34 +220,16 @@ WebRenderLayerManager::EndEmptyTransacti
}
WrBridge()->EndEmptyTransaction(mFocusTarget, mLatestTransactionId, transactionStart);
MakeSnapshotIfRequired(size);
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,
EndTransactionFlags aFlags)
{
// This should never get called, all callers should use
// EndTransactionWithoutLayer instead.
MOZ_ASSERT(false);
--- a/gfx/layers/wr/WebRenderScrollData.cpp
+++ b/gfx/layers/wr/WebRenderScrollData.cpp
@@ -28,47 +28,16 @@ WebRenderLayerScrollData::WebRenderLayer
{
}
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)
{
mDescendantCount = aDescendantCount;
}
void
WebRenderLayerScrollData::Initialize(WebRenderScrollData& aOwner,
nsDisplayItem* aItem,
--- a/gfx/layers/wr/WebRenderScrollData.h
+++ b/gfx/layers/wr/WebRenderScrollData.h
@@ -37,22 +37,16 @@ class WebRenderScrollData;
// Each WebRenderLayerScrollData is conceptually associated with an "owning"
// WebRenderScrollData.
class WebRenderLayerScrollData
{
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,
int32_t aDescendantCount,
const ActiveScrolledRoot* aStopAtAsr);
int32_t GetDescendantCount() const;
size_t GetScrollMetadataCount() const;