Bug 1415225 - Remove dead code. r=jrmuizel
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 09 Nov 2017 09:03:51 -0500
changeset 444226 3cac8cc22a73b7dd5be823fdf59b97f9db72d612
parent 444225 9aff6ae3fc566b7cb599b63b53350069801d83b5
child 444227 ebd75f69dd52ea60272f91ee109b2100d786216c
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1415225
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1415225 - Remove dead code. r=jrmuizel This code has been unused since the removal of layers-full WR codepaths. MozReview-Commit-ID: JQn55Kbz5rr
gfx/layers/wr/WebRenderLayerManager.cpp
gfx/layers/wr/WebRenderScrollData.cpp
gfx/layers/wr/WebRenderScrollData.h
--- 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;