Backed out changeset 3a8c78a6146f (bug 1283947) for failing browser_animation_pseudo_elements.js on Linux opt without e10s. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Mon, 20 Feb 2017 22:47:24 +0100
changeset 372949 cc5a5a7e5331255b5dda147e09ea4d85a9bd8d56
parent 372948 9521a6247d94f225f94cfba58376130599a76b3b
child 372950 a62ce221207c4db6f542426a68cfa0dbb91d118c
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1283947
milestone54.0a1
backs out3a8c78a6146fa9fb3fa9f73d0547b6520e26a470
Backed out changeset 3a8c78a6146f (bug 1283947) for failing browser_animation_pseudo_elements.js on Linux opt without e10s. r=backout
gfx/layers/TransactionIdAllocator.h
gfx/layers/client/ClientLayerManager.cpp
gfx/layers/client/ClientLayerManager.h
layout/base/nsRefreshDriver.cpp
layout/base/nsRefreshDriver.h
--- a/gfx/layers/TransactionIdAllocator.h
+++ b/gfx/layers/TransactionIdAllocator.h
@@ -49,25 +49,16 @@ public:
    * Revoke a transaction id that isn't needed to track
    * completion of asynchronous work. This is similar
    * to NotifyTransactionCompleted except avoids
    * return ordering issues.
    */
   virtual void RevokeTransactionId(uint64_t aTransactionId) = 0;
 
   /**
-   * Stop waiting for pending transactions, if any.
-   *
-   * This is used when ClientLayerManager is assigning to another refresh
-   * driver, and the current refresh driver may never receive transaction
-   * completed notifications.
-   */
-  virtual void ClearPendingTransactions() = 0;
-
-  /**
    * Get the start time of the current refresh tick.
    */
   virtual mozilla::TimeStamp GetTransactionStart() = 0;
 };
 
 } // namespace layers
 } // namespace mozilla
 
--- a/gfx/layers/client/ClientLayerManager.cpp
+++ b/gfx/layers/client/ClientLayerManager.cpp
@@ -506,29 +506,16 @@ ClientLayerManager::GetCompositorSideAPZ
 {
   if (mForwarder->HasShadowManager()) {
     if (!mForwarder->GetShadowManager()->SendGetAPZTestData(aData)) {
       NS_WARNING("Call to PLayerTransactionChild::SendGetAPZTestData() failed");
     }
   }
 }
 
-void
-ClientLayerManager::SetTransactionIdAllocator(TransactionIdAllocator* aAllocator)
-{
-  // When changing the refresh driver, the previous refresh driver may never
-  // receive updates of pending transactions it's waiting for. So clear the
-  // waiting state before assigning another refresh driver.
-  if (mTransactionIdAllocator) {
-    mTransactionIdAllocator->ClearPendingTransactions();
-  }
-
-  mTransactionIdAllocator = aAllocator;
-}
-
 float
 ClientLayerManager::RequestProperty(const nsAString& aProperty)
 {
   if (mForwarder->HasShadowManager()) {
     float value;
     if (!mForwarder->GetShadowManager()->SendRequestProperty(nsString(aProperty), &value)) {
       NS_WARNING("Call to PLayerTransactionChild::SendGetAPZTestData() failed");
     }
--- a/gfx/layers/client/ClientLayerManager.h
+++ b/gfx/layers/client/ClientLayerManager.h
@@ -215,17 +215,20 @@ public:
   // LogTestData...() functions.
   const APZTestData& GetAPZTestData() const {
     return mApzTestData;
   }
 
   // Get a copy of the compositor-side APZ test data for our layers ID.
   void GetCompositorSideAPZTestData(APZTestData* aData) const;
 
-  virtual void SetTransactionIdAllocator(TransactionIdAllocator* aAllocator) override;
+  virtual void SetTransactionIdAllocator(TransactionIdAllocator* aAllocator) override
+  {
+     mTransactionIdAllocator = aAllocator;
+  }
 
   virtual uint64_t GetLastTransactionId() override { return mLatestTransactionId; }
 
   float RequestProperty(const nsAString& aProperty) override;
 
   bool AsyncPanZoomEnabled() const override;
 
   void SetNextPaintSyncId(int32_t aSyncId);
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -2180,23 +2180,16 @@ nsRefreshDriver::RevokeTransactionId(uin
   if (mPendingTransaction == mCompletedTransaction + 2 &&
       mWaitingForTransaction) {
     MOZ_ASSERT(!mSkippedPaints, "How did we skip a paint when we're in the middle of one?");
     FinishedWaitingForTransaction();
   }
   mPendingTransaction--;
 }
 
-void
-nsRefreshDriver::ClearPendingTransactions()
-{
-  mCompletedTransaction = mPendingTransaction;
-  mWaitingForTransaction = false;
-}
-
 mozilla::TimeStamp
 nsRefreshDriver::GetTransactionStart()
 {
   return mTickStart;
 }
 
 void
 nsRefreshDriver::NotifyTransactionCompleted(uint64_t aTransactionId)
--- a/layout/base/nsRefreshDriver.h
+++ b/layout/base/nsRefreshDriver.h
@@ -304,17 +304,16 @@ public:
    */
   static bool GetJankLevels(mozilla::Vector<uint64_t>& aJank);
 
   // mozilla::layers::TransactionIdAllocator
   uint64_t GetTransactionId() override;
   uint64_t LastTransactionId() const override;
   void NotifyTransactionCompleted(uint64_t aTransactionId) override;
   void RevokeTransactionId(uint64_t aTransactionId) override;
-  void ClearPendingTransactions() override;
   mozilla::TimeStamp GetTransactionStart() override;
 
   bool IsWaitingForPaint(mozilla::TimeStamp aTime);
 
   // nsARefreshObserver
   NS_IMETHOD_(MozExternalRefCountType) AddRef(void) override { return TransactionIdAllocator::AddRef(); }
   NS_IMETHOD_(MozExternalRefCountType) Release(void) override { return TransactionIdAllocator::Release(); }
   virtual void WillRefresh(mozilla::TimeStamp aTime) override;