diff --git a/layout/base/nsRefreshDriver.cpp b/layout/base/nsRefreshDriver.cpp index b4dd013d934cc..395f65d548441 100644 --- a/layout/base/nsRefreshDriver.cpp +++ b/layout/base/nsRefreshDriver.cpp @@ -1696,7 +1696,6 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime) profilingDocShells[i]->AddProfileTimelineMarker("Paint", TRACING_INTERVAL_START); } - profiler_tracing("Paint", "DisplayList", TRACING_INTERVAL_START); #ifdef MOZ_DUMP_PAINTING if (nsLayoutUtils::InvalidationDebuggingIsEnabled()) { printf_stderr("Starting ProcessPendingUpdates\n"); @@ -1715,7 +1714,6 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime) profilingDocShells[i]->AddProfileTimelineMarker("Paint", TRACING_INTERVAL_END); } - profiler_tracing("Paint", "DisplayList", TRACING_INTERVAL_END); if (nsContentUtils::XPConnect()) { nsContentUtils::XPConnect()->NotifyDidPaint(); diff --git a/view/nsViewManager.cpp b/view/nsViewManager.cpp index 43d473cab96c2..f2231947aa3ee 100644 --- a/view/nsViewManager.cpp +++ b/view/nsViewManager.cpp @@ -375,6 +375,7 @@ nsViewManager::ProcessPendingUpdatesForView(nsView* aView, return; // 'this' might have been destroyed } if (aFlushDirtyRegion) { + profiler_tracing("Paint", "DisplayList", TRACING_INTERVAL_START); nsAutoScriptBlocker scriptBlocker; SetPainting(true); for (uint32_t i = 0; i < widgets.Length(); ++i) { @@ -385,6 +386,7 @@ nsViewManager::ProcessPendingUpdatesForView(nsView* aView, } } SetPainting(false); + profiler_tracing("Paint", "DisplayList", TRACING_INTERVAL_END); } }