Backed out changeset 5dff64340068 (bug 1397407) because it depends on bug 1393031. r=backout on a CLOSED TREE
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 14 Sep 2017 23:36:02 +0200
changeset 665146 ac08b84acbcc781b4542ceca12bf417da73ac563
parent 665145 edddc72cb9a8b62fa6e921332c32128594fede6c
child 665147 0aa8826fa414d39fa7d5e661792a5c4ab83fe228
push id79943
push userbmo:tchiovoloni@mozilla.com
push dateThu, 14 Sep 2017 23:59:48 +0000
reviewersbackout
bugs1397407, 1393031
milestone57.0a1
backs out5dff64340068f7e61dcbd239841ddbafe0693329
Backed out changeset 5dff64340068 (bug 1397407) because it depends on bug 1393031. r=backout on a CLOSED TREE
gfx/layers/wr/WebRenderLayerManager.cpp
--- a/gfx/layers/wr/WebRenderLayerManager.cpp
+++ b/gfx/layers/wr/WebRenderLayerManager.cpp
@@ -371,16 +371,17 @@ WebRenderLayerManager::CreateWebRenderCo
 }
 
 void
 WebRenderLayerManager::EndTransactionWithoutLayer(nsDisplayList* aDisplayList,
                                                   nsDisplayListBuilder* aDisplayListBuilder)
 {
   MOZ_ASSERT(aDisplayList && aDisplayListBuilder);
   mEndTransactionWithoutLayers = true;
+  DiscardImages();
   WrBridge()->RemoveExpiredFontKeys();
   EndTransactionInternal(nullptr,
                          nullptr,
                          EndTransactionFlags::END_DEFAULT,
                          aDisplayList,
                          aDisplayListBuilder);
 }
 
@@ -680,16 +681,17 @@ WebRenderLayerManager::PushItemAsImage(n
 }
 
 void
 WebRenderLayerManager::EndTransaction(DrawPaintedLayerCallback aCallback,
                                       void* aCallbackData,
                                       EndTransactionFlags aFlags)
 {
   mEndTransactionWithoutLayers = false;
+  DiscardImages();
   WrBridge()->RemoveExpiredFontKeys();
   EndTransactionInternal(aCallback, aCallbackData, aFlags);
 }
 
 bool
 WebRenderLayerManager::EndTransactionInternal(DrawPaintedLayerCallback aCallback,
                                               void* aCallbackData,
                                               EndTransactionFlags aFlags,
@@ -810,21 +812,16 @@ WebRenderLayerManager::EndTransactionInt
     }
     mScrollData.SetPaintSequenceNumber(mPaintSequenceNumber);
   }
 
   bool sync = mTarget != nullptr;
   mLatestTransactionId = mTransactionIdAllocator->GetTransactionId(/*aThrottle*/ true);
   TimeStamp transactionStart = mTransactionIdAllocator->GetTransactionStart();
 
-  for (const auto& key : mImageKeysToDelete) {
-    resourceUpdates.DeleteImage(key);
-  }
-  mImageKeysToDelete.Clear();
-
   // Skip the synchronization for buffer since we also skip the painting during
   // device-reset status.
   if (!gfxPlatform::GetPlatform()->DidRenderingDeviceReset()) {
     if (WrBridge()->GetSyncObject() &&
         WrBridge()->GetSyncObject()->IsSyncObjectValid()) {
       WrBridge()->GetSyncObject()->Synchronize();
     }
   }