Bug 1437036 - Implement GetLastTransactionId in WebRenderLayerManager. r?hiro draft
authorKartikaya Gupta <kgupta@mozilla.com>
Sat, 12 May 2018 15:05:18 -0400
changeset 794542 815da347d80fa782be67741992c6e0d811333767
parent 794541 dd899acece740081465607ad62210c92f9d9d0ec
push id109707
push userkgupta@mozilla.com
push dateSat, 12 May 2018 19:05:34 +0000
reviewershiro
bugs1437036
milestone62.0a1
Bug 1437036 - Implement GetLastTransactionId in WebRenderLayerManager. r?hiro MozReview-Commit-ID: CLymsb5w3pk
gfx/layers/wr/WebRenderLayerManager.cpp
gfx/layers/wr/WebRenderLayerManager.h
--- a/gfx/layers/wr/WebRenderLayerManager.cpp
+++ b/gfx/layers/wr/WebRenderLayerManager.cpp
@@ -565,16 +565,22 @@ WebRenderLayerManager::SetTransactionIdA
     if (aAllocator) {
       aAllocator->ResetInitialTransactionId(mTransactionIdAllocator->LastTransactionId());
     }
   }
 
   mTransactionIdAllocator = aAllocator;
 }
 
+TransactionId
+WebRenderLayerManager::GetLastTransactionId()
+{
+  return mLatestTransactionId;
+}
+
 void
 WebRenderLayerManager::AddDidCompositeObserver(DidCompositeObserver* aObserver)
 {
   if (!mDidCompositeObservers.Contains(aObserver)) {
     mDidCompositeObservers.AppendElement(aObserver);
   }
 }
 
--- a/gfx/layers/wr/WebRenderLayerManager.h
+++ b/gfx/layers/wr/WebRenderLayerManager.h
@@ -97,16 +97,17 @@ public:
                             const mozilla::TimeStamp& aCompositeStart,
                             const mozilla::TimeStamp& aCompositeEnd) override;
 
   virtual void ClearCachedResources(Layer* aSubtree = nullptr) override;
   virtual void UpdateTextureFactoryIdentifier(const TextureFactoryIdentifier& aNewIdentifier) override;
   virtual TextureFactoryIdentifier GetTextureFactoryIdentifier() override;
 
   virtual void SetTransactionIdAllocator(TransactionIdAllocator* aAllocator) override;
+  virtual TransactionId GetLastTransactionId() override;
 
   virtual void AddDidCompositeObserver(DidCompositeObserver* aObserver) override;
   virtual void RemoveDidCompositeObserver(DidCompositeObserver* aObserver) override;
 
   virtual void FlushRendering() override;
   virtual void WaitOnTransactionProcessed() override;
 
   virtual void SendInvalidRegion(const nsIntRegion& aRegion) override;