Bug 1302713 - Adapt the refresh driver warning threshold to the build target.
This commit is contained in:
@@ -82,6 +82,16 @@ static mozilla::LazyLogModule sRefreshDriverLog("nsRefreshDriver");
|
|||||||
// after 10 minutes, stop firing off inactive timers
|
// after 10 minutes, stop firing off inactive timers
|
||||||
#define DEFAULT_INACTIVE_TIMER_DISABLE_SECONDS 600
|
#define DEFAULT_INACTIVE_TIMER_DISABLE_SECONDS 600
|
||||||
|
|
||||||
|
// The number of seconds spent skipping frames because we are waiting for the compositor
|
||||||
|
// before logging.
|
||||||
|
#ifdef MOZ_VALGRIND
|
||||||
|
#define REFRESH_WAIT_WARNING 10
|
||||||
|
#elif defined(DEBUG) || defined(MOZ_ASAN)
|
||||||
|
#define REFRESH_WAIT_WARNING 5
|
||||||
|
#else
|
||||||
|
#define REFRESH_WAIT_WARNING 1
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
// `true` if we are currently in jank-critical mode.
|
// `true` if we are currently in jank-critical mode.
|
||||||
//
|
//
|
||||||
@@ -1010,7 +1020,7 @@ nsRefreshDriver::nsRefreshDriver(nsPresContext* aPresContext)
|
|||||||
mWaitingForTransaction(false),
|
mWaitingForTransaction(false),
|
||||||
mSkippedPaints(false),
|
mSkippedPaints(false),
|
||||||
mResizeSuppressed(false),
|
mResizeSuppressed(false),
|
||||||
mWarningThreshold(1)
|
mWarningThreshold(REFRESH_WAIT_WARNING)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
MOZ_ASSERT(mPresContext,
|
MOZ_ASSERT(mPresContext,
|
||||||
@@ -1061,7 +1071,7 @@ nsRefreshDriver::AdvanceTimeAndRefresh(int64_t aMilliseconds)
|
|||||||
// Disable any refresh driver throttling when entering test mode
|
// Disable any refresh driver throttling when entering test mode
|
||||||
mWaitingForTransaction = false;
|
mWaitingForTransaction = false;
|
||||||
mSkippedPaints = false;
|
mSkippedPaints = false;
|
||||||
mWarningThreshold = 1;
|
mWarningThreshold = REFRESH_WAIT_WARNING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user