Bug 1410777 - Remove unused function and dead code left over from the layers-full WR days. r?mstange draft
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 26 Oct 2017 14:17:18 -0400
changeset 687034 57e9329c2439e80a21e8f2ed7c41205b2a4f2ad2
parent 686801 0d1e55d87931fe70ec1d007e886bcd58015ff770
child 687035 dc9704f8af8d89ac7b9d921170e06f8bb01247f5
push id86389
push userkgupta@mozilla.com
push dateThu, 26 Oct 2017 18:58:59 +0000
reviewersmstange
bugs1410777
milestone58.0a1
Bug 1410777 - Remove unused function and dead code left over from the layers-full WR days. r?mstange This is functionally unrelated to the bug but I noticed it while fiddling with the code, and the lines affected are kind of intertwined with the next patch so I'm just doing the code removal as part of this bug. MozReview-Commit-ID: CwmluhyCdbR
gfx/layers/wr/WebRenderLayerManager.cpp
gfx/layers/wr/WebRenderLayerManager.h
--- a/gfx/layers/wr/WebRenderLayerManager.cpp
+++ b/gfx/layers/wr/WebRenderLayerManager.cpp
@@ -244,17 +244,16 @@ WebRenderLayerManager::EndTransaction(Dr
 void
 WebRenderLayerManager::EndTransactionWithoutLayer(nsDisplayList* aDisplayList,
                                                   nsDisplayListBuilder* aDisplayListBuilder)
 {
   MOZ_ASSERT(aDisplayList && aDisplayListBuilder);
   WrBridge()->RemoveExpiredFontKeys();
 
   AUTO_PROFILER_TRACING("Paint", "RenderLayers");
-  mTransactionIncomplete = false;
 
 #if 0
   // Useful for debugging, it dumps the display list *before* we try to build
   // WR commands from it
   nsFrame::PrintDisplayList(aDisplayListBuilder, *aDisplayList);
 #endif
 
   // Since we don't do repeat transactions right now, just set the time
@@ -273,25 +272,16 @@ WebRenderLayerManager::EndTransactionWit
                                                   aDisplayList,
                                                   aDisplayListBuilder,
                                                   mScrollData,
                                                   contentSize);
 
   mWidget->AddWindowOverlayWebRenderCommands(WrBridge(), builder, resourceUpdates);
   WrBridge()->ClearReadLocks();
 
-  // We can't finish this transaction so return. This usually
-  // happens in an empty transaction where we can't repaint a painted layer.
-  // In this case, leave the transaction open and let a full transaction happen.
-  if (mTransactionIncomplete) {
-    DiscardLocalImages();
-    WrBridge()->ProcessWebRenderParentCommands();
-    return;
-  }
-
   if (AsyncPanZoomEnabled()) {
     mScrollData.SetFocusTarget(mFocusTarget);
     mFocusTarget = FocusTarget();
 
     if (mIsFirstPaint) {
       mScrollData.SetIsFirstPaint();
       mIsFirstPaint = false;
     }
--- a/gfx/layers/wr/WebRenderLayerManager.h
+++ b/gfx/layers/wr/WebRenderLayerManager.h
@@ -130,18 +130,16 @@ public:
   // going, and when they end we discard them and remove them from the active
   // list.
   void AddActiveCompositorAnimationId(uint64_t aId);
   void AddCompositorAnimationsIdForDiscard(uint64_t aId);
   void DiscardCompositorAnimations();
 
   WebRenderBridgeChild* WrBridge() const { return mWrChild; }
 
-  void SetTransactionIncomplete() { mTransactionIncomplete = true; }
-
   // See equivalent function in ClientLayerManager
   void LogTestDataForCurrentPaint(FrameMetrics::ViewID aScrollId,
                                   const std::string& aKey,
                                   const std::string& aValue) {
     MOZ_ASSERT(gfxPrefs::APZTestLoggingEnabled(), "don't call me");
     mApzTestData.LogTestDataForPaint(mPaintSequenceNumber, aScrollId, aKey, aValue);
   }
   // See equivalent function in ClientLayerManager
@@ -188,18 +186,16 @@ private:
   uint64_t mLatestTransactionId;
 
   nsTArray<DidCompositeObserver*> mDidCompositeObservers;
 
   // This holds the scroll data that we need to send to the compositor for
   // APZ to do it's job
   WebRenderScrollData mScrollData;
 
-  bool mTransactionIncomplete;
-
   bool mNeedsComposite;
   bool mIsFirstPaint;
   FocusTarget mFocusTarget;
 
   // When we're doing a transaction in order to draw to a non-default
   // target, the layers transaction is only performed in order to send
   // a PLayers:Update.  We save the original non-default target to
   // mTarget, and then perform the transaction. After the transaction ends,