Backed out changeset 96e65eb8c472 (bug 1298085) for failing browser-chrome test browser_Troubleshoot.js. r=backout

This commit is contained in:
Sebastian Hengst 2016-09-09 19:33:35 +02:00
Родитель df054c1154
Коммит 28b6a770e1
2 изменённых файлов: 12 добавлений и 17 удалений

Просмотреть файл

@ -1009,13 +1009,13 @@ nsRefreshDriver::nsRefreshDriver(nsPresContext* aPresContext)
mInRefresh(false),
mWaitingForTransaction(false),
mSkippedPaints(false),
mResizeSuppressed(false),
mWarningThreshold(1)
mResizeSuppressed(false)
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(mPresContext,
"Need a pres context to tell us to call Disconnect() later "
"and decrement sRefreshDriverCount.");
mMostRecentRefreshEpochTime = JS_Now();
mMostRecentRefresh = TimeStamp::Now();
mMostRecentTick = mMostRecentRefresh;
@ -1065,7 +1065,6 @@ nsRefreshDriver::AdvanceTimeAndRefresh(int64_t aMilliseconds)
// Disable any refresh driver throttling when entering test mode
mWaitingForTransaction = false;
mSkippedPaints = false;
mWarningThreshold = 1;
}
}
@ -1656,7 +1655,6 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
mRootRefresh = nullptr;
}
mSkippedPaints = false;
mWarningThreshold = 1;
nsCOMPtr<nsIPresShell> presShell = mPresContext->GetPresShell();
if (!presShell || (ObserverCount() == 0 && ImageRequestCount() == 0)) {
@ -1994,7 +1992,6 @@ nsRefreshDriver::FinishedWaitingForTransaction()
profiler_tracing("Paint", "RD", TRACING_INTERVAL_END);
}
mSkippedPaints = false;
mWarningThreshold = 1;
}
uint64_t
@ -2007,7 +2004,6 @@ nsRefreshDriver::GetTransactionId()
!mTestControllingRefreshes) {
mWaitingForTransaction = true;
mSkippedPaints = false;
mWarningThreshold = 1;
}
return mPendingTransaction;
@ -2067,14 +2063,17 @@ nsRefreshDriver::IsWaitingForPaint(mozilla::TimeStamp aTime)
if (mTestControllingRefreshes) {
return false;
}
if (aTime > (mMostRecentTick + TimeDuration::FromMilliseconds(mWarningThreshold * 1000))) {
gfxCriticalNote << "Refresh driver waiting for the compositor for"
<< (aTime - mMostRecentTick).ToSeconds()
<< " seconds.";
mWarningThreshold *= 2;
// If we've skipped too many ticks then it's possible
// that something went wrong and we're waiting on
// a notification that will never arrive.
if (aTime > (mMostRecentTick + TimeDuration::FromMilliseconds(200))) {
mSkippedPaints = false;
mWaitingForTransaction = false;
if (mRootRefresh) {
mRootRefresh->RemoveRefreshObserver(this, Flush_Style);
}
return false;
}
if (mWaitingForTransaction) {
mSkippedPaints = true;
return true;

Просмотреть файл

@ -424,10 +424,6 @@ private:
bool mResizeSuppressed;
int64_t mMostRecentRefreshEpochTime;
// Number of seconds that the refresh driver is blocked waiting for a compositor
// transaction to be completed before we append a note to the gfx critical log.
// The number is doubled every time the threshold is hit.
uint64_t mWarningThreshold;
mozilla::TimeStamp mMostRecentRefresh;
mozilla::TimeStamp mMostRecentTick;
mozilla::TimeStamp mTickStart;