зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1494838 - Add a profiler marker with a cause stack for paints (view manager flushes). r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D85455
This commit is contained in:
Родитель
a2b3d3f84d
Коммит
89c666046b
|
@ -2160,6 +2160,17 @@ void nsRefreshDriver::Tick(VsyncId aId, TimeStamp aNowTime) {
|
|||
bool dispatchRunnablesAfterTick = false;
|
||||
if (mViewManagerFlushIsPending) {
|
||||
AutoRecordPhase paintRecord(&phasePaint);
|
||||
nsCString transactionId;
|
||||
#if MOZ_GECKO_PROFILER
|
||||
if (profiler_can_accept_markers()) {
|
||||
transactionId.AppendLiteral("Transaction ID: ");
|
||||
transactionId.AppendInt((uint64_t)mNextTransactionId);
|
||||
}
|
||||
#endif
|
||||
AUTO_PROFILER_TEXT_MARKER_CAUSE("ViewManagerFlush", transactionId, GRAPHICS,
|
||||
Nothing(),
|
||||
std::move(mViewManagerFlushCause));
|
||||
|
||||
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
|
||||
|
||||
nsTArray<nsDocShell*> profilingDocShells;
|
||||
|
@ -2496,6 +2507,9 @@ void nsRefreshDriver::ScheduleViewManagerFlush() {
|
|||
NS_ASSERTION(mPresContext->IsRoot(),
|
||||
"Should only schedule view manager flush on root prescontexts");
|
||||
mViewManagerFlushIsPending = true;
|
||||
if (!mViewManagerFlushCause) {
|
||||
mViewManagerFlushCause = profiler_get_backtrace();
|
||||
}
|
||||
mHasScheduleFlush = true;
|
||||
EnsureTimerStarted(eNeverAdjustTimer);
|
||||
}
|
||||
|
|
|
@ -528,6 +528,8 @@ class nsRefreshDriver final : public mozilla::layers::TransactionIdAllocator,
|
|||
// flush since the last time we did it.
|
||||
const mozilla::TimeDuration mMinRecomputeVisibilityInterval;
|
||||
|
||||
UniqueProfilerBacktrace mViewManagerFlushCause;
|
||||
|
||||
bool mThrottled : 1;
|
||||
bool mNeedToRecomputeVisibility : 1;
|
||||
bool mTestControllingRefreshes : 1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче