зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1378966 - Don't cause immediate throttling of the refresh driver on repeat transactions. r=mattwoodrow
MozReview-Commit-ID: 8orAmdpIRTF --HG-- extra : rebase_source : 2988a9faced2648cd182ebe8adff791634af519f
This commit is contained in:
Родитель
2a5888f644
Коммит
6d0c0db395
|
@ -24,9 +24,11 @@ public:
|
|||
* only be called while IsInRefresh().
|
||||
*
|
||||
* If too many id's are allocated without being returned then
|
||||
* the refresh driver will suspend until they catch up.
|
||||
* the refresh driver will suspend until they catch up. This
|
||||
* "throttling" behaviour can be skipped by passing aThrottle=false.
|
||||
* Otherwise call sites should generally be passing aThrottle=true.
|
||||
*/
|
||||
virtual uint64_t GetTransactionId() = 0;
|
||||
virtual uint64_t GetTransactionId(bool aThrottle) = 0;
|
||||
|
||||
/**
|
||||
* Return the transaction id that for the last non-revoked transaction.
|
||||
|
|
|
@ -726,7 +726,7 @@ ClientLayerManager::ForwardTransaction(bool aScheduleComposite)
|
|||
|
||||
mPhase = PHASE_FORWARD;
|
||||
|
||||
mLatestTransactionId = mTransactionIdAllocator->GetTransactionId();
|
||||
mLatestTransactionId = mTransactionIdAllocator->GetTransactionId(!mIsRepeatTransaction);
|
||||
TimeStamp transactionStart;
|
||||
if (!mTransactionIdAllocator->GetTransactionStart().IsNull()) {
|
||||
transactionStart = mTransactionIdAllocator->GetTransactionStart();
|
||||
|
|
|
@ -520,7 +520,7 @@ WebRenderLayerManager::EndTransactionInternal(DrawPaintedLayerCallback aCallback
|
|||
}
|
||||
|
||||
bool sync = mTarget != nullptr;
|
||||
mLatestTransactionId = mTransactionIdAllocator->GetTransactionId();
|
||||
mLatestTransactionId = mTransactionIdAllocator->GetTransactionId(/*aThrottle*/ true);
|
||||
|
||||
{
|
||||
AutoProfilerTracing
|
||||
|
|
|
@ -2161,11 +2161,12 @@ nsRefreshDriver::FinishedWaitingForTransaction()
|
|||
}
|
||||
|
||||
uint64_t
|
||||
nsRefreshDriver::GetTransactionId()
|
||||
nsRefreshDriver::GetTransactionId(bool aThrottle)
|
||||
{
|
||||
++mPendingTransaction;
|
||||
|
||||
if (mPendingTransaction >= mCompletedTransaction + 2 &&
|
||||
if (aThrottle &&
|
||||
mPendingTransaction >= mCompletedTransaction + 2 &&
|
||||
!mWaitingForTransaction &&
|
||||
!mTestControllingRefreshes) {
|
||||
mWaitingForTransaction = true;
|
||||
|
|
|
@ -317,7 +317,7 @@ public:
|
|||
static bool GetJankLevels(mozilla::Vector<uint64_t>& aJank);
|
||||
|
||||
// mozilla::layers::TransactionIdAllocator
|
||||
uint64_t GetTransactionId() override;
|
||||
uint64_t GetTransactionId(bool aThrottle) override;
|
||||
uint64_t LastTransactionId() const override;
|
||||
void NotifyTransactionCompleted(uint64_t aTransactionId) override;
|
||||
void RevokeTransactionId(uint64_t aTransactionId) override;
|
||||
|
|
Загрузка…
Ссылка в новой задаче